[PATCH] D30524: Extract FindAvailablePtrLoadStore out of FindAvailableLoadedValue. NFCI
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 13:12:17 PST 2017
trentxintong added inline comments.
================
Comment at: lib/Analysis/Loads.cpp:326
+
+Value *llvm::FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy,
+ bool AtLeastAtomic, BasicBlock *ScanBB,
----------------
junbuml wrote:
> trentxintong wrote:
> > 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.
> What about passing both load and pointer accessed to FindAvailableLoadedValue ?
Its possible. However, I think the whole point of having this function is that we do not need to pass in a LoadInst, as after we do phi translate, we only have a pointer, not a LoadInst.
At this point, I am leaning towards removing FindAvailableLoadedValue and overwrite the callsites (~3) to do the check before calling FindAvailablePtrLoadStore.
https://reviews.llvm.org/D30524
More information about the llvm-commits
mailing list