[PATCH] D99206: Make FindAvailableLoadedValue TBAA aware

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 21:41:51 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/include/llvm/Analysis/Loads.h:168
 Value *FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy, bool AtLeastAtomic,
-                                 BasicBlock *ScanBB,
+                                 Optional<MemoryLocation>, BasicBlock *ScanBB,
                                  BasicBlock::iterator &ScanFrom,
----------------
nikic wrote:
> Why make it optional? The only None use seems to be in JumpThreading, and we should be able to pass a location there as well.
> 
> (Could also drop the Ptr argument if it's required, as the memory location includes the pointer.)
+1, you can always make a MemoryLocation from a pointer anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99206/new/

https://reviews.llvm.org/D99206



More information about the llvm-commits mailing list