[PATCH] D21561: [IPRA] Set callee saved registers to none for local function when IPRA is enabled.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 11:09:37 PDT 2016
mehdi_amini added inline comments.
================
Comment at: include/llvm/Target/TargetFrameLowering.h:350
@@ +349,3 @@
+ return false;
+ }
+
----------------
mehdi_amini wrote:
> Why not looking at the users of F?
Why has this been marked as done?
================
Comment at: lib/CodeGen/RegUsageInfoCollector.cpp:123
@@ +122,3 @@
+ const uint32_t *CallPreservedMask =
+ TRI->getCallPreservedMask(MF, MF.getFunction()->getCallingConv());
+ // Set callee saved register as preserved.
----------------
mehdi_amini wrote:
> You created `F` but didn't update uses of `MF.getFunction()`
Why has this been marked as done?
================
Comment at: lib/CodeGen/RegUsageInfoCollector.cpp:129
@@ +128,3 @@
+ ++NumCSROpt;
+ DEBUG(dbgs() << "Function optimized for not having CSR.\n");
+ }
----------------
mehdi_amini wrote:
> Add the function name in the debug output.
Why has this been marked as done?
================
Comment at: lib/CodeGen/TargetFrameLoweringImpl.cpp:76
@@ +75,3 @@
+ return;
+ }
+
----------------
mehdi_amini wrote:
> ```
> if (UseIPRA && isSafeForNoCSROpt(MF.getFunction()))
> return;
> ```
Why has this been marked as done?
================
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:
> > 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.
http://reviews.llvm.org/D21561
More information about the llvm-commits
mailing list