[PATCH] D28126: [MemDep] Handle gep with zeros for invariant.group
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 30 10:51:58 PST 2016
Prazek added a comment.
Thanks :)
================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:368
- if (auto *BCI = dyn_cast<BitCastInst>(Ptr)) {
- if (Seen.insert(BCI->getOperand(0)).second) {
- LoadOperandsQueue.push_back(BCI->getOperand(0));
- }
- }
-
- for (Use &Us : Ptr->uses()) {
+ // Value comes from bitcast: Ptr = bitcast x. Insert x.
+ if (auto *BCI = dyn_cast<BitCastInst>(Ptr))
----------------
reames wrote:
> minor: walking back the def chain could be handled by a call to stripPointerCasts. This can be a following cleanup change,
do you mean firstly call stripPointerCasts on the LoadOperand so that we will only have to walk down the tree? I didn't know this function, but I was also thinking about splitting it into 2 loops to firstly get to the top.
https://reviews.llvm.org/D28126
More information about the llvm-commits
mailing list