<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 11, 2014 at 8:24 AM, JF Bastien <span dir="ltr"><<a href="mailto:jfb@google.com" target="_blank">jfb@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Saleem,<div><br></div><div>If I understand correctly this isn't just for Thumb2, it's also for ARM?</div></div></blockquote><div><br></div><div>Correct, it is for ARM when not in Thumb v1 mode.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 8:09 AM, Saleem Abdulrasool <span dir="ltr"><<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: compnerd<br>
Date: Tue Mar 11 10:09:44 2014<br>
New Revision: 203575<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=203575&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=203575&view=rev</a><br>
Log:<br>
ARM: enable tail call optimisation on Thumb 2<br>
<br>
Tail call optimisation was previously disabled on all targets other than<br>
iOS5.0+. This enables the tail call optimisation on all Thumb 2 capable<br>
platforms.<br>
<br>
The test adjustments are to remove the IR hint "tail" to function invocation.<br>
The tests were designed assuming that tail call optimisations would not kick in<br>
which no longer holds true.<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp<br>
llvm/trunk/test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll<br>
llvm/trunk/test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll<br>
llvm/trunk/test/CodeGen/ARM/debug-frame.ll<br>
llvm/trunk/test/CodeGen/ARM/ehabi.ll<br>
llvm/trunk/test/CodeGen/ARM/v1-constant-fold.ll<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=203575&r1=203574&r2=203575&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=203575&r1=203574&r2=203575&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Tue Mar 11 10:09:44 2014<br>
@@ -219,8 +219,10 @@ void ARMSubtarget::resetSubtargetFeature<br>
if (isTargetMachO()) {<br>
IsR9Reserved = ReserveR9 | !HasV6Ops;<br>
SupportsTailCall = !isTargetIOS() || !getTargetTriple().isOSVersionLT(5, 0);<br>
- } else<br>
+ } else {<br>
IsR9Reserved = ReserveR9;<br>
+ SupportsTailCall = !isThumb1Only();<br>
+ }<br>
<br>
if (!isThumb() || hasThumb2())<br>
PostRAScheduler = true;<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll?rev=203575&r1=203574&r2=203575&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll?rev=203575&r1=203574&r2=203575&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll Tue Mar 11 10:09:44 2014<br>
@@ -72,7 +72,7 @@ define void @foo(double %p0, ; --> D0<br>
double %p8, ; --> Stack<br>
i32 %p9) #0 { ; --> R0, not Stack+8<br>
entry:<br>
- tail call void @fooUseI32(i32 %p9)<br>
+ call void @fooUseI32(i32 %p9)<br>
ret void<br>
}<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll?rev=203575&r1=203574&r2=203575&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll?rev=203575&r1=203574&r2=203575&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll Tue Mar 11 10:09:44 2014<br>
@@ -23,7 +23,7 @@ define void @foo1(i32 %a, %struct12bytes<br>
; CHECK: pop {r11, lr}<br>
; CHECK: add sp, sp, #16<br>
<br>
- tail call void @useLong(i64 %c)<br>
+ call void @useLong(i64 %c)<br>
ret void<br>
}<br>
<br>
@@ -40,7 +40,7 @@ define void @foo2(i32 %a, %struct8bytes8<br>
; CHECK: pop {r11, lr}<br>
; CHECK: add sp, sp, #8<br>
<br>
- tail call void @usePtr(%struct8bytes8align* %b)<br>
+ call void @usePtr(%struct8bytes8align* %b)<br>
ret void<br>
}<br>
<br>
@@ -57,7 +57,7 @@ define void @foo3(%struct8bytes8align* b<br>
; CHECK: pop {r11, lr}<br>
; CHECK: add sp, sp, #16<br>
<br>
- tail call void @usePtr(%struct8bytes8align* %a)<br>
+ call void @usePtr(%struct8bytes8align* %a)<br>
ret void<br>
}<br>
<br>
@@ -76,7 +76,7 @@ define void @foo4(%struct4bytes* byval %<br>
; CHECK: add sp, sp, #16<br>
; CHECK: mov pc, lr<br>
<br>
- tail call void @usePtr(%struct8bytes8align* %b)<br>
+ call void @usePtr(%struct8bytes8align* %b)<br>
ret void<br>
}<br>
<br>
@@ -95,7 +95,7 @@ define void @foo5(%struct8bytes8align* b<br>
; CHECK: add sp, sp, #16<br>
; CHECK: mov pc, lr<br>
<br>
- tail call void @usePtr(%struct8bytes8align* %a)<br>
+ call void @usePtr(%struct8bytes8align* %a)<br>
ret void<br>
}<br>
<br>
@@ -109,6 +109,6 @@ define void @foo6(i32 %a, i32 %b, i32 %c<br>
; CHECK: pop {r11, lr}<br>
; CHECK: mov pc, lr<br>
<br>
- tail call void @usePtr(%struct8bytes8align* %d)<br>
+ call void @usePtr(%struct8bytes8align* %d)<br>
ret void<br>
}<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/debug-frame.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/debug-frame.ll?rev=203575&r1=203574&r2=203575&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/debug-frame.ll?rev=203575&r1=203574&r2=203575&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/debug-frame.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/debug-frame.ll Tue Mar 11 10:09:44 2014<br>
@@ -301,7 +301,7 @@ declare void @throw_exception_2()<br>
<br>
define void @test2() {<br>
entry:<br>
- tail call void @throw_exception_2()<br>
+ call void @throw_exception_2()<br>
ret void<br>
}<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/ehabi.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/ehabi.ll?rev=203575&r1=203574&r2=203575&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/ehabi.ll?rev=203575&r1=203574&r2=203575&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/ehabi.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/ehabi.ll Tue Mar 11 10:09:44 2014<br>
@@ -181,7 +181,7 @@ declare void @throw_exception_2()<br>
<br>
define void @test2() {<br>
entry:<br>
- tail call void @throw_exception_2()<br>
+ call void @throw_exception_2()<br>
ret void<br>
}<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/v1-constant-fold.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/v1-constant-fold.ll?rev=203575&r1=203574&r2=203575&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/v1-constant-fold.ll?rev=203575&r1=203574&r2=203575&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/v1-constant-fold.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/v1-constant-fold.ll Tue Mar 11 10:09:44 2014<br>
@@ -1,4 +1,4 @@<br>
-; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=+v7,+vfp3,-neon | FileCheck %s<br>
+; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=+v7,+vfp3,-neon | FileCheck %s<br>
<br>
; PR15611. Check that we don't crash when constant folding v1i32 types.<br>
<br>
@@ -11,7 +11,7 @@ bb:<br>
%tmp3 = insertelement <4 x i32> %tmp2, i32 0, i32 3<br>
%tmp4 = add <4 x i32> %tmp3, <i32 -1, i32 -1, i32 -1, i32 -1><br>
; CHECK: bl bar<br>
- tail call void @bar(<4 x i32> %tmp4)<br>
+ call void @bar(<4 x i32> %tmp4)<br>
ret void<br>
}<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>