- Sep 22, 2020
-
-
Martin Storsjö authored
When cross compiling with clang-cl, clang splits the INCLUDE env variable around semicolons (clang/lib/Driver/ToolChains/MSVC.cpp, MSVCToolChain::AddClangSystemIncludeArgs) and lld splits the LIB variable similarly (lld/COFF/Driver.cpp, LinkerDriver::addLibSearchPaths). Therefore, the consensus for cross compilation with clang-cl and lld-link seems to be to use semicolons, despite path lists normally being separated by colons on unix and EnvPathSeparator being set to that. Therefore, handle the LIB variable similarly in Clang, when handling lib file arguments when driving linking via Clang. This fixes commands like "clang-cl test.c -Fetest.exe kernel32.lib" in a cross compilation setting. Normally, most users call (lld-)link directly, but meson happens to use this command syntax for has_function() tests. Differential Revision: https://reviews.llvm.org/D88002
-
Martin Storsjö authored
GCC 8 changed behaviour wrt this, and made it consistent for cross compilation cases. While it's a change, it's a more sensible behaviour going forward. Differential Revision: https://reviews.llvm.org/D88005
-
Chris Hamilton authored
Added support for GNU named variadic macros in macro expansion for plist generation. Fix for https://bugs.llvm.org/show_bug.cgi?id=44493 Reviewed By: Szelethus Differential Revision: https://reviews.llvm.org/D87942
-
Sanjay Patel authored
We were already using this code pattern right after the loop, so this makes it consistent.
-
Matt Arsenault authored
We no longer treat the frame register like a function argument, so the problem this avoided is no longer relevant.
-
Stephen Neuendorffer authored
-
Matt Arsenault authored
This reverts commit dbd53a1f. Needed lldb test updates
-
Zequan Wu authored
Differential Revision: https://reviews.llvm.org/D84988
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Louis Dionne authored
This allows diagnosing missing substitution issues even when doing availability feature detection in the DSL.
-
Arthur Eubanks authored
This pass is like DeadCodeEliminationPass, but only does one pass through a function instead of iterating on users of eliminated instructions. DeadCodeEliminationPass should be used in all cases. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D87933
-
Roman Lebedev authored
-
Fangrui Song authored
[ELF][test] Delete large temporary files and make some temporary files smaller with two text segments Large files are cumbersome on some filesystems and can more easily trigger ENOSPC. Some tests use two text sections with output section addresses to test branch ranges. Use two text segments to prevent LLD from filling the gap and unnecessarily increasing the output size. With this change, there is no test/ELF temporary file larger than 100MiB. Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D88037
-
Stanislav Mekhanoshin authored
-
Reid Kleckner authored
This updates the C++ ABI argument classification code to use the logic from D72114, fixing an ABI incompatibility with MSVC. Part of PR44395. Differential Revision: https://reviews.llvm.org/D87923
-
jerryyin authored
check-mlir target run tests simultaneously with multiple threads. This caused multiple threads to invoke the `lld::elf::link()` interface at the same time. Since the interface does not have a thread-safe implementation, add a metex to prevent multi-threaded access. I discovered this by looking the the failure stack trace. lld/ELF/symbolTable.cpp, SymbolTable::insert() hit into an assert with related to Epoch Trackers. The root cause is to due to there is no protection around the symMap (update) which is implemented in non-thread safe data structure: denseMap. Differential Revision: https://reviews.llvm.org/D88038
-
Arthur Eubanks authored
Mistakenly removed initialization of `Changed` in https://reviews.llvm.org/D87806.
-
David Tenty authored
Reviewed By: jasonliu Differential Revision: https://reviews.llvm.org/D87914
-
Sanjay Patel authored
-
Sanjay Patel authored
This reduces code duplication for common construct. Follow-ups can use this in SLP, LoopVectorizer, and other passes.
-
Ye Luo authored
If an error code can not be recognized by cuGetErrorString, errStr remains null and causes crashing at DP() printing. Protect this case. Reviewed By: jhuber6, tianshilei1992 Differential Revision: https://reviews.llvm.org/D87980
-
Roman Lebedev authored
---------------------------------------- define i32 @src(i32 %x, i32 %y) { %0: %r = uadd_sat i32 %x, %y ret i32 %r } => define i32 @tgt(i32 %x, i32 %y) { %0: %t0 = sub nsw nuw i32 4294967295, %y %t1 = umin i32 %x, %t0 %r = add nuw i32 %t1, %y ret i32 %r } Transformation seems to be correct! The alternative, naive, lowering could be the following, although i don't think it's better, thought it will likely be needed for sadd/ssub/*shl: ---------------------------------------- define i32 @src(i32 %x, i32 %y) { %0: %r = uadd_sat i32 %x, %y ret i32 %r } => define i32 @tgt(i32 %x, i32 %y) { %0: %t0 = zext i32 %x to i33 %t1 = zext i32 %y to i33 %t2 = add nuw i33 %t0, %t1 %t3 = zext i32 4294967295 to i33 %t4 = umin i33 %t2, %t3 %r = trunc i33 %t4 to i32 ret i32 %r } Transformation seems to be correct! -
Roman Lebedev authored
---------------------------------------- define i32 @src(i32 %x, i32 %y) { %0: %r = usub_sat i32 %x, %y ret i32 %r } => define i32 @tgt(i32 %x, i32 %y) { %0: %t0 = umin i32 %x, %y %r = sub nuw i32 %x, %t0 ret i32 %r } Transformation seems to be correct! -
Roman Lebedev authored
-
Roman Lebedev authored
As per alive2 (ignoring undef): ---------------------------------------- define i32 @src(i32 %x, i1 %y) { %0: %r = abs i32 %x, 0 ret i32 %r } => define i32 @tgt(i32 %x, i1 %y) { %0: %neg_x = mul i32 %x, 4294967295 %r = smax i32 %x, %neg_x ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @src(i32 %x, i1 %y) { %0: %r = abs i32 %x, 1 ret i32 %r } => define i32 @tgt(i32 %x, i1 %y) { %0: %neg_x = mul nsw i32 %x, 4294967295 %r = smax i32 %x, %neg_x ret i32 %r } Transformation seems to be correct! -
Roman Lebedev authored
-
Simon Pilgrim authored
Also rename some existing loops that used a 'j' iterator to consistently use 'V'.
-
Dave Lee authored
Configure default value of `LLVM_ENABLE_WARNINGS` in `HandleLLVMOptions.cmake`. `LLVM_ENABLE_WARNINGS` is documented as ON by default, but `HandleLLVMOptions` assumes the default has been set somewhere else. If it has not been explicitly set, then `HandleLLVMOptions` implicitly uses OFF as a default. This removes the various `option()` declarations in favor of a single declaration in `HandleLLVMOptions`. This will prevent the unwanted use of `-w` that is mentioned in a couple of the comments. Reviewed By: DavidTruby, #libunwind, JDevlieghere, compnerd Differential Revision: https://reviews.llvm.org/D87243
-
Dave Lee authored
Update the some examples in the help string for `breakpoint command add`. Python breakpoint commands have different output than what's shown in the help string. Notes: * Removed an example containing an inner function, as it seems more about a Python technique than about `command script add` * Updated `print x` to `print(x)` to be python 2/3 agnostic Differential Revision: https://reviews.llvm.org/D87807
-
Sriraman Tallam authored
The wrong placement of add pass with optimizations led to -funique-internal-linkage-names being disabled. Fixed the placement of the MPM.addpass for UniqueInternalLinkageNames to make it work correctly with -O2 and new pass manager. Updated the tests to explicitly check O0 and O2. Previously, the addPass was placed before BackendUtil.cpp#L1373 which is wrong as MPM gets assigned at this point and any additions to the pass vector before this is wrong. This change just moves it after MPM is assigned and places it at a point where O0 and O0+ can share it. Differential Revision: https://reviews.llvm.org/D87921
-
Sanjay Patel authored
The implementation of gather() should be reduced too, but this change by itself makes things a little clearer: we don't try to gather to a different type or number-of-values than whatever is passed in as the value list itself.
-
Simon Pilgrim authored
-
Florian Hahn authored
-
Arthur Eubanks authored
Similar to https://reviews.llvm.org/D86178. This is a module pass instead of a function pass since ARCRuntimeEntryPoints can lazily add function declarations. Reviewed By: ahatanak Differential Revision: https://reviews.llvm.org/D87806
-
Momchil Velikov authored
security boundary It was never supported and that part was accidentally omitted when upstreaming D76518. Differential Revision: https://reviews.llvm.org/D86478 Change-Id: If6ba9506eb0431c87a1d42a38aa60e47ce263039
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Raul Tambre authored
In case further such cases appear in the future we've got a generic function to add them to. Additionally changed the ObjC special case to check the language and the identifier builtin ID instead of the name. Addresses the cleanup suggestion from D87917. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D87983
-
- Sep 21, 2020
-
-
Igor Kudrin authored
The variable is true when frame pointers should be omitted in leaf functions, not kept. Differential Revision: https://reviews.llvm.org/D88021
-