[PATCH] D23067: TargetInstrInfo: add two new target hooks to analyse branch offsets

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 09:48:08 PDT 2016


arsenm added inline comments.

================
Comment at: include/llvm/Target/TargetInstrInfo.h:495-506
@@ -483,1 +494,14 @@
+
+  /// Return the upperbound value of the supported branch range, or -1 if
+  /// it is not implemented.
+  virtual int64_t getBranchRangeUpperbound(unsigned Opcode) const {
+    return -1;
+  }
+
+  /// Return the lowerbound value of the supported branch range, or 1 if
+  /// it is not implemented.
+  virtual int64_t getBranchRangeLowerbound(unsigned Opcode) const {
+    return 1;
+  }
+
   /// Represents a predicate at the MachineFunction level.  The control flow a
----------------
Why do you need these? I don't think these are the right API, and the isBranchOffsetInRange is better


https://reviews.llvm.org/D23067





More information about the llvm-commits mailing list