mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
[X86] Convert esp-relative movs of function arguments to pushes, step 2
This moves the transformation introduced in r223757 into a separate MI pass. This allows it to cover many more cases (not only cases where there must be a reserved call frame), and perform rudimentary call folding. It still doesn't have a heuristic, so it is enabled only for optsize/minsize, with stack alignment <= 8, where it ought to be a fairly clear win. Differential Revision: http://reviews.llvm.org/D6789 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -193,6 +193,11 @@ public:
|
||||
return hasReservedCallFrame(MF) || hasFP(MF);
|
||||
}
|
||||
|
||||
// needsFrameIndexResolution - Do we need to perform FI resolution for
|
||||
// this function. Normally, this is required only when the function
|
||||
// has any stack objects. However, targets may want to override this.
|
||||
virtual bool needsFrameIndexResolution(const MachineFunction &MF) const;
|
||||
|
||||
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
||||
/// the stack frame of the specified index.
|
||||
virtual int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
||||
|
Reference in New Issue
Block a user