[PATCH] D31959: Subtarget support for parametrized register class information

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 22:42:25 PST 2018


MatzeB added inline comments.


================
Comment at: llvm/trunk/include/llvm/Target/TargetSubtargetInfo.h:113-114
 
+  virtual unsigned getHwMode() const { return 0; }
+
   /// Target can subclass this hook to select a different DAG scheduler.
----------------
Please add a comment to public API.

Looking at how `getHwMode()` is used at the moment I also wonder if you need this to be a virtual function in the base class. Right now it seems to be only ever calls from specific classes, so it may be enough to let tablegen generate it in the subclasses. That way maybe you can also use a more specific type than `unsigned`.


Repository:
  rL LLVM

https://reviews.llvm.org/D31959





More information about the llvm-commits mailing list