Index: include/llvm/Target/Target.td =================================================================== --- include/llvm/Target/Target.td +++ include/llvm/Target/Target.td @@ -878,12 +878,16 @@ // Standard Pseudo Instructions. // This list must match TargetOpcodes.h and CodeGenTarget.cpp. // Only these instructions are allowed in the TargetOpcode namespace. -let isCodeGenOnly = 1, isPseudo = 1, hasNoSchedulingInfo = 1, - Namespace = "TargetOpcode" in { +// Ensure mayLoad and mayStore have a default value, so as not to break +// targets that set guessInstructionProperties=0. Any local definition of +// mayLoad/mayStore takes precedence over these default values. +let mayLoad = 0, mayStore = 0, isCodeGenOnly = 1, isPseudo = 1, + hasNoSchedulingInfo = 1, Namespace = "TargetOpcode" in { def PHI : Instruction { let OutOperandList = (outs unknown:$dst); let InOperandList = (ins variable_ops); let AsmString = "PHINODE"; + let hasSideEffects = 1; } def INLINEASM : Instruction { let OutOperandList = (outs); @@ -896,6 +900,7 @@ let InOperandList = (ins i32imm:$id); let AsmString = ""; let hasCtrlDep = 1; + let hasSideEffects = 1; let isNotDuplicable = 1; } def EH_LABEL : Instruction { @@ -903,6 +908,7 @@ let InOperandList = (ins i32imm:$id); let AsmString = ""; let hasCtrlDep = 1; + let hasSideEffects = 1; let isNotDuplicable = 1; } def GC_LABEL : Instruction { @@ -910,6 +916,7 @@ let InOperandList = (ins i32imm:$id); let AsmString = ""; let hasCtrlDep = 1; + let hasSideEffects = 1; let isNotDuplicable = 1; } def ANNOTATION_LABEL : Instruction { @@ -917,6 +924,7 @@ let InOperandList = (ins i32imm:$id); let AsmString = ""; let hasCtrlDep = 1; + let hasSideEffects = 1; let isNotDuplicable = 1; } def KILL : Instruction { @@ -984,6 +992,7 @@ let OutOperandList = (outs); let InOperandList = (ins variable_ops); let AsmString = "BUNDLE"; + let hasSideEffects = 1; } def LIFETIME_START : Instruction { let OutOperandList = (outs); @@ -1000,6 +1009,7 @@ def STACKMAP : Instruction { let OutOperandList = (outs); let InOperandList = (ins i64imm:$id, i32imm:$nbytes, variable_ops); + let hasSideEffects = 1; let isCall = 1; let mayLoad = 1; let usesCustomInserter = 1; @@ -1008,6 +1018,7 @@ let OutOperandList = (outs unknown:$dst); let InOperandList = (ins i64imm:$id, i32imm:$nbytes, unknown:$callee, i32imm:$nargs, i32imm:$cc, variable_ops); + let hasSideEffects = 1; let isCall = 1; let mayLoad = 1; let usesCustomInserter = 1; @@ -1042,6 +1053,7 @@ let OutOperandList = (outs unknown:$dst); let InOperandList = (ins variable_ops); let usesCustomInserter = 1; + let hasSideEffects = 1; let mayLoad = 1; let mayStore = 1; let isTerminator = 1; Index: lib/Target/Lanai/Lanai.td =================================================================== --- lib/Target/Lanai/Lanai.td +++ lib/Target/Lanai/Lanai.td @@ -22,7 +22,9 @@ include "LanaiCallingConv.td" include "LanaiInstrInfo.td" -def LanaiInstrInfo : InstrInfo; +def LanaiInstrInfo : InstrInfo { + let guessInstructionProperties = 0; +} //===----------------------------------------------------------------------===// // Lanai processors supported.