changeset 27:ecf2394747e1

force to set tail call flag on SelectionDAGBuilder.cpp:LowerCallingInfo.
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 12 Nov 2013 20:27:46 +0900
parents d84031a0fa3c
children 273f76252412
files lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp	Tue Nov 12 18:45:31 2013 +0900
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp	Tue Nov 12 20:27:46 2013 +0900
@@ -5283,6 +5283,11 @@
     DAG.setRoot(DAG.getEHLabel(getCurDebugLoc(), getControlRoot(), BeginLabel));
   }
 
+#ifndef noCbC
+  if (RetTy->is__CodeTy()) // force to set tail call flag if the called function is code segment.
+    isTailCall = true;
+#endif
+
   // Check if target-independent constraints permit a tail call here.
   // Target-dependent constraints are checked within TLI.LowerCallTo.
   if (isTailCall && !isInTailCallPosition(CS, TLI))