C++: remove side effect operands from non-reads

This commit is contained in:
Robert Marsh
2019-09-27 17:16:47 -04:00
parent 9f20cb83c3
commit a45a6e48f8
10 changed files with 104 additions and 96 deletions

View File

@@ -48,8 +48,8 @@ module InstructionSanity {
or
(
opcode instanceof ReadSideEffectOpcode or
opcode instanceof MayWriteSideEffectOpcode or
opcode instanceof Opcode::InlineAsm
opcode instanceof Opcode::InlineAsm or
opcode instanceof Opcode::CallSideEffect
) and
tag instanceof SideEffectOperandTag
)

View File

@@ -48,8 +48,8 @@ module InstructionSanity {
or
(
opcode instanceof ReadSideEffectOpcode or
opcode instanceof MayWriteSideEffectOpcode or
opcode instanceof Opcode::InlineAsm
opcode instanceof Opcode::InlineAsm or
opcode instanceof Opcode::CallSideEffect
) and
tag instanceof SideEffectOperandTag
)

View File

@@ -449,12 +449,7 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
or
tag instanceof OnlyInstructionTag and
operandTag instanceof SideEffectOperandTag and
not call.getTarget().(SideEffectFunction).hasSpecificWriteSideEffect(index, _, true) and
result = getEnclosingFunction().getUnmodeledDefinitionInstruction()
or
tag instanceof OnlyInstructionTag and
operandTag instanceof SideEffectOperandTag and
call.getTarget().(SideEffectFunction).hasSpecificReadSideEffect(index, _) and
not isWrite() and
result = getEnclosingFunction().getUnmodeledDefinitionInstruction()
or
tag instanceof OnlyInstructionTag and

View File

@@ -48,8 +48,8 @@ module InstructionSanity {
or
(
opcode instanceof ReadSideEffectOpcode or
opcode instanceof MayWriteSideEffectOpcode or
opcode instanceof Opcode::InlineAsm
opcode instanceof Opcode::InlineAsm or
opcode instanceof Opcode::CallSideEffect
) and
tag instanceof SideEffectOperandTag
)