summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-18 01:05:25 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-18 01:05:25 +0000
commit919d845e814b0bc74cc55191ac1b4257b2e5ce5e (patch)
treef776341c42cf0cb177c826a049e88bdb3a9c6050 /lib/CodeGen/BackendUtil.cpp
parentdea85f9d241126f844cc46d4e91e7755c8e1851c (diff)
BackendUtil: Pass through -mdisable-tail-calls
The frontend option -fno-optimize-sibling-calls resolves to -cc1's -mdisable-tail-calls, which is passed to the TargetMachine in the backend. PassManagerBuilder was adding the -tailcallelim pass anyway. Use a new DisableTailCalls option in PassManagerBuilder to disable tail calls harder. Requires the matching commit in LLVM that adds DisableTailCalls. <rdar://problem/16050591> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index b75c62a422..2c388ef58e 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -247,6 +247,7 @@ void EmitAssemblyHelper::CreatePasses() {
PMBuilder.SLPVectorize = CodeGenOpts.VectorizeSLP;
PMBuilder.LoopVectorize = CodeGenOpts.VectorizeLoop;
+ PMBuilder.DisableTailCalls = CodeGenOpts.DisableTailCalls;
PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime;
PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops;
PMBuilder.RerollLoops = CodeGenOpts.RerollLoops;