summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-01-19 00:34:10 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-01-19 00:34:10 +0000
commitecc0084f72de81180ef09b74c8207b1f86ad38fc (patch)
tree3d4c13c8e65680616f7e0bfc1f9700e9a9b188d4 /llvm/tools
parentedb4acf16b0e2123efd5790591ce93a47f19580d (diff)
downloadbcm5719-llvm-ecc0084f72de81180ef09b74c8207b1f86ad38fc.tar.gz
bcm5719-llvm-ecc0084f72de81180ef09b74c8207b1f86ad38fc.zip
Add a TargetOption for disabling tail calls.
llvm-svn: 148442
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llc/llc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 790f9e6027b..5fabdaf0691 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -237,6 +237,11 @@ EnableGuaranteedTailCallOpt("tailcallopt",
cl::desc("Turn fastcc calls into tail calls by (potentially) changing ABI."),
cl::init(false));
+static cl::opt<bool>
+DisableTailCalls("disable-tail-calls",
+ cl::desc("Never emit tail calls"),
+ cl::init(false));
+
static cl::opt<unsigned>
OverrideStackAlignment("stack-alignment",
cl::desc("Override default stack alignment"),
@@ -462,6 +467,7 @@ int main(int argc, char **argv) {
Options.JITEmitDebugInfo = EmitJitDebugInfo;
Options.JITEmitDebugInfoToDisk = EmitJitDebugInfoToDisk;
Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt;
+ Options.DisableTailCalls = DisableTailCalls;
Options.StackAlignmentOverride = OverrideStackAlignment;
Options.RealignStack = EnableRealignStack;
Options.DisableJumpTables = DisableSwitchTables;
OpenPOWER on IntegriCloud