[PATCH] [X86] A first stab at a heuristic to estimate the size impact for converting movs to pushes

Michael Kuperstein michael.m.kuperstein at intel.com
Wed Feb 11 07:24:45 PST 2015


Hi rnk,

The idea is to go over all calls in the MachineFunction and compute:
a) For each callsite that can not use pushes, the penalty of not having a reserved call frame.
b) For each callsite that can use pushes, the gain of actually replacing the movs with pushes (and the potential penalty of having to readjust the stack).

This could be made more precise (e.g. by looking at the size of the constants, or even constructing the potential instruction and asking the MC layer for the encoding size. Not to mention trying to figure out the gains from folding.) but this should be a decent first approximation.

http://reviews.llvm.org/D7561

Files:
  lib/Target/X86/X86CallFrameOptimization.cpp
  test/CodeGen/X86/movtopush.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7561.19754.patch
Type: text/x-patch
Size: 8348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150211/1df21205/attachment.bin>


More information about the llvm-commits mailing list