[PATCH] D30524: Extract FindAvailablePtrLoadStore out of FindAvailableLoadedValue. NFCI
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 12:40:35 PST 2017
trentxintong added inline comments.
================
Comment at: lib/Analysis/Loads.cpp:321
+ return FindAvailablePtrLoadStore(
+ Load->getPointerOperand(), Load->getType(), Load->isAtomic(), ScanBB,
----------------
junbuml wrote:
> Do we really need to have this just to wrap FindAvailablePtrLoadStore() in FindAvailableLoadedValue? I guess it's also possible to change existing call sites of FindAvailableLoadedValue() just this like.
Its also possible to change existing callsites, which we only have a few (~3). If we do that we can remove the FindAvailableLoadedValue function.
================
Comment at: lib/Analysis/Loads.cpp:326
+
+Value *llvm::FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy,
+ bool AtLeastAtomic, BasicBlock *ScanBB,
----------------
junbuml wrote:
> Don't you need to have if (!Load->isUnordered()) in FindAvailablePtrLoadStore as well?
We cant check for that as we are passing in a Ptr, the check needs to be done outside.
https://reviews.llvm.org/D30524
More information about the llvm-commits
mailing list