[PATCH] D35974: AMDGPU: Add pass to replace out arguments
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 21:34:18 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp:120
+
+ // TODO: It might be useful for any out arguments, not just privates.
+ if (!ArgTy || (ArgTy->getAddressSpace() != DL->getAllocaAddrSpace() &&
----------------
I'm not sure you actually can do it on a non-private. Other address spaces are externally visible and stores to them shall not be easily eliminated. The exception is a non-aliasing LDS variable with function local scope.
================
Comment at: lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp:300
+ RetAttrs.addAttribute(Attribute::NoAlias);
+ NewFunc->removeAttributes(AttributeList::ReturnIndex, RetAttrs);
+ // TODO: How to preserve metadata?
----------------
Consider also marking it always inline.
================
Comment at: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:362
+
+ Builder.addExtension(
+ PassManagerBuilder::EP_ScalarOptimizerLate,
----------------
Check opt level.
https://reviews.llvm.org/D35974
More information about the llvm-commits
mailing list