mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-03 15:26:18 +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. (Re-commit of r227728) Differential Revision: http://reviews.llvm.org/D6789 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -193,6 +193,7 @@ public:
|
||||
void addIRPasses() override;
|
||||
bool addInstSelector() override;
|
||||
bool addILPOpts() override;
|
||||
void addPreRegAlloc() override;
|
||||
void addPostRegAlloc() override;
|
||||
void addPreEmitPass() override;
|
||||
};
|
||||
@@ -226,6 +227,10 @@ bool X86PassConfig::addILPOpts() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void X86PassConfig::addPreRegAlloc() {
|
||||
addPass(createX86CallFrameOptimization());
|
||||
}
|
||||
|
||||
void X86PassConfig::addPostRegAlloc() {
|
||||
addPass(createX86FloatingPointStackifierPass());
|
||||
}
|
||||
|
Reference in New Issue
Block a user