[PATCH] D65243: [Attributor] Using liveness in other attributes.
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 14:38:17 PDT 2019
jdoerfert added inline comments.
================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:676
+ std::function<bool(Value &, SmallPtrSet<ReturnInst *, 2> &)> &Pred)
+ const = 0;
----------------
`SmallPtrSetImpl<ReturnInst *> &`
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:639
+ UniqueRV = nullptr;
+ return false;
+ }
----------------
Do not modify `UniqueRV` and do return true to indicate this return value was handled and all is OK. The idea is, when dead then ignore the return value.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:675
Value *RV = It.first;
+ SmallPtrSet<ReturnInst *, 2> RetInsts = It.second;
----------------
`&` missing
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:715
+ }
+ }
+
----------------
Move into a helper function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65243/new/
https://reviews.llvm.org/D65243
More information about the llvm-commits
mailing list