#
580bc3c8 |
| 13-Dec-2017 |
Brian M. Rzycki <brzycki@gmail.com> |
Reverting [JumpThreading] Preservation of DT and LVI across the pass
Stage 2 bootstrap failed: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/14434
llvm-svn: 320641
|
#
d989af98 |
| 13-Dec-2017 |
Brian M. Rzycki <brzycki@gmail.com> |
[JumpThreading] Preservation of DT and LVI across the pass
Summary: See D37528 for a previous (non-deferred) version of this patch and its description.
Preserves dominance in a deferred manner usin
[JumpThreading] Preservation of DT and LVI across the pass
Summary: See D37528 for a previous (non-deferred) version of this patch and its description.
Preserves dominance in a deferred manner using a new class DeferredDominance. This reduces the performance impact of updating the DominatorTree at every edge insertion and deletion. A user may call DDT->flush() within JumpThreading for an up-to-date DT. This patch currently has one flush() at the end of runImpl() to ensure DT is preserved across the pass.
LVI is also preserved to help subsequent passes such as CorrelatedValuePropagation. LVI is simpler to maintain and is done immediately (not deferred). The code to perfom the preversation was minimally altered and was simply marked as preserved for the PassManager to be informed.
This extends the analysis available to JumpThreading for future enhancements. One example is loop boundary threading.
Reviewers: dberlin, kuhar, sebpop
Reviewed By: kuhar, sebpop
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D40146
llvm-svn: 320612
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
#
d60f34c2 |
| 01-Nov-2017 |
Adrian Prantl <aprantl@apple.com> |
loop-rotate: eliminate duplicate debug intrinsics after splicing.
Fixes part of PR35113.
This reapplies r317105 with an additional check for isa<Instruction> as found by the bots.
llvm-svn: 317120
|
#
c8516346 |
| 01-Nov-2017 |
Adrian Prantl <aprantl@apple.com> |
Revert r317105 to investigate bot breakage.
llvm-svn: 317110
|
#
b627acd0 |
| 01-Nov-2017 |
Adrian Prantl <aprantl@apple.com> |
loop-rotate: eliminate duplicate debug intrinsics after splicing.
Fixes part of PR35113.
llvm-svn: 317105
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
57bd5a02 |
| 27-Oct-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 316724
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2 |
|
#
e6bca0ee |
| 01-May-2017 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Rename WeakVH to WeakTrackingVH; NFC
This relands r301424.
llvm-svn: 301812
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
2cbeb00f |
| 26-Apr-2017 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Reverts commit r301424, r301425 and r301426
Commits were:
"Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts" "Add a new WeakVH value handle; NFC" "Rename WeakVH to WeakTracking
Reverts commit r301424, r301425 and r301426
Commits were:
"Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts" "Add a new WeakVH value handle; NFC" "Rename WeakVH to WeakTrackingVH; NFC"
The changes assumed pointers are 8 byte aligned on all architectures.
llvm-svn: 301429
show more ...
|
#
01de5577 |
| 26-Apr-2017 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Rename WeakVH to WeakTrackingVH; NFC
Summary: I plan to use WeakVH to mean "nulls itself out on deletion, but does not track RAUW" in a subsequent commit.
Reviewers: dblaikie, davide
Reviewed By:
Rename WeakVH to WeakTrackingVH; NFC
Summary: I plan to use WeakVH to mean "nulls itself out on deletion, but does not track RAUW" in a subsequent commit.
Reviewers: dblaikie, davide
Reviewed By: davide
Subscribers: arsenm, mehdi_amini, mcrosier, mzolotukhin, jfb, llvm-commits, nhaehnle
Differential Revision: https://reviews.llvm.org/D32266
llvm-svn: 301424
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4 |
|
#
811de8a6 |
| 06-Mar-2017 |
Michael Kruse <llvm@meinersbur.de> |
[BasicBlockUtils] Check for nullptr before updating LoopInfo.
LoopInfo::getLoopFor returns nullptr if a BB is not in a loop and only then can the loop be updated to contain the newly created BBs. Ad
[BasicBlockUtils] Check for nullptr before updating LoopInfo.
LoopInfo::getLoopFor returns nullptr if a BB is not in a loop and only then can the loop be updated to contain the newly created BBs. Add the missing nullptr check to SplitBlockAndInsertIfThen.
Within LLVM, the only user of this function that also passes a LoopInfo to be updated is InnerLoopVectorizer::predicateInstructions(). As the method's name implies, the BB operataten on will always be within a loop, but out-of-tree users may also use it differently (here: Polly).
All other uses of LoopInfo::getLoopFor in the file properly check its return value for nullptr.
llvm-svn: 297016
show more ...
|
Revision tags: llvmorg-4.0.0-rc3 |
|
#
2e945ebb |
| 14-Feb-2017 |
Taewook Oh <twoh@fb.com> |
[BasicBlockUtils] Use getFirstNonPHIOrDbg to set debugloc for instructions created in SplitBlockPredecessors
Summary: When setting debugloc for instructions created in SplitBlockPredecessors, curren
[BasicBlockUtils] Use getFirstNonPHIOrDbg to set debugloc for instructions created in SplitBlockPredecessors
Summary: When setting debugloc for instructions created in SplitBlockPredecessors, current implementation copies debugloc from the first-non-phi instruction of the original basic block. However, if the first-non-phi instruction is a call for @llvm.dbg.value, the debugloc of the instruction may point the location outside of the block itself. For the example code of
``` 1 typedef struct _node_t { 2 struct _node_t *next; 3 } node_t; 4 5 extern node_t *root; 6 7 int foo() { 8 node_t *node, *tmp; 9 int ret = 0; 10 11 node = tmp = root->next; 12 while (node != root) { 13 while (node) { 14 tmp = node; 15 node = node->next; 16 ret++; 17 } 18 } 19 20 return ret; 21 } ```
, below is the basicblock corresponding to line 12 after Reassociate expressions pass:
``` while.cond: ; preds = %while.cond2, %entry %node.0 = phi %struct._node_t* [ %1, %entry ], [ null, %while.cond2 ] %ret.0 = phi i32 [ 0, %entry ], [ %ret.1, %while.cond2 ] tail call void @llvm.dbg.value(metadata i32 %ret.0, i64 0, metadata !19, metadata !20), !dbg !21 tail call void @llvm.dbg.value(metadata %struct._node_t* %node.0, i64 0, metadata !11, metadata !20), !dbg !31 %cmp = icmp eq %struct._node_t* %node.0, %0, !dbg !33 br i1 %cmp, label %while.end5, label %while.cond2, !dbg !35 ```
As you can see, the first-non-phi instruction is a call for @llvm.dbg.value, and the debugloc is
``` !21 = !DILocation(line: 9, column: 7, scope: !6) ```
, which is a definition of 'ret' variable and outside of the scope of the basicblock itself. However, current implementation picks up this debugloc for the instructions created in SplitBlockPredecessors. This patch addresses this problem by picking up debugloc from the first-non-phi-non-dbg instruction.
Reviewers: dblaikie, samsonov, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29867
llvm-svn: 295106
show more ...
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1 |
|
#
135f735a |
| 26-Jun-2016 |
Benjamin Kramer <benny.kra@googlemail.com> |
Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.
Only minor manual fixes. No functionality change intended.
llvm-svn: 273808
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
85ce0f1f |
| 23-Apr-2016 |
Sanjay Patel <spatel@rotateright.com> |
improve documentation comments; NFC
llvm-svn: 267292
|
#
fdb20595 |
| 15-Mar-2016 |
Adam Nemet <anemet@apple.com> |
[LV] Preserve LoopInfo when store predication is used
This was a latent bug that got exposed by the change to add LoopSimplify as a dependence to LoopLoadElimination. Since LoopInfo was corrupted a
[LV] Preserve LoopInfo when store predication is used
This was a latent bug that got exposed by the change to add LoopSimplify as a dependence to LoopLoadElimination. Since LoopInfo was corrupted after LV, LoopSimplify mis-compiled nbench in the test-suite (more details in the PR).
The problem was that when we create the blocks for predicated stores we didn't add those to any loops.
The original testcase for store predication provides coverage for this assuming we verify LI on the way out of LV.
Fixes PR26952.
llvm-svn: 263565
show more ...
|
#
61440d22 |
| 10-Mar-2016 |
Chandler Carruth <chandlerc@gmail.com> |
[PM] Port memdep to the new pass manager.
This is a fairly straightforward port to the new pass manager with one exception. It removes a very questionable use of releaseMemory() in the old pass to i
[PM] Port memdep to the new pass manager.
This is a fairly straightforward port to the new pass manager with one exception. It removes a very questionable use of releaseMemory() in the old pass to invalidate its caches between runs on a function. I don't think this is really guaranteed to be safe. I've just used the more direct port to the new PM to address this by nuking the results object each time the pass runs. While this could cause some minor malloc traffic increase, I don't expect the compile time performance hit to be noticable, and it makes the correctness and other aspects of the pass much easier to reason about. In some cases, it may make things faster by making the sets and maps smaller with better locality. Indeed, the measurements collected by Bruno (thanks!!!) show mostly compile time improvements.
There is sadly very limited testing at this point as there are only two tests of memdep, and both rely on GVN. I'll be porting GVN next and that will exercise this heavily though.
Differential Revision: http://reviews.llvm.org/D17962
llvm-svn: 263082
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1 |
|
#
78bde830 |
| 06-Jan-2016 |
Chen Li <meloli87@gmail.com> |
[SplitLandingPadPredecessors] Create a PHINode for the original landingpad only if it has some uses
Summary: This patch adds a check in SplitLandingPadPredecessors to see if the original landingpad
[SplitLandingPadPredecessors] Create a PHINode for the original landingpad only if it has some uses
Summary: This patch adds a check in SplitLandingPadPredecessors to see if the original landingpad instruction has any uses. If not, we don't need to create a PHINode for it in the joint block since it's gonna be a dead code anyway. The motivation for this patch is that we found a bug that SplitLandingPadPredecessors created a PHINode of token type landingpad, which failed the verifier since PHINode can not be token type. However, the created PHINode will never be used in our code pattern. This patch will workaround this bug, and we might add supports in SplitLandingPadPredecessors to handle token type landingpad with uses in the future.
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15835
llvm-svn: 256972
show more ...
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1 |
|
#
5b4c837c |
| 13-Oct-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
TransformUtils: Remove implicit ilist iterator conversions, NFC
Continuing the work from last week to remove implicit ilist iterator conversions. First related commit was probably r249767, with som
TransformUtils: Remove implicit ilist iterator conversions, NFC
Continuing the work from last week to remove implicit ilist iterator conversions. First related commit was probably r249767, with some more motivation in r249925. This edition gets LLVMTransformUtils compiling without the implicit conversions.
No functional change intended.
llvm-svn: 250142
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4 |
|
#
ebcd7489 |
| 06-Aug-2015 |
Pete Cooper <peter_cooper@apple.com> |
Convert a bunch of loops to foreach. NFC.
After r244074, we now have a successors() method to iterate over all the successors of a TerminatorInst. This commit changes a bunch of eligible loops to
Convert a bunch of loops to foreach. NFC.
After r244074, we now have a successors() method to iterate over all the successors of a TerminatorInst. This commit changes a bunch of eligible loops to use it.
llvm-svn: 244260
show more ...
|
#
654e130b |
| 31-Jul-2015 |
David Majnemer <david.majnemer@gmail.com> |
New EH representation for MSVC compatibility
This introduces new instructions neccessary to implement MSVC-compatible exception handling support. Most of the middle-end and none of the back-end hav
New EH representation for MSVC compatibility
This introduces new instructions neccessary to implement MSVC-compatible exception handling support. Most of the middle-end and none of the back-end haven't been audited or updated to take them into account.
Differential Revision: http://reviews.llvm.org/D11097
llvm-svn: 243766
show more ...
|
Revision tags: llvmorg-3.7.0-rc2 |
|
#
96ada25b |
| 22-Jul-2015 |
Chandler Carruth <chandlerc@gmail.com> |
[PM/AA] Remove all of the dead AliasAnalysis pointers being threaded through APIs that are no longer necessary now that the update API has been removed.
This will make changes to the AA interfaces s
[PM/AA] Remove all of the dead AliasAnalysis pointers being threaded through APIs that are no longer necessary now that the update API has been removed.
This will make changes to the AA interfaces significantly less disruptive (I hope). Either way, it seems like a really nice cleanup.
llvm-svn: 242882
show more ...
|
#
a1032a0f |
| 22-Jul-2015 |
Chandler Carruth <chandlerc@gmail.com> |
[PM/AA] Remove the last of the legacy update API from AliasAnalysis as part of simplifying its interface and usage in preparation for porting to work with the new pass manager.
Note that this will l
[PM/AA] Remove the last of the legacy update API from AliasAnalysis as part of simplifying its interface and usage in preparation for porting to work with the new pass manager.
Note that this will likely expose that we have dead arguments, members, and maybe even pass requirements for AA. I'll be cleaning those up in seperate patches. This just zaps the actual update API.
Differential Revision: http://reviews.llvm.org/D11325
llvm-svn: 242881
show more ...
|
Revision tags: llvmorg-3.7.0-rc1 |
|
#
00ebdbcc |
| 11-Jul-2015 |
Chandler Carruth <chandlerc@gmail.com> |
[PM/AA] Completely remove the AliasAnalysis::copyValue interface.
No in-tree alias analysis used this facility, and it was not called in any particularly rigorous way, so it seems unlikely to be cor
[PM/AA] Completely remove the AliasAnalysis::copyValue interface.
No in-tree alias analysis used this facility, and it was not called in any particularly rigorous way, so it seems unlikely to be correct.
Note that one of the only stateful AA implementations in-tree, GlobalsModRef is completely broken currently (and any AA passes like it are equally broken) because Module AA passes are not effectively invalidated when a function pass that fails to update the AA stack runs.
Ultimately, it doesn't seem like we know how we want to build stateful AA, and until then trying to support and maintain correctness for an untested API is essentially impossible. To that end, I'm planning to rip out all of the update API. It can return if and when we need it and know how to build it on top of the new pass manager and as part of *tested* stateful AA implementations in the tree.
Differential Revision: http://reviews.llvm.org/D10889
llvm-svn: 241975
show more ...
|
#
db82d2f3 |
| 10-Jul-2015 |
David Majnemer <david.majnemer@gmail.com> |
Revert the new EH instructions
This reverts commits r241888-r241891, I didn't mean to commit them.
llvm-svn: 241893
|
#
ae2ffc8a |
| 10-Jul-2015 |
David Majnemer <david.majnemer@gmail.com> |
New EH representation for MSVC compatibility
Summary: This introduces new instructions neccessary to implement MSVC-compatible exception handling support. Most of the middle-end and none of the bac
New EH representation for MSVC compatibility
Summary: This introduces new instructions neccessary to implement MSVC-compatible exception handling support. Most of the middle-end and none of the back-end haven't been audited or updated to take them into account.
Reviewers: rnk, JosephTremoulet, reames, nlewycky, rjmccall
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11041
llvm-svn: 241888
show more ...
|
Revision tags: llvmorg-3.6.2 |
|
#
19ffcb90 |
| 23-Jun-2015 |
Alexey Samsonov <vonosmas@gmail.com> |
Let llvm::ReplaceInstWithInst copy debug location from old to new instruction.
Currently some users of this function do this explicitly, and all the rest forget to do this.
ThreadSanitizer was one
Let llvm::ReplaceInstWithInst copy debug location from old to new instruction.
Currently some users of this function do this explicitly, and all the rest forget to do this.
ThreadSanitizer was one of such users, and had missing debug locations for calls into TSan runtime handling atomic operations, eventually leading to poorly symbolized stack traces and malfunctioning suppressions.
This is another change relevant to PR23837.
llvm-svn: 240460
show more ...
|