[PATCH] D120133: [instsimplify] Assume storage for byval args doesn't overlap allocas, globals, or other byval args

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 18 09:15:23 PST 2022


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2550
   return isa<AllocaInst>(V1) &&
     (isa<AllocaInst>(V2) || isa<GlobalVariable>(V2));
 }
----------------
Can't this function be simplified to `isByValArgOrAllocaOrGlobalVar(V1) && isByValArgOrAllocaOrGlobalVar(V2)`? Is there some reason your implementation is going out of the way to not handle the GlobalVariable + GlobalVariable case? (Note that GlobalVariable != GlobalObject, so this does not included aliases).


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

https://reviews.llvm.org/D120133



More information about the llvm-commits mailing list