diff options
author | Mikael Holmen <mikael.holmen@ericsson.com> | 2017-06-27 05:32:13 +0000 |
---|---|---|
committer | Mikael Holmen <mikael.holmen@ericsson.com> | 2017-06-27 05:32:13 +0000 |
commit | 37b5120a9aea9629859338d3cc128568a35089eb (patch) | |
tree | c95561fb7a5354aa9255704803db7c6ddde32f8e /llvm/lib/Transforms/Scalar/Reassociate.cpp | |
parent | 5102028f63b585bab42b2641bc9fcce71bb6ca99 (diff) | |
download | bcm5719-llvm-37b5120a9aea9629859338d3cc128568a35089eb.tar.gz bcm5719-llvm-37b5120a9aea9629859338d3cc128568a35089eb.zip |
[Reassociate] Make sure EraseInst sets MadeChange
Summary:
EraseInst didn't report that it made IR changes through MadeChange.
It is essential that changes to the IR are reported correctly,
since for example ReassociatePass::run() will indicate that all
analyses are preserved otherwise.
And the CGPassManager determines if the CallGraph is up-to-date
based on status from InstructionCombiningPass::runOnFunction().
Reviewers: craig.topper, rnk, davide
Reviewed By: rnk, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34616
llvm-svn: 306368
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/Reassociate.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index 6da551bd7ef..cdba0062953 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -1894,6 +1894,8 @@ void ReassociatePass::EraseInst(Instruction *I) { Op = Op->user_back(); RedoInsts.insert(Op); } + + MadeChange = true; } // Canonicalize expressions of the following form: |