[PATCH] D21561: [IPRA] Set callee saved registers to none for local function when IPRA is enabled.

Vivek Pandya via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 11:30:08 PDT 2016


vivekvpandya added inline comments.

================
Comment at: test/CodeGen/X86/ipra-local-linkage.ll:19
@@ +18,3 @@
+define void @bar() #0 {
+  %X = add i32 1, 3
+  call void asm sideeffect "movl  %r12d, $0", "{r15}~{r12}"(i32 %X) #0
----------------
vivekvpandya wrote:
> mehdi_amini wrote:
> > vivekvpandya wrote:
> > > mehdi_amini wrote:
> > > > vivekvpandya wrote:
> > > > > mehdi_amini wrote:
> > > > > > Take %X by argument?
> > > > > Do you mean as reference?
> > > > I mean as a function parameter, unless I'm missing why an addition is needed here.
> > > Yes addition is not needed I can change load constant value to variable X.
> > Why do you need a load? Why don't you take X as a function parameter (you haven't address this question...)
> Do you mean as a function parameter of bar() ?
Yes, that also worked. However I have just never thought to use that. But I guess that simplified the test further. In previous version constant value and add instruction were just irrelevant.


http://reviews.llvm.org/D21561





More information about the llvm-commits mailing list