Skip to content

Commit

Permalink
[XRay] Set hasSideEffects flag of PATCHABLE_FUNCTION_{ENTER,EXIT}
Browse files Browse the repository at this point in the history
Otherwise they may be picked as the delay slot by mips-delay-slot-filler, if we move patchable-function before mips-delay-slot-filler.

(cherry picked from commit a72d15e)
  • Loading branch information
MaskRay committed Jan 24, 2020
1 parent 39c349e commit 5062762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/include/llvm/Target/Target.td
Expand Up @@ -1182,7 +1182,7 @@ def PATCHABLE_FUNCTION_ENTER : StandardPseudoInstruction {
let InOperandList = (ins);
let AsmString = "# XRay Function Enter.";
let usesCustomInserter = 1;
let hasSideEffects = 0;
let hasSideEffects = 1;
}
def PATCHABLE_RET : StandardPseudoInstruction {
let OutOperandList = (outs);
Expand All @@ -1198,7 +1198,7 @@ def PATCHABLE_FUNCTION_EXIT : StandardPseudoInstruction {
let InOperandList = (ins);
let AsmString = "# XRay Function Exit.";
let usesCustomInserter = 1;
let hasSideEffects = 0; // FIXME: is this correct?
let hasSideEffects = 1;
let isReturn = 0; // Original return instruction will follow
}
def PATCHABLE_TAIL_CALL : StandardPseudoInstruction {
Expand Down

0 comments on commit 5062762

Please sign in to comment.