#
d346a377 |
| 25-Jun-2016 |
David Majnemer <david.majnemer@gmail.com> |
[SimplifyCFG] Stop inserting calls to llvm.trap for UB
SimplifyCFG had logic to insert calls to llvm.trap for two very particular IR patterns: stores and invokes of undef/null.
While InstCombine ca
[SimplifyCFG] Stop inserting calls to llvm.trap for UB
SimplifyCFG had logic to insert calls to llvm.trap for two very particular IR patterns: stores and invokes of undef/null.
While InstCombine canonicalizes certain undefined behavior IR patterns to stores of undef, phase ordering means that this cannot be relied upon in general.
There are much better tools than llvm.trap: UBSan and ASan.
N.B. I could be argued into reverting this change if a clear argument as to why it is important that we synthesize llvm.trap for stores, I'd be hard pressed to see why it'd be useful for invokes...
llvm-svn: 273778
show more ...
|
#
1fea77c6 |
| 25-Jun-2016 |
David Majnemer <david.majnemer@gmail.com> |
[SimplifyCFG] Replace calls to null/undef with unreachable
Calling null is undefined behavior, a call to undef can be trivially treated as a call to null.
llvm-svn: 273776
|
#
b8da3a2b |
| 25-Jun-2016 |
David Majnemer <david.majnemer@gmail.com> |
Reinstate r273711
r273711 was reverted by r273743. The inliner needs to know about any call sites in the inlined function. These were obscured if we replaced a call to undef with an undef but kept
Reinstate r273711
r273711 was reverted by r273743. The inliner needs to know about any call sites in the inlined function. These were obscured if we replaced a call to undef with an undef but kept the call around.
This fixes PR28298.
llvm-svn: 273753
show more ...
|
#
ae2ef4cc |
| 24-Jun-2016 |
Nico Weber <nicolasweber@gmx.de> |
Revert r273711, it caused PR28298.
llvm-svn: 273743
|
#
3b3e954e |
| 24-Jun-2016 |
David Majnemer <david.majnemer@gmail.com> |
SimplifyInstruction does not imply DCE
We cannot remove an instruction with no uses just because SimplifyInstruction succeeds. It may have side effects.
llvm-svn: 273711
|
#
3feda222 |
| 18-Jun-2016 |
Marcin Koscielnicki <koriakin@0x04.net> |
[sanitizers] Disable target-specific lowering of string functions.
CodeGen has hooks that allow targets to emit specialized code instead of calls to memcmp, memchr, strcpy, stpcpy, strcmp, strlen, s
[sanitizers] Disable target-specific lowering of string functions.
CodeGen has hooks that allow targets to emit specialized code instead of calls to memcmp, memchr, strcpy, stpcpy, strcmp, strlen, strnlen. When ASan/MSan/TSan/ESan is in use, this sidesteps its interceptors, resulting in uninstrumented memory accesses. To avoid that, make these sanitizers mark the calls as nobuiltin.
Differential Revision: http://reviews.llvm.org/D19781
llvm-svn: 273083
show more ...
|
#
72d961a1 |
| 16-Jun-2016 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
[safestack] Fixup llvm.dbg.value when rewriting unsafe allocas.
When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are updated to refer to the new location.
This change does the
[safestack] Fixup llvm.dbg.value when rewriting unsafe allocas.
When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are updated to refer to the new location.
This change does the same to dbg.value intrinsics.
llvm-svn: 272968
show more ...
|
#
87f0d0e1 |
| 16-Jun-2016 |
Igor Laevsky <igmyrj@gmail.com> |
Revert r272891 "[JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo"
It was causing failures in Profile-i386 and Profile-x86_64 tests.
llvm-svn: 272912
|
#
c9179fd2 |
| 16-Jun-2016 |
Igor Laevsky <igmyrj@gmail.com> |
[JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo
We should update results of the BranchProbabilityInfo after removing block in JumpThreading. Otherwise we will get danglin
[JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo
We should update results of the BranchProbabilityInfo after removing block in JumpThreading. Otherwise we will get dangling pointer inside BranchProbabilityInfo cache.
Differential Revision: http://reviews.llvm.org/D20957
llvm-svn: 272891
show more ...
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
e5819e27 |
| 26-May-2016 |
Chad Rosier <mcrosier@codeaurora.org> |
[InstCombine] Catch more bswap cases missed due to zext and truncs.
Fixes PR27824. Differential Revision: http://reviews.llvm.org/D20591.
llvm-svn: 270853
|
#
a00df49d |
| 25-May-2016 |
Chad Rosier <mcrosier@codeaurora.org> |
Clarify that we match BSwap in InstCombine and BitReverse in CGP. NFC.
Also, rename recognizeBitReverseOrBSwapIdiom to recognizeBSwapOrBitReverseIdiom, so the ordering of the MatchBSwaps and MatchBi
Clarify that we match BSwap in InstCombine and BitReverse in CGP. NFC.
Also, rename recognizeBitReverseOrBSwapIdiom to recognizeBSwapOrBitReverseIdiom, so the ordering of the MatchBSwaps and MatchBitReversals arguments are consistent with the function name.
llvm-svn: 270715
show more ...
|
#
56def258 |
| 21-May-2016 |
Chad Rosier <mcrosier@codeaurora.org> |
Fix 80-column violation.
llvm-svn: 270329
|
#
bca59d2a |
| 02-May-2016 |
Reid Kleckner <rnk@google.com> |
Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics"
This reverts commit r268254.
This change causes assertion failures while building
Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics"
This reverts commit r268254.
This change causes assertion failures while building Chromium. Reduced test case coming soon.
llvm-svn: 268288
show more ...
|
#
b7599329 |
| 02-May-2016 |
Hans Wennborg <hans@hanshq.net> |
[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics
Make it possible that TryToSimplifyUncondBranchFromEmptyBlock merges empty basic block incl
[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics
Make it possible that TryToSimplifyUncondBranchFromEmptyBlock merges empty basic block including lifetime intrinsics as well as phi nodes and unconditional branch into its successor or predecessor(s).
If successor of empty block has single predecessor, all contents including lifetime intrinsics are sinked into the successor. Otherwise, they are hoisted into its predecessor(s) and then merged into the predecessor(s).
Patch by Josh Yoon <josh.yoon@samsung.com>!
Differential Revision: http://reviews.llvm.org/D19257
llvm-svn: 268254
show more ...
|
#
107aefc2 |
| 29-Apr-2016 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Mark guards on true as "trivially dead"
This moves some logic added to EarlyCSE in rL268120 into `llvm::isInstructionTriviallyDead`. Adds a test case for DCE to demonstrate that passes other than E
Mark guards on true as "trivially dead"
This moves some logic added to EarlyCSE in rL268120 into `llvm::isInstructionTriviallyDead`. Adds a test case for DCE to demonstrate that passes other than EarlyCSE can now pick up on the new information.
llvm-svn: 268126
show more ...
|
#
e4c0c167 |
| 26-Apr-2016 |
Hal Finkel <hfinkel@anl.gov> |
[SimplifyCFG] Preserve !llvm.mem.parallel_loop_access when merging
When SimplifyCFG merges identical instructions from both sides of a diamond, it can preserve !llvm.mem.parallel_loop_access (as it
[SimplifyCFG] Preserve !llvm.mem.parallel_loop_access when merging
When SimplifyCFG merges identical instructions from both sides of a diamond, it can preserve !llvm.mem.parallel_loop_access (as it does with most of the other metadata). There's no real data or control dependency change in this case.
llvm-svn: 267515
show more ...
|
#
54a3a006 |
| 21-Apr-2016 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[SimplifyCFG] Fold `llvm.guard(false)` to unreachable
Summary: `llvm.guard(false)` always bails out of the current compilation unit, so we can prune any control flow following it.
Reviewers: hfinke
[SimplifyCFG] Fold `llvm.guard(false)` to unreachable
Summary: `llvm.guard(false)` always bails out of the current compilation unit, so we can prune any control flow following it.
Reviewers: hfinkel, pcc, reames
Subscribers: majnemer, reames, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19245
llvm-svn: 266955
show more ...
|
#
d4c78333 |
| 25-Mar-2016 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[RS4GC] Lower calls to @llvm.experimental.deoptimize
This changes RS4GC to lower calls to ``@llvm.experimental.deoptimize`` to gc.statepoints wrapping ``__llvm_deoptimize``, and changes ``callsGCLea
[RS4GC] Lower calls to @llvm.experimental.deoptimize
This changes RS4GC to lower calls to ``@llvm.experimental.deoptimize`` to gc.statepoints wrapping ``__llvm_deoptimize``, and changes ``callsGCLeafFunction`` to recognize ``@llvm.experimental.deoptimize`` as a non GC leaf function.
I've had to hard code the ``"__llvm_deoptimize"`` name in RewriteStatepointsForGC; since ``TargetLibraryInfo`` is available only during codegen. This isn't without precedent in the codebase, so I'm not overtly concerned.
llvm-svn: 264456
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3 |
|
#
e9bc579c |
| 21-Feb-2016 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
ADT: Remove == and != comparisons between ilist iterators and pointers
I missed == and != when I removed implicit conversions between iterators and pointers in r252380 since they were defined outsid
ADT: Remove == and != comparisons between ilist iterators and pointers
I missed == and != when I removed implicit conversions between iterators and pointers in r252380 since they were defined outside ilist_iterator.
Since they depend on getNodePtrUnchecked(), they indirectly rely on UB. This commit removes all uses of these operators. (I'll delete the operators themselves in a separate commit so that it can be easily reverted if necessary.)
There should be NFC here.
llvm-svn: 261498
show more ...
|
#
a5b2a649 |
| 17-Feb-2016 |
Adrian Prantl <aprantl@apple.com> |
Debug Info: Teach LdStHasDebugValue() (Local.cpp) about DIExpressions. This function is used to check whether a dbg.value intrinsic has already been inserted, but without comparing the DIExpression,
Debug Info: Teach LdStHasDebugValue() (Local.cpp) about DIExpressions. This function is used to check whether a dbg.value intrinsic has already been inserted, but without comparing the DIExpression, it would erroneously fire on split aggregates and only the first scalar would survive.
Found via http://reviews.llvm.org/D16867. <rdar://problem/24456528>
llvm-svn: 261145
show more ...
|
Revision tags: llvmorg-3.8.0-rc2 |
|
#
b30f2f51 |
| 30-Jan-2016 |
Matthias Braun <matze@braunis.de> |
Avoid overly large SmallPtrSet/SmallSet
These sets perform linear searching in small mode so it is never a good idea to use SmallSize/N bigger than 32.
llvm-svn: 259283
|
#
88542a0a |
| 24-Jan-2016 |
David Majnemer <david.majnemer@gmail.com> |
[SCCP] Remove duplicate code
SCCP has code identical to changeToUnreachable's behavior, switch it over to just call changeToUnreachable.
No functionality change intended.
llvm-svn: 258654
|
#
35c46d3e |
| 24-Jan-2016 |
David Majnemer <david.majnemer@gmail.com> |
[InstCombine, SCCP] Consolidate code used to remove instructions
InstCombine and SCCP both want to remove dead code in a very particular way but using identical means to do so. Share the code betwe
[InstCombine, SCCP] Consolidate code used to remove instructions
InstCombine and SCCP both want to remove dead code in a very particular way but using identical means to do so. Share the code between the two.
No functionality change is intended.
llvm-svn: 258653
show more ...
|
#
4d7257df |
| 21-Jan-2016 |
David L Kreitzer <david.l.kreitzer@intel.com> |
Fix for two constant propagation problems in GVN with the assume intrinsic instruction.
Patch by Yuanrui Zhang.
Differential Revision: http://reviews.llvm.org/D16100
llvm-svn: 258435
|
Revision tags: llvmorg-3.8.0-rc1 |
|
#
ac03dca4 |
| 15-Jan-2016 |
James Y Knight <jyknight@google.com> |
Stop increasing alignment of externally-visible globals on ELF platforms.
With ELF, the alignment of a global variable in a shared library will get copied into an executables linked against it, if t
Stop increasing alignment of externally-visible globals on ELF platforms.
With ELF, the alignment of a global variable in a shared library will get copied into an executables linked against it, if the executable even accesss the variable. So, it's not possible to implicitly increase alignment based on access patterns, or you'll break existing binaries.
This happened to affect libc++'s std::cout symbol, for example. See thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311
(This is a re-commit of r257719, without the bug reported in PR26144. I've tweaked the code to not assert-fail in enforceKnownAlignment when computeKnownBits doesn't recurse far enough to find the underlying Alloca/GlobalObject value.)
Differential Revision: http://reviews.llvm.org/D16145
llvm-svn: 257902
show more ...
|