mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
X86 Peephole: fold loads to the source register operand if possible.
Add more comments and use early returns to reduce nesting in isLoadFoldable. Also disable folding for V_SET0 to avoid introducing a const pool entry and a const pool load. rdar://10554090 and rdar://11873276 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -389,7 +389,11 @@ public:
|
||||
|
||||
/// optimizeLoadInstr - Try to remove the load by folding it to a register
|
||||
/// operand at the use. We fold the load instructions if and only if the
|
||||
/// def and use are in the same BB.
|
||||
/// def and use are in the same BB. We only look at one load and see
|
||||
/// whether it can be folded into MI. FoldAsLoadDefReg is the virtual register
|
||||
/// defined by the load we are trying to fold. DefMI returns the machine
|
||||
/// instruction that defines FoldAsLoadDefReg, and the function returns
|
||||
/// the machine instruction generated due to folding.
|
||||
virtual MachineInstr* optimizeLoadInstr(MachineInstr *MI,
|
||||
const MachineRegisterInfo *MRI,
|
||||
unsigned &FoldAsLoadDefReg,
|
||||
|
||||
Reference in New Issue
Block a user