diff options
author | Johannes Doerfert <johannes@jdoerfert.de> | 2020-01-26 02:51:57 -0600 |
---|---|---|
committer | Johannes Doerfert <johannes@jdoerfert.de> | 2020-02-14 19:05:51 -0600 |
commit | 282f5d7ad1637b47da7cbc505e0afaa3870df5c7 (patch) | |
tree | b0a907f032db3d0659afb03234805119e4c8248b /llvm/lib/Transforms/Utils/CallGraphUpdater.cpp | |
parent | 65dbdc329f6ca171fc78393ffd2eada859185c85 (diff) | |
download | llvm-282f5d7ad1637b47da7cbc505e0afaa3870df5c7.zip llvm-282f5d7ad1637b47da7cbc505e0afaa3870df5c7.tar.gz llvm-282f5d7ad1637b47da7cbc505e0afaa3870df5c7.tar.bz2 |
[Attributor] Derive memory location attributes (argmemonly, ...)
In addition to memory behavior attributes (readonly/writeonly) we now
derive memory location attributes (argmemonly/inaccessiblememonly/...).
The former is part of AAMemoryBehavior and the latter part of
AAMemoryLocation. While they are similar in nature it got messy when
they were put in a single AA. Location attributes for arguments and
floating values will follow later.
Note that both memory attributes kinds can derive readnone. If there are
no accesses AAMemoryBehavior will derive readnone. If there are accesses
but only to stack (=local) locations AAMemoryLocation will derive
readnone.
Reviewed By: uenoku
Differential Revision: https://reviews.llvm.org/D73426
Diffstat (limited to 'llvm/lib/Transforms/Utils/CallGraphUpdater.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CallGraphUpdater.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp index f26facf..a7a214d 100644 --- a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp +++ b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp @@ -47,16 +47,16 @@ bool CallGraphUpdater::finalize() { if (LCG && !ReplacedFunctions.count(DeadFn)) { // Taken mostly from the inliner: - FunctionAnalysisManager &FAM = - AM->getResult<FunctionAnalysisManagerCGSCCProxy>(*SCC, *LCG) - .getManager(); - LazyCallGraph::Node &N = LCG->get(*DeadFn); auto *DeadSCC = LCG->lookupSCC(N); assert(DeadSCC && DeadSCC->size() == 1 && &DeadSCC->begin()->getFunction() == DeadFn); auto &DeadRC = DeadSCC->getOuterRefSCC(); + FunctionAnalysisManager &FAM = + AM->getResult<FunctionAnalysisManagerCGSCCProxy>(*DeadSCC, *LCG) + .getManager(); + FAM.clear(*DeadFn, DeadFn->getName()); AM->clear(*DeadSCC, DeadSCC->getName()); LCG->removeDeadFunction(*DeadFn); |