- Mar 04, 2022
-
-
Hubert Tong authored
-
Lei Huang authored
Reviewed By: jsji, #libc, ldionne Differential Revision: https://reviews.llvm.org/D120907
-
- Mar 03, 2022
-
-
Shao-Ce SUN authored
Until Zfinx is supported in CodeGen we need to convert all Zfinx register classes to GPR. Remove the zfinx-types.ll test which didn't test anything meaningful since -mattr=zfinx isn't implemented completely in llc. Follow up to D93298. (cherry picked from commit 6cb42cd6)
-
Timm Bäder authored
Otherwise, the driver will insert e.g. -lgcc_s when CLANG_DEFAULT_UNWINDLIB=libgcc is set during the clang build. Differential Revision: https://reviews.llvm.org/D120644 (cherry picked from commit 12d36792)
-
Lang Hames authored
We were incorrectly using the OptimizeLayer and bypassing the COD layer. (cherry picked from commit 1e16272b)
-
Lang Hames authored
Without this, EPCIndirectionUtils::getResolverBlockAddr (and lazy compilation via EPC) won't work. No test case: lli is still using LocalLazyCallThroughManager. I'll revisit this soon when I look at adding lazy compilation support to the ORC runtime. (cherry picked from commit 34e539dc)
-
Johannes Doerfert authored
When we use liveness for edges during the `genericValueTraversal` we need to make sure to use the AAIsDead of the correct function. This patch adds the proper logic and some simple caching scheme. We also add an assertion to the `isEdgeDead` call to make sure future misuse is detected earlier. Fixes https://github.com/llvm/llvm-project/issues/53872
-
Michael Kruse authored
-
- Mar 02, 2022
-
-
Shao-Ce SUN authored
Patch is from craig.topper's comments in https://reviews.llvm.org/D93298
-
Simon Atanasyan authored
LLVM tools do not emit `DT_MIPS_XHASH` dynamic table tag. But now `llvm-objdump` and `llvm-readelf` recognize this tag and print it. Fixes https://github.com/llvm/llvm-project/issues/53996 (cherry picked from commit 3c840e3c)
-
Tom Stellard authored
This reverts commit 19149538. This fix was accidentally committed.
-
Yonghong Song authored
In BPF backend, BTF type generation may skip some debuginfo types if they are the pointee type of a struct member. For example, struct task_struct { ... struct mm_struct *mm; ... }; BPF backend may generate a forward decl for 'struct mm_struct' instead of full type if there are no other usage of 'struct mm_struct'. The reason is to avoid bringing too much unneeded types in BTF. Alexei found a pruning bug where we may miss some full type generation. The following is an illustrating example: struct t1 { ... } struct t2 { struct t1 *p; }; struct t2 g; void foo(struct t1 *arg) { ... } In the above case, we will have partial debuginfo chain like below: struct t2 -> member p \ -> ptr -> struct t1 / foo -> argument arg During traversing struct t2 -> member p -> ptr -> struct t1 The corresponding BTF types are generated except 'struct t1' which will be in FixUp stage. Later, when traversing foo -> argument arg -> ptr -> struct t1 The 'ptr' BTF type has been generated and currently implementation ignores 'pointer' type hence 'struct t1' is not generated. This patch fixed the issue not just for the above case, but for general case with multiple derived types, e.g., struct t2 -> member p \ -> const -> ptr -> volatile -> struct t1 / foo -> argument arg Differential Revision: https://reviews.llvm.org/D119986 -
Anton Afanasyev authored
Particularly this breaks vectorization of insertelements where some of intermediate (i.e. not last) insertelements are used externally. Fixes PR52275 Fixes #51617 Reviewed by: ABataev Differential Revision: https://reviews.llvm.org/D119679 (cherry picked from commit b7574b09)
-
Rainer Orth authored
As reported in Issue #53690, `tools/flang/unittests/Optimizer/FlangOptimizerTests` `FAIL`s to link on Solaris: Undefined first referenced symbol in file _ZN3fir7runtimeL8getModelIcEEPFN4mlir4TypeEPNS2_11MLIRContextEEv lib/libFIRBuilder.a(Reduction.cpp.o) which is `mlir::Type (*fir::runtime::getModel<char>())(mlir::MLIRContext*)`. `clang++` warn's In file included from /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp:14: /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h:60:34: warning: function 'fir::runtime::getModel<char>' has internal linkage but is not defined [-Wundefined-internal] static constexpr TypeBuilderFunc getModel(); ^ /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h:289:29: note: used here TypeBuilderFunc ret = getModel<RT>(); ^ Fixed by adding an explicit template instantiation for `getModel<char>`. I suppose this is necessary because on Solaris `char` is `signed`. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D119438 (cherry picked from commit c2b9e967) -
Nick Desaulniers authored
When building 32b x86 code as PIC, the existing handling of "i" constraints is conservative since generally we have to go through the GOT to find references to functions. But generally, BlockAddresses from C code refer to the Function in the current TU. Permit BlockAddresses to be used with the "i" constraint for those cases. I regressed this in commit 4edb9983 ("[SelectionDAG] treat X constrained labels as i for asm") Fixes: https://github.com/llvm/llvm-project/issues/53868 Reviewed By: efriedma, MaskRay Differential Revision: https://reviews.llvm.org/D119905 (cherry picked from commit 027c16be)
-
Amanieu d'Antras authored
These aliases are produced by MergeFunctions and need to be mangled according to the calling convention of the function they are pointing to instead of defaulting to the C calling convention. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D120382 (cherry picked from commit 54b909de)
-
Sander de Smalen authored
'streaming-sve' is not a feature that users should be able to set, hence why it shouldn't show up in user-diagnostics. The only flag that end-users should be able to set is '+sme'. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D120256 (cherry picked from commit ffa4dfc8)
-
Johannes Doerfert authored
`UsedAssumedInformation` is a return argument utilized to determine what information is known. Most APIs used it already but `genericValueTraversal` did not. This adds it to `genericValueTraversal` and replaces `AllCallSitesKnown` of `checkForAllCallSites` with the commonly used `UsedAssumedInformation`. This was supposed to be a NFC commit, then the test change appeared. Turns out, we had one user of `AllCallSitesKnown` (AANoReturn) and the way we set `AllCallSitesKnown` was wrong as we ignored the fact some call sites were optimistically assumed dead. Included a dedicated test for this as well now. Fixes https://github.com/llvm/llvm-project/issues/53884
-
Michał Górny authored
Add an explicit LIBCXX_CXX_ABI=system-libcxxabi option for linking to system-installed libc++abi. This fixes the ability to link against one when building libcxx via the runtimes build, as otherwise the build system insists on linking into in-tree targets. Differential Revision: https://reviews.llvm.org/D119539 (cherry picked from commit ba4f1e44)
-
- Mar 01, 2022
-
-
Michał Górny authored
Apparently modern versions of ounit2 can only be found as "ounit2" rather than "oUnit" version 2. Update the CMake check to support both variants. This makes the OCaml tests run again with ounit2-2.2.4. Differential Revision: https://reviews.llvm.org/D119079 (cherry picked from commit 919dba92)
-
George Koehler authored
https://reviews.llvm.org/D91906 did most of the work necessary to fix libunwind on 32-bit PowerPC processors without AltiVec, but there was one more piece necessary. Reviewed By: luporl Differential Revision: https://reviews.llvm.org/D120197 (cherry picked from commit 3fa2e66c)
-
Dimitry Andric authored
Follow-up to 458ead66, which replaced the bespoke CMakeLists.txt file for building a custom instrumented libc++ with an invocation of the runtimes build. In the the bespoke CMakeLists.txt, the LIBCXX_CXX_ABI setting was forced to libcxxabi, but this was not done for the CMake invocation for the runtimes build. This would cause CMake configuration issues on platforms where the default LIBCXX_CXX_ABI setting is not libcxxabi, such as FreeBSD. Add `-DLIBCXX_CXX_ABI=libcxxabi` to that invocation, to make sure the custom instrumented libc++ always uses the expected ABI. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D119554 (cherry picked from commit a9f1a9c0)
-
Brad Smith authored
Similar to D116843 for Gnu.cpp Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D119656 (cherry picked from commit cbd9d136)
-
Brad Smith authored
Similar to D116843 for Gnu.cpp Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D119655 (cherry picked from commit d241ce0f)
-
Chia-hung Duan authored
Use SetVector instead of DenseSet to ensure we always generate the same name for the same function. This issue is found in https://github.com/llvm/llvm-project/issues/53768. Reviewed By: quinnp, rdzhabarov Differential Revision: https://reviews.llvm.org/D120514 (cherry picked from commit d56ef5ed)
-
Jessica Clarke authored
By failing to lex the token we end up both parsing it as a binary operator ourselves and parsing it as a unary operator when calling parseExpression on the RHS. For plus this is harmless but for minus this parses "foo - 4" as "foo - -4", effectively treating a top-level minus as a plus. Fixes https://github.com/llvm/llvm-project/issues/54105 Reviewed By: asb, MaskRay Differential Revision: https://reviews.llvm.org/D120635 (cherry picked from commit 6aa8521f)
-
Joseph Huber authored
Summary: This patch changes the ClangLinkerWrapper to use the executable path when searching for the lld binary. Previously we relied on the program name. Also not finding 'llvm-strip' is not considered an error anymore because it is an optional optimization. (cherry picked from commit 7ee8bd60)
-
Kelvin Li authored
Add the build directory to the search path for llvm-strip instead of solely relying on the PATH environment variable setting. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D118965 (cherry picked from commit 8ea4aed5)
-
Florian Hahn authored
Blocks with UnreachableInst terminators are considered as root nodes in the PDT. This pessimize DSE, if there are no aliasing reads from the potentially dead store and the block with the unreachable terminator. If any of the root nodes of the PDF has UnreachableInst as terminator, fall back to the CFG scan, even the common dominator of all killing blocks does not post-dominate the block with potentially dead store. It looks like the compile-time impact for the extra scans is negligible. https://llvm-compile-time-tracker.com/compare.php?from=779bbbf27fe631154bdfaac7a443f198d4654688&to=ac59945f1bec1c6a7d7f5590c8c69fd9c5369c53&stat=instructions Fixes #53800. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D119760
-
Nikita Popov authored
-
Alex Bradbury authored
[RISCV] Avoid infinite loop between DAGCombiner::visitMUL and RISCVISelLowering::transformAddImmMulImm See https://github.com/llvm/llvm-project/issues/53831 for a full discussion. The basic issue is that DAGCombiner::visitMUL and RISCVISelLowering;:transformAddImmMullImm get stuck in a loop, as the current checks in transformAddImmMulImm aren't sufficient to avoid all cases where DAGCombiner::isMulAddWithConstProfitable might trigger a transformation. This patch makes transformAddImmMulImm bail out if C0 (the constant used for multiplication) has more than one use. Differential Revision: https://reviews.llvm.org/D120332 (cherry picked from commit c5bcfb98)
-
Nikita Popov authored
We should not assume that the cet.h header exists just because we're on x86 linux. Only include it if __CET__ is defined. This makes the code more similar to what compiler-rt does in https://github.com/llvm/llvm-project/blob/ee423d93ead39e94c2970b3cc7ef6e6faa75d10b/compiler-rt/lib/builtins/assembly.h#L17 (though that one also has a __has_include() check -- I've not found that to be necessary). Differential Revision: https://reviews.llvm.org/D119697 (cherry picked from commit 2d2ef384)
-
David Sherwood authored
(cherry picked from commit dc065727)
-
David Sherwood authored
This patch fixes an invalid TypeSize->uint64_t implicit conversion in FoldReinterpretLoadFromConst. If the size of the constant is scalable we bail out of the optimisation for now. Tests added here: Transforms/InstCombine/load-store-forward.ll Differential Revision: https://reviews.llvm.org/D120240 (cherry picked from commit 47eff645)
-
Brendon Cahoon authored
A call to getInsertIndex() in getTreeCost() is returning None, which causes an assert because a non-constant index value for insertelement was not expected. This case occurs when the insertelement index value is defined with a PHI. Differential Revision: https://reviews.llvm.org/D120223 (cherry picked from commit 3cc15e2c)
-
Todd Mortimer authored
(cherry picked from commit bcbb0375)
-
Kadir Cetinkaya authored
Allocate on ASTContext, rather than just on heap, so that template parameter lists are freed up. Differential Revision: https://reviews.llvm.org/D120081 (cherry picked from commit 977b1f57)
-
Kadir Cetinkaya authored
Differential Revision: https://reviews.llvm.org/D120065 (cherry picked from commit c79c13ca)
-
Konstantin Varlamov authored
According to Linux documentation (see e.g. https://linux.die.net/man/3/closedir): > A successful call to `closedir()` also closes the underlying file > descriptor associated with `dirp`. Thus, calling `close()` after a successful call to `closedir()` is at best redundant. Worse, should a different thread open a file in-between the calls to `closedir()` and `close()` and get the same file descriptor, the call to `close()` might actually close a different file than was intended. rdar://89251874 Differential Revision: https://reviews.llvm.org/D120453 (cherry picked from commit 3906ebf7)
-
- Feb 26, 2022
-
-
Joao Moreira authored
https://github.com/ClangBuiltLinux/linux/issues/1606 When GNU_PROPERTY_X86_FEATURE_1_IBT is enabled, ld.lld will create .plt output section even if there is no PLT entry. Fix this by implementing IBTPltSection::isNeeded instead of using the default code path (which always returns true). Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D120600 (cherry picked from commit 9d7001eb)
-