[PATCH] Don't report the error when non-dangerous load/store is in branch delay slot

Sasa Stankovic Sasa.Stankovic at imgtec.com
Fri Jun 6 16:31:44 PDT 2014


================
Comment at: lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp:151
@@ +150,3 @@
+
+    // Sandbox loads, stores and SP changes.
+    unsigned AddrIdx;
----------------
Mark Seaborn wrote:
> I don't get why you've reordered this chunk of code.  Surely the ordering doesn't matter, because Inst can't be both a call and a memory access on MIPS, can it?
If for the load/store or stack change instruction the condition (MaskBefore || MaskAfter) is false, then in the original ordering the code would first unnecessary check whether the instruction is call (it isn't), and then would check whether the instruction is in the branch delay slot ("if (PendingCall)"). With the ordering in the patch, the unnecessary check whether the instruction is call is avoided.

http://reviews.llvm.org/D4048






More information about the llvm-commits mailing list