- Jan 11, 2024
-
-
Florian Hahn authored
Based on https://github.com/llvm/llvm-project/issues/71517.
-
Dominik Adamski authored
Variables `__omp_rtl_assume_teams_oversubscription` and `__omp_rtl_assume_threads_oversubscription `are used by functions: `__kmpc_distribute_static_loop`, `__kmpc_distribute_for_static_loop `and `__kmpc_for_static_loop`.
-
HaohaiWen authored
Those not reachable blocks was not analyzed by LiveDebugValues and may raise out of bound access to VarLocs as case in #77441.
-
HaohaiWen authored
When removing an empty machine basic block, all of its successors should be inherited by its fall through MBB. This keeps CFG as only have one entry which is required by LiveDebugValues. Reland #77441 as LiveDebugValues test.
-
John Brawn authored
When rebasing #75486 I missed adding an extra initializer value to ParsedBranchProtection, so fix that.
-
Leandro Lupori authored
Fixes fveclib.f90 and fveclib-codegen.f90 tests, that were failing on Darwin.
-
Leandro Lupori authored
If DEFAULT_SYSROOT is not specfied when building flang, then the -isysroot flag is needed to link binaries against system libraries on Darwin. It's also needed when linking against a non-default sysroot.
-
Jie Fu authored
llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp:143:39: error: missing field 'GuardedControlStack' initializer [-Werror,-Wmissing-field-initializers] PBP = {"none", "a_key", false, false}; ^ 1 error generated. -
Jay Foad authored
Modify GCNHazardRecognizer::fixLdsDirectVMEMHazard() so the waitvsrc operand in gfx12 DS_PARAM_LOAD or DS_DIRECT_LOAD instructions is set appropriately depending on whether a hazard is found or not, rather than inserting an S_WAITCNT_DEPCTR instruction if a hazard needs to be mitigated. Co-authored-by:Stephen Thomas <Stephen.Thomas@amd.com>
-
John Brawn authored
-mbranch-protection=gcs (enabled by -mbranch-protection=standard) causes generated objects to be marked with the gcs feature. This is done via the guarded-control-stack module flag, in a similar way to branch-target-enforcement and sign-return-address. Enabling GCS causes the GNU_PROPERTY_AARCH64_FEATURE_1_GCS bit to be set on generated objects. No code generation changes are required, as GCS just requires that functions are called using BL and returned from using RET (or other similar variant instructions), which is already the case.
-
r4nt authored
1. There are multiple calls to addFakeParenthesis; move the guard to not assign fake parenthesis into the function to make sure we cover all calls. 2. MustBreakBefore can be set on a token in two cases: either during unwrapped line parsing, or later, during token annotation. We must keep the latter, but reset the former. 3. Added a test to document that the intended behavior of preferring not to break between a return type and a function identifier. For example, with MOCK_METHOD(r, n, a)=r n a, the code MOCK_METHOD(void, f, (int a, int b)) should prefer the same breaks as the expanded void f(int a, int b).
-
goussepi authored
Calling one of pthread join/detach interceptor on an already joined/detached thread causes asserts such as: AddressSanitizer: CHECK failed: sanitizer_thread_arg_retval.cpp:56 "((t)) != (0)" (0x0, 0x0) (tid=1236094) #0 0x555555634f8b in __asan::CheckUnwind() compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x55555564e06e in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:24 #2 0x5555556491df in __sanitizer::ThreadArgRetval::BeforeJoin(unsigned long) const compiler-rt/lib/sanitizer_common/sanitizer_thread_arg_retval.cpp:56:3 #3 0x5555556198ed in Join<___interceptor_pthread_tryjoin_np(void*, void**)::<lambda()> > compiler-rt/lib/asan/../sanitizer_common/sanitizer_thread_arg_retval.h:74:26 #4 0x5555556198ed in pthread_tryjoin_np compiler-rt/lib/asan/asan_interceptors.cpp:311:29 The assert are replaced by error codes.
-
Dmitriy Smirnov authored
This PR adds lowering for TOSA Fft2d operator down to Linalg.
-
Yi Wu authored
reference to gfortran fdate https://gcc.gnu.org/onlinedocs/gfortran/FDATE.html usage: ```fortran CHARACTER(32) :: time CALL fdate(time) WRITE(*,*) time ``` fdate is used in the ECP proxy application https://proxyapps.exascaleproject.org/app/minismac2d/ https://github.com/Mantevo/miniSMAC/blob/f90446714226eeef650b78bce06ca4967792e74d/ref/smac2d.f#L1570 `fdate` now produce the same result on flang, compare to gfortran, where If the length is too short to fit completely, blank return. ```fortran character(20) :: string call fdate(string) write(*, *) string, "X" ``` ```bash $ ../build-release/bin/flang-new test.f90 $ ./a.out X ``` If length if larger than it requires(24), fill the rest of buffer space. ```fortran character(30) :: string call fdate(string) write(*, *) string, "X" ``` ```bash $ ../build-release/bin/flang-new test.f90 $ ./a.out Wed Nov 15 16:59:13 2023 X ``` The length value is hardcoded, because: ```c++ // Day Mon dd hh:mm:ss yyyy\n\0 is 26 characters, e.g. // Tue May 26 21:51:03 2015\n\0 ``` --------- Co-authored-by:
Yi Wu <yiwu02@wdev-yiwu02.arm.com>
-
Krzysztof Parzyszek authored
Add FrontendOpenMP as an additional component library dependency.
-
Mikhail Goncharov authored
This reverts commit 1a579273. Test address-space-patfrags.td.test is failing https://lab.llvm.org/buildbot/#/builders/104/builds/15012
-
Amara Emerson authored
We previously had a heuristic that if a value V was used multiple times in a single PHI, then to avoid potentially rematerializing into many predecessors we bail out. The phi uses only counted as a single use in the shouldLocalize() hook because it counted the PHI as a single instruction use, not factoring in it may have many incoming edges. It turns out this heuristic is slightly too pessimistic, and allowing a small number of these uses to be localized can improve code size due to shortening live ranges, especially if those ranges span a call. This change results in some improvements in size on CTMark -Os: ``` Program size.__text before after diff kimwitu++/kc 451676.00 451860.00 0.0% mafft/pairlocalalign 241460.00 241540.00 0.0% tramp3d-v4/tramp3d-v4 389216.00 389208.00 -0.0% 7zip/7zip-benchmark 587528.00 587464.00 -0.0% Bullet/bullet 457424.00 457348.00 -0.0% consumer-typeset/consumer-typeset 405472.00 405376.00 -0.0% SPASS/SPASS 410288.00 410120.00 -0.0% lencod/lencod 426396.00 426108.00 -0.1% ClamAV/clamscan 380108.00 379756.00 -0.1% sqlite3/sqlite3 283664.00 283372.00 -0.1% Geomean difference -0.0% ``` I experimented with different variations and thresholds. Using 3 instead of 2 resulted in a further 0.1% improvement on ClamAV but also regressed sqlite3 by the same %. -
Shengchen Kan authored
-
Ben Shi authored
-
Guillaume Chatelet authored
Fixes #77080.
-
Congcong Cai authored
Fixes: #77583 bcd51aaa fixed part of template instantiation dependent name issues but still missing some cases This patch want to enhance the dependent name check
-
Benjamin Maxwell authored
-
Matthias Springer authored
Clarify what kind of IR modifications are allowed. Also improve the documentation of the greedy rewrite driver entry points. Addressing comments in #76219.
-
avl-llvm authored
This patch is extracted from #74725. Put some usefull routines into the common Utils.h.
-
Balázs Kéri authored
A friend template that is in a dependent context is not linked into declaration chains (for example with the definition of the befriended template). This condition was not correctly handled by `ASTImporter`.
-
Martin Storsjö authored
Revert "[SLP]Do not require external uses for roots and single use for other instructions in computeMinimumValueSizes. (#72679)" This reverts commit 408dce82. This triggered failed asserts with code like this: char a[]; short *b; int c, d, e, f; void g() { char *h; for (;;) { for (; f; ++f) { h[f] = b[0] * a[e] + b[c] * a[1] >> 7; ++b; } h += d; } } Compiled like this: $ clang -target x86_64-linux-gnu -c repro.c -O2 clang: ../lib/IR/Instructions.cpp:3335: static llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
-
Guillaume Chatelet authored
-
Utkarsh Saxena authored
The last attempt at https://github.com/llvm/llvm-project/pull/72220 was reverted by https://github.com/llvm/llvm-project/commit/94d6699bf5eeb5aa4c50d1d90f8bf69b79201ceb because it breaks C++20 build in clang-17 and before. This is a workaround of https://github.com/llvm/llvm-project/issues/70210 and unblocks https://github.com/llvm/llvm-project/pull/72213 which rectifies rewriting template operator and thus introduces new breakages. Moving the function definition out of the class makes clang find a matching `operator!=` for the `operator==`. This makes clang not rewrite the `operator==` with reversed args. Hence, the ambiguity is resolved. The final plan, when https://github.com/llvm/llvm-project/issues/70210 is fixed, is to move these back to inline definition or even convert to a member template operator. This should not be urgent and could even wait for a major clang release including https://github.com/llvm/llvm-project/pull/72213
-
Sjoerd Meijer authored
Target hook `canPairLdStOpc` is missing quite a few opcodes for which LDPs/STPs can created. I was hoping that it would not be necessary to add these missing opcodes here and that the attached motivating test case would be handled by the LoadStoreOptimiser (especially after #71908), but it's not. The problem is that after register allocation some things are a lot harder to do. Consider this for the motivating example ``` [1] renamable $q1 = LDURQi renamable $x9, -16 :: (load (s128) from %ir.r51, align 8, !tbaa !0) [2] renamable $q2 = LDURQi renamable $x0, -16 :: (load (s128) from %ir.r53, align 8, !tbaa !4) [3] renamable $q1 = nnan ninf nsz arcp contract afn reassoc nofpexcept FMLSv2f64 killed renamable $q1(tied-def 0), killed renamable $q2, renamable $q0, implicit $fpcr [4] STURQi killed renamable $q1, renamable $x9, -16 :: (store (s128) into %ir.r51, align 1, !tbaa !0) [5] renamable $q1 = LDRQui renamable $x9, 0 :: (load (s128) from %ir.r.G0001_609.0, align 8, !tbaa !0) ``` We can't combine the the load in line [5] into the load on [1]: regisister q1 is used in between. And we can can't combine [1] into [5]: it is aliasing with the STR on line [4]. So, adding some missing opcodes here seems the best/easiest approach. I will follow up to add some more missing cases here.
-
Simon Pilgrim authored
-
Sjoerd Meijer authored
With these debug message it's possible to see why some pairs get rejected for combining.
-
Corentin Jabot authored
-
Corentin Jabot authored
Use a consistent, more pastel color for unknown status in papers and issues tracking pages
-
Dominik Adamski authored
Added test which proves that end-to-end compilation of omp target parallel costruct is successful for Flang compiler.
-
Younan Zhang authored
We used to consider the `DeclContext` for selection nodes inside a lambda as the enclosing scope of the lambda expression, rather than the lambda itself. For example, ```cpp void foo(); auto lambda = [] { return ^foo(); }; ``` where `N` is the selection node for the expression `foo()`, `N.getDeclContext()` returns the `TranslationUnitDecl` previously, which IMO is wrong, since the method `operator()` of the lambda is closer. Incidentally, this fixes a glitch in add-using-declaration tweaks. (Thanks @HighCommander4 for the test case.) -
Thorsten Schütt authored
Instcombine canonicalizes selects to floating point and integer minmax. This and the dag combiner canonicalize to floating point minmax. None of them canonicalizes to integer minmax. On Neoverse V2 basic integer arithmetic and integer minmax have the same costs.
-
Nikita Popov authored
Set the writable and dead_on_unwind attributes for sret arguments. These indicate that the argument points to writable memory (and it's legal to introduce spurious writes to it on entry to the function) and that the argument memory will not be used if the call unwinds. This enables additional MemCpyOpt/DSE/LICM optimizations.
-
hanbeom authored
`InstCombine` uses `Worklist` to manage change history. `setOperand`, which was previously used to change the `Select` Instruction, does not, so it is `run` twice, which causes an `LLVM ERROR`. This problem is resolved by changing `setOperand` to `replaceOperand` as the change history will be registered in the Worklist. Fixes #77553.
-
Jay Foad authored
-
Diana Picus authored
Calls do not have to wait for VsCnt, so after they return there might still be scratch stores in progress. It's important that we don't send the DEALLOC_VGPR message in that case, since that might release the VGPRs and scratch allocation before those stores are complete.
-