[PATCH] D39941: Set hasSideEffects=0 for TargetOpcode::{CFI_INSTRUCTION, EH_LABEL, GC_LABEL, ANNOTATION_LABEL}
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 10:26:18 PST 2017
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
Looks good. I think MachineInstr::isPosition is a more accurate way to identify these types of label instructions. If there is any code that relies on hasUnmodeledSideEffects, we can update it to check isPosition instead.
================
Comment at: include/llvm/Target/Target.td:933
let hasCtrlDep = 1;
- let hasSideEffects = 1;
+ let hasSideEffects = 0;
let isNotDuplicable = 1;
----------------
Can you check this opcode in `MachineInstr::isLabel`? I think I forgot to do that when I added it. Otherwise, I worry that it `MachineInstr::isSafeToMove` will return true for ANNOTATION_LABEL after this change.
https://reviews.llvm.org/D39941
More information about the llvm-commits
mailing list