Commit
ba37b144e6cf7ecaa7e6eb5bb34c02aeaa8a9e3c
by Jonas Devlieghere[LLDB] Skip test_launch_simple from TestTargetAPI.py when remote
|
 | lldb/test/API/python_api/target/TestTargetAPI.py |
Commit
250a167c41819aa5cedd290a29e4d3af4a9bafbe
by spatel[InstSimplify] avoid crashing by trying to rem-by-zero
Bug was noted in the post-commit comments for: rGe8760bb9a8a3
|
 | llvm/test/Transforms/InstSimplify/icmp-constant.ll |
 | llvm/lib/Analysis/InstructionSimplify.cpp |
Commit
f406a90a08c3993cd5bfd5e6a546165e55fec9b4
by Adrian PrantlAdd missing override to Makefile
|
 | lldb/test/API/macosx/macCatalystAppMacOSFramework/Makefile |
 | lldb/test/API/macosx/macCatalyst/Makefile |
Commit
8d943a928d254a25caa5a6d2f92f8719c92a9694
by snehasishk[NFC] Rename BBSectionsPrepare -> BasicBlockSections.
Rename the BBSectionsPrepare pass as suggested by the review comment in https://reviews.llvm.org/D85368.
Differential Revision: https://reviews.llvm.org/D85380
|
 | llvm/lib/CodeGen/BasicBlockSections.cpp |
 | llvm/include/llvm/InitializePasses.h |
 | llvm/lib/CodeGen/BBSectionsPrepare.cpp |
 | llvm/lib/CodeGen/CodeGen.cpp |
 | llvm/include/llvm/CodeGen/Passes.h |
 | llvm/lib/CodeGen/CMakeLists.txt |
 | llvm/lib/CodeGen/TargetPassConfig.cpp |
 | llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn |
Commit
87cba434027bf6ad370629f5b924ebd4543ddabc
by yhsBPF: add a SimplifyCFG IR pass during generic Scalar/IPO optimization
The following bpf linux kernel selftest failed with latest llvm: $ ./test_progs -n 7/10 ... The sequence of 8193 jumps is too complex. verification time 126272 usec stack depth 320 processed 114799 insns (limit 1000000) ... libbpf: failed to load object 'pyperf600_nounroll.o' test_bpf_verif_scale:FAIL:110 #7/10 pyperf600_nounroll.o:FAIL #7 bpf_verif_scale:FAIL
After some investigation, I found the following llvm patch https://reviews.llvm.org/D84108 is responsible. The patch disabled hoisting common instructions in SimplifyCFG by default. Later on, the code changes and a SimplifyCFG phase with hoisting on cannot do the work any more.
A test is provided to demonstrate the problem. The IR before simplifyCFG looks like: for.cond: %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ] %cmp = icmp ult i32 %i.0, 6 br i1 %cmp, label %for.body, label %for.cond.cleanup
for.cond.cleanup: %2 = load i8*, i8** %frame_ptr, align 8, !tbaa !2 %cmp2 = icmp eq i8* %2, null %conv = zext i1 %cmp2 to i32 call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %1) #3 call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %0) #3 ret i32 %conv
for.body: %3 = load i8*, i8** %frame_ptr, align 8, !tbaa !2 %tobool.not = icmp eq i8* %3, null br i1 %tobool.not, label %for.inc, label %land.lhs.true
The first two insns of `for.cond.cleanup` and `for.body`, load and icmp, can be hoisted to `for.cond` block. With Patch D84108, the optimization is delayed. But unfortunately, later on loop rotation added addition phi nodes to `for.body` and hoisting cannot be done any more.
Note such a hoisting is beneficial to bpf programs as bpf verifier does path sensitive analysis and verification. The hoisting preverts reloading from stack which will assume conservative value and increase exploited insns. In this case, it caused verifier failure.
To fix this problem, I added an IR pass from bpf target to performance additional simplifycfg with hoisting common inst enabled.
Differential Revision: https://reviews.llvm.org/D85434
|
 | llvm/lib/Target/BPF/LLVMBuild.txt |
 | llvm/test/CodeGen/BPF/simplifycfg.ll |
 | llvm/lib/Target/BPF/BPFTargetMachine.h |
 | llvm/lib/Target/BPF/BPFTargetMachine.cpp |
Commit
e1cad4234cf3a3d0747c140e135e413ece22cf63
by craig.topper[X86] Make getX86TargetCPU return std::string instead of const char *. Remove call to MakeArgString. NFCI
I believe this function used to be called directly from X86 specific code and was used to immediately create -target-cpu command line. A later refactoring changed it to to be called from a generic getCPU function that returns std::string. So on some paths we created a string using MakeArgString converted that to std::string then called MakeArgString again from that.
Instead just return std::string directly like the other targets.
|
 | clang/lib/Driver/ToolChains/Arch/X86.h |
 | clang/lib/Driver/ToolChains/Arch/X86.cpp |
Commit
4df38a5589f6fa23e161a76bdaa3180ad053791e
by craig.topper[X86] Optimize out a few extra strlen calls in getX86TargetCPU. NFCI
We had a conversion from const char * to StringRef and const char * to std::string conversion. These both do their own strlen call if the compiler doens't figure out how to share them. By adding the temporary StringRef we can convert it to std::string instead.
The other case is to use a StringSwitch<StringRef> instead of StringSwitch<const char *> since the output values of the switch are string literals. This allows the length to be computed at compile time. Otherwise we have to convert from const char * to std::string after the StringSwitch.
|
 | clang/lib/Driver/ToolChains/Arch/X86.cpp |
Commit
ffc248f3b88cd6a0153d23660727b45dde8f27b5
by craig.topper[LegalTypes] Move VSELECT node creation out of WidenVSELECTAndMask and push to 2 of the 3 callers.
One of the callers only wants the condition, but the vselect can be simplified by getNode making it hard or impossible to retrieve the condition.
Instead, return the condition and make the other 2 callers responsible for creating the vselect node using the condition. Rename the function to WidenVSELECTMask accordingly.
Differential Revision: https://reviews.llvm.org/D85468
|
 | llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp |
 | llvm/test/CodeGen/SystemZ/pr47019.ll |
 | llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp |
 | llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h |
 | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp |
Commit
d6492d874478b1d3b1ce3adb4c3044618bec29e9
by richardAdd -Wtautological-value-range-compare warning.
This warning diagnoses cases where an expression is compared to a constant, and the comparison is tautological due to the form of the expression (but not merely due to its type). This applies in cases such as comparisons of bit-fields and the result of bit-masks.
The new warning is added to the Clang diagnostic group -Wtautological-constant-in-range-compare but not to the formerly-equivalent GCC-compatibility diagnostic group -Wtype-limits, which retains its old meaning of diagnosing only tautological comparisons to extremal values of a type (eg, int > INT_MAX).
Reviewed By: rtrieu
Differential Revision: https://reviews.llvm.org/D85256
|
 | clang/include/clang/Basic/DiagnosticSemaKinds.td |
 | clang/test/Sema/tautological-constant-compare.c |
 | clang/include/clang/Basic/DiagnosticGroups.td |
 | clang/lib/Sema/SemaChecking.cpp |
Commit
0fa520af6734c5f1fab80629337e3f08fd8770db
by Adrian PrantlUnify the code that updates the ArchSpec after finding a fat binary with how it is done for a lean binary
In particular this affects how target create --arch is handled — it allowed us to override the deployment target (a useful feature for the expression evaluator), but the fat binary case didn't.
rdar://problem/66024437
Differential Revision: https://reviews.llvm.org/D85049
(cherry picked from commit 470bdd3caaab0b6e0ffed4da304244be40b78668)
|
 | lldb/source/Target/TargetList.cpp |
 | lldb/test/API/macosx/universal/Makefile |
 | lldb/test/API/macosx/universal/TestUniversal.py |
Commit
1c21635c94df0e680cbb0797a64d09a63f619fc0
by lebedev.ri[NFC][InstCombine] Tests for x s/EXACT (-1 << y) pattern
|
 | llvm/test/Transforms/InstCombine/sdiv-exact-by-negative-power-of-two.ll |
Commit
8633a0d985f1abc8f81dba5f699d5df627e6a9f1
by lebedev.ri[NFC][InstCombine] Better tests for x s/EXACT (1 << y) pattern
|
 | llvm/test/Transforms/InstCombine/sdiv-exact-by-power-of-two.ll |
Commit
442cb88f5344560e49fab681a9c909654d85fcc7
by lebedev.ri[InstCombine] Generalize sdiv exact X, 1<<C --> ashr exact X, C fold to handle non-splat vectors
|
 | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp |
 | llvm/test/Transforms/InstCombine/sdiv-exact-by-power-of-two.ll |
Commit
47aec80e4afc8e3746e09f4c9d309cf8941f68cc
by lebedev.ri[NFC][InstCombine] Negator: add a comment about negating exact arithmentic shift
|
 | llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp |
Commit
7ce76b06ec908a85205d4dc7af6e73d5ecc26251
by lebedev.ri[InstCombine] Fold sdiv exact X, -1<<C --> -(ashr exact X, C)
While that does increases instruction count, shift is obviously better than a division.
Name: base Pre: (1<<C1) >= 0 %o0 = shl i8 1, C1 %r = sdiv exact i8 C0, %o0 => %r = ashr exact i8 C0, C1
Name: neg %o0 = shl i8 -1, C1 %r = sdiv exact i8 C0, %o0 => %t0 = ashr exact i8 C0, C1 %r = sub i8 0, %t0
Name: reverse Pre: C1 != 0 && C1 u< 8 %t0 = ashr exact i8 C0, C1 %r = sub i8 0, %t0 => %o0 = shl i8 -1, C1 %r = sdiv exact i8 C0, %o0
https://rise4fun.com/Alive/MRplf
|
 | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp |
 | llvm/test/Transforms/InstCombine/sdiv-exact-by-negative-power-of-two.ll |
Commit
a404acb86af7d62390a2599bb86bba2c5f840f68
by lebedev.ri[NFC][InstCombine] Add some more tests for negation sinking into mul
|
 | llvm/test/Transforms/InstCombine/sub-of-negatible.ll |
 | llvm/test/Transforms/InstCombine/mul.ll |
Commit
0c1c756a31536666a7b6f5bdb744dbce923a0c9e
by lebedev.ri[InstCombine] Generalize %x * (-1<<C) --> (-%x) * (1<<C) fold
Multiplication is commutative, and either of operands can be negative, so if the RHS is a negated power-of-two, we should try to make it true power-of-two (which will allow us to turn it into a left-shift), by trying to sink the negation down into LHS op.
But, we shouldn't re-invent the logic for sinking negation, let's just use Negator for that.
Tests and original patch by: Simon Pilgrim @RKSimon!
Differential Revision: https://reviews.llvm.org/D85446
|
 | llvm/test/Transforms/InstCombine/mul.ll |
 | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp |
Commit
be02adfad7acf8040ad025b58052b3838db7e23b
by lebedev.ri[InstCombine] Fold (x + C1) * (-1<<C2) --> (-C1 - x) * (1<<C2)
Negator knows how to do this, but the one-use reasoning is getting a bit muddy here, we don't really want to increase instruction count, so we need to both lie that "IsNegation" and have an one-use check on the outermost LHS value.
|
 | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp |
 | llvm/test/Transforms/InstCombine/mul.ll |
Commit
f81bae9ff42f760ed4e3d8f7314a7aee2effe6aa
by llvm-project[flang][msvc] Do not use gcc/clang command line options for msvc.
The command line options `-Wno-error` and `-Wno-unused-parameter` are specific to gcc/clang, do not use them when compiling with other compilers.
This patch is part of the series to [[ http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html | make flang compilable with MS Visual Studio ]].
Reviewed By: isuruf
Differential Revision: https://reviews.llvm.org/D85355
|
 | flang/lib/Optimizer/CMakeLists.txt |
 | flang/lib/Lower/CMakeLists.txt |