[PATCH] D46992: [AMDGPU] Add perf hints to functions
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 03:17:43 PDT 2018
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUPerfHint.cpp:336-337
+
+ DEBUG(dbgs() << F.getName() << " needs limit wave\n");
+ setFunctionAttribIfNone(F, ATTR_WAVE_LIMITER_HINT, 1);
+
----------------
You're not really supposed to use attributes to pass information through to others, although we do this in a few places to hack around isel limitations. Can you make this an analysis pass instead which returns yes / no at the point you actually need this?
================
Comment at: lib/Target/AMDGPU/AMDGPUPerfHint.cpp:382-383
+ MO = LI->getPointerOperand();
+ else if (auto SI = dyn_cast<StoreInst>(Inst))
+ MO = SI->getPointerOperand();
+
----------------
Should handle other memory operations too, like atomics and intrinsics. There is already a wrapper somewhere which should find the pointer operand for all of these operations
https://reviews.llvm.org/D46992
More information about the llvm-commits
mailing list