mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Do not model all INLINEASM instructions as having unmodelled side effects.
Instead encode llvm IR level property "HasSideEffects" in an operand (shared with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check the operand when the instruction is an INLINEASM. This allows memory instructions to be moved around INLINEASM instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123044 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -329,8 +329,13 @@ isReallyTriviallyReMaterializableGeneric(const MachineInstr *MI,
|
||||
const TargetInstrDesc &TID = MI->getDesc();
|
||||
|
||||
// Avoid instructions obviously unsafe for remat.
|
||||
if (TID.hasUnmodeledSideEffects() || TID.isNotDuplicable() ||
|
||||
TID.mayStore())
|
||||
if (TID.isNotDuplicable() || TID.mayStore() ||
|
||||
MI->hasUnmodeledSideEffects())
|
||||
return false;
|
||||
|
||||
// Don't remat inline asm. We have no idea how expensive it is
|
||||
// even if it's side effect free.
|
||||
if (MI->isInlineAsm())
|
||||
return false;
|
||||
|
||||
// Avoid instructions which load from potentially varying memory.
|
||||
|
||||
Reference in New Issue
Block a user