[PATCH] D54158: AMDGPU: Add an option -disable-promote-alloca-to-lds
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 11:26:14 PST 2018
yaxunl updated this revision to Diff 172804.
yaxunl retitled this revision from "AMDGPU: Add an option amdgpu-enable-promote-alloca to enable/disable alloca" to "AMDGPU: Add an option -disable-promote-alloca-to-lds".
yaxunl edited the summary of this revision.
yaxunl added a comment.
Revised by Matt's comments.
https://reviews.llvm.org/D54158
Files:
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
Index: lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+++ lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
@@ -70,6 +70,11 @@
cl::desc("Disable promote alloca to vector"),
cl::init(false));
+static cl::opt<bool> DisablePromoteAllocaToLDS(
+ "disable-promote-alloca-to-lds",
+ cl::desc("Disable promote alloca to LDS"),
+ cl::init(false));
+
// FIXME: This can create globals so should be a module pass.
class AMDGPUPromoteAlloca : public FunctionPass {
private:
@@ -706,6 +711,9 @@
if (tryPromoteAllocaToVector(&I))
return true; // Promoted to vector.
+ if (DisablePromoteAllocaToLDS)
+ return false;
+
const Function &ContainingFunction = *I.getParent()->getParent();
CallingConv::ID CC = ContainingFunction.getCallingConv();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54158.172804.patch
Type: text/x-patch
Size: 865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181106/c808fe5d/attachment.bin>
More information about the llvm-commits
mailing list