[llvm-commits] X86 FastISel: Emit immediate call arguments locally to save stack size when compiling with -O0

Eric Christopher echristo at apple.com
Thu Aug 11 15:20:31 PDT 2011


On Aug 10, 2011, at 4:01 PM, Ivan Krasin wrote:

> <flush-local-value-map.patch>

In general I think the patch is OK.  A few requests:

   MachineInstr *LastLocalValue;
+  MachineInstr *OrigLocalValue;

….

   // Start out as null, meaining no local-value instructions have
   // been emitted.
-  LastLocalValue = 0;
+  OrigLocalValue = 0;

A lot of the code you've changed hasn't had any comments written or updated for the new behavior. It'd be good to get an updated description of how the LocalValueMap is working and how it interacts with constants.

In particular:

+  if (!isa<IntrinsicInst>(F))
+    flushLocalValueMap();
+

Here. The location of this here doesn't make a whole lot of sense and it'd be good if you could explain it.

A better way to do this would be, as Jakob suggested, use the LocalValueMap as a storage for constants and locations that you've used them in the block and then emit all of the constants at that point rather than this weird flushing mechanism.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110811/cecbcea9/attachment.html>


More information about the llvm-commits mailing list