[PATCH] D54158: AMDGPU: Add an option amdgpu-enable-promote-alloca to enable/disable alloca
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 09:35:12 PST 2018
yaxunl created this revision.
yaxunl added reviewers: rampitec, arsenm, kzhuravl.
Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely.
Add this option for debugging and providing workaround.
By default it is enabled so no behavior change in backend.
https://reviews.llvm.org/D54158
Files:
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Index: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -62,6 +62,12 @@
cl::ReallyHidden,
cl::init(true));
+static cl::opt<bool> EnablePromoteAlloca(
+ "amdgpu-enable-promote-alloca",
+ cl::desc("Run promote alloca pass"),
+ cl::ReallyHidden,
+ cl::init(true));
+
static cl::opt<bool>
EnableEarlyIfConversion("amdgpu-early-ifcvt", cl::Hidden,
cl::desc("Run early if-conversion"),
@@ -653,7 +659,8 @@
if (TM.getOptLevel() > CodeGenOpt::None) {
addPass(createInferAddressSpacesPass());
- addPass(createAMDGPUPromoteAlloca());
+ if (EnablePromoteAlloca)
+ addPass(createAMDGPUPromoteAlloca());
if (EnableSROA)
addPass(createSROAPass());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54158.172781.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181106/5bf26fa7/attachment.bin>
More information about the llvm-commits
mailing list