[PATCH] D46641: [mips] WIP: Merge MipsLongBranch and MipsHazardSchedule passes

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 05:05:32 PDT 2018


sdardis added inline comments.


================
Comment at: lib/Target/Mips/MipsBranchExpansion.cpp:14
+///   is too large to fit into its immediate field,
+/// - it covers compact branch hazards.
+///
----------------
it inserts nops to prevent forbidden slot hazards.


================
Comment at: lib/Target/Mips/MipsBranchExpansion.cpp:16
+///
+/// The reason why this pass enclose these two tasks is that one of these two
+/// tasks can break the result of the previous one.
----------------
combines these two tasks


================
Comment at: lib/Target/Mips/MipsBranchExpansion.cpp:20
+/// Example of that is a situation where at first, no branch should be expanded,
+/// but after adding at least one nop somewhere in the code to prevent hazard,
+/// offset of some branches may go out of range. In that case it is necessary
----------------
a forbidden slot hazard


================
Comment at: lib/Target/Mips/MipsBranchExpansion.cpp:36
+/// FIXME: Fix pc-region jump instructions which cross 256MB segment boundaries.
+/// TODO: Handlie out of range bc instructions.
+///
----------------
bc, b (pseudo) instructions


================
Comment at: lib/Target/Mips/MipsBranchExpansion.cpp:109
+
+#define DEBUG_TYPE "mips-long-branch-and-hazard-pass"
+
----------------
mips-branch-expansion


Repository:
  rL LLVM

https://reviews.llvm.org/D46641





More information about the llvm-commits mailing list