summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/CodeGen/MachineInstr.h7
-rw-r--r--llvm/include/llvm/Target/Target.td8
2 files changed, 10 insertions, 5 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h
index 88a697055e8..65e4c243183 100644
--- a/llvm/include/llvm/CodeGen/MachineInstr.h
+++ b/llvm/include/llvm/CodeGen/MachineInstr.h
@@ -797,9 +797,14 @@ public:
bool isEHLabel() const { return getOpcode() == TargetOpcode::EH_LABEL; }
bool isGCLabel() const { return getOpcode() == TargetOpcode::GC_LABEL; }
+ bool isAnnotationLabel() const {
+ return getOpcode() == TargetOpcode::ANNOTATION_LABEL;
+ }
/// Returns true if the MachineInstr represents a label.
- bool isLabel() const { return isEHLabel() || isGCLabel(); }
+ bool isLabel() const {
+ return isEHLabel() || isGCLabel() || isAnnotationLabel();
+ }
bool isCFIInstruction() const {
return getOpcode() == TargetOpcode::CFI_INSTRUCTION;
diff --git a/llvm/include/llvm/Target/Target.td b/llvm/include/llvm/Target/Target.td
index 27c8f409989..302ca34e07d 100644
--- a/llvm/include/llvm/Target/Target.td
+++ b/llvm/include/llvm/Target/Target.td
@@ -906,7 +906,7 @@ def CFI_INSTRUCTION : Instruction {
let InOperandList = (ins i32imm:$id);
let AsmString = "";
let hasCtrlDep = 1;
- let hasSideEffects = 1;
+ let hasSideEffects = 0;
let isNotDuplicable = 1;
}
def EH_LABEL : Instruction {
@@ -914,7 +914,7 @@ def EH_LABEL : Instruction {
let InOperandList = (ins i32imm:$id);
let AsmString = "";
let hasCtrlDep = 1;
- let hasSideEffects = 1;
+ let hasSideEffects = 0;
let isNotDuplicable = 1;
}
def GC_LABEL : Instruction {
@@ -922,7 +922,7 @@ def GC_LABEL : Instruction {
let InOperandList = (ins i32imm:$id);
let AsmString = "";
let hasCtrlDep = 1;
- let hasSideEffects = 1;
+ let hasSideEffects = 0;
let isNotDuplicable = 1;
}
def ANNOTATION_LABEL : Instruction {
@@ -930,7 +930,7 @@ def ANNOTATION_LABEL : Instruction {
let InOperandList = (ins i32imm:$id);
let AsmString = "";
let hasCtrlDep = 1;
- let hasSideEffects = 1;
+ let hasSideEffects = 0;
let isNotDuplicable = 1;
}
def KILL : Instruction {
OpenPOWER on IntegriCloud