[PATCH] D84873: AMDGPU: In determining load clobbering in AnnotateUniform, don't scan if there are too many blocks.

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 14:41:04 PDT 2020


cfang marked 2 inline comments as done.
cfang added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:145-146
   bool NotClobbered = isEntryFunc && !isClobberedInFunction(&I);
   Instruction *PtrI = dyn_cast<Instruction>(Ptr);
   if (!PtrI && NotClobbered && isGlobalLoad(I)) {
     if (isa<Argument>(Ptr) || isa<GlobalValue>(Ptr)) {
----------------
arsenm wrote:
> arsenm wrote:
> > The logic here should be fixed first. This is checking if the load was clobbered, before the trivial check for isGlobalLoad. The expensive check should be reordered last
> Actually it can go even deep,r under the isa<Argument> || GlobalValue check
Done in https://reviews.llvm.org/D84890.
Actually we have to do the expensive function call for the case PitI != NULL anyway.
So it won't resolve the issue we encountered (this this current patch is still needed).


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

https://reviews.llvm.org/D84873



More information about the llvm-commits mailing list