[PATCH] Inliner: Don't clear tail flags when creating allocas for byval args

Reid Kleckner rnk at google.com
Fri Apr 18 15:53:45 PDT 2014



================
Comment at: test/Transforms/Inline/byval-tail-call.ll:4-5
@@ -3,6 +3,4 @@
 
-; When inlining through a byval call site, the inliner creates allocas which may
-; be used by inlined calls, so any inlined calls need to have their 'tail' flags
-; cleared.  If not then you can get nastiness like with this testcase, where the
-; (inlined) call to 'ext' in 'foo' was being passed an uninitialized value.
+; Calls that capture byval parameters cannot be marked as tail calls. Other
+; tails that don't capture byval parameters can still be tail calls.
 
----------------
Chandler Carruth wrote:
> Nice. If you're doing this much surgery here, I would rename it without the date so that people can find the test case more easily (byval_tail_call.ll or whatever).
I did.  :)

================
Comment at: test/Transforms/TailCallElim/basic.ll:149
@@ +148,3 @@
+define void @test9(i32* byval %a) {
+; CHECK-LABEL define void @test9(
+; CHECK: {{^ *}}call void @use(
----------------
Chandler Carruth wrote:
> missing :
woops, thanks!


http://reviews.llvm.org/D3403

BRANCH
  tail-byval

ARCANIST PROJECT
  llvm






More information about the llvm-commits mailing list