Author: Fangrui Song
Date: 2020-01-24T10:38:39-08:00
New Revision: 50627622856e631bd522cefd84efe2c8070ef75e

URL: 
https://github.com/llvm/llvm-project/commit/50627622856e631bd522cefd84efe2c8070ef75e
DIFF: 
https://github.com/llvm/llvm-project/commit/50627622856e631bd522cefd84efe2c8070ef75e.diff

LOG: [XRay] Set hasSideEffects flag of PATCHABLE_FUNCTION_{ENTER,EXIT}

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 a72d15e37c5e066f597f13a8ba60aff214ac992d)

Added: 
    

Modified: 
    llvm/include/llvm/Target/Target.td

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Target/Target.td 
b/llvm/include/llvm/Target/Target.td
index b122b51bb169..cdc9b640e74e 100644
--- a/llvm/include/llvm/Target/Target.td
+++ b/llvm/include/llvm/Target/Target.td
@@ -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);
@@ -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 {


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to