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.

llvm-svn: 123044
This commit is contained in:
Evan Cheng
2011-01-07 23:50:32 +00:00
parent 006089b761
commit 6eb516dbea
21 changed files with 129 additions and 46 deletions

View File

@@ -338,7 +338,7 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
MI->isKill() || MI->isInlineAsm() || MI->isDebugValue() ||
MI->getDesc().hasUnmodeledSideEffects())
MI->hasUnmodeledSideEffects())
continue;
if (MI->getDesc().isCompare()) {