[PATCH] D73835: [IRBuilder] Virtualize IRBuilder

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 16 04:02:14 PST 2020


nhaehnle accepted this revision.
nhaehnle added a comment.
This revision is now accepted and ready to land.

Two minor questions, apart from that LGTM.



================
Comment at: llvm/include/llvm/Analysis/TargetFolder.h:32
 /// TargetFolder - Create constants with target dependent folding.
-class TargetFolder {
+class TargetFolder : public IRBuilderFolder {
   const DataLayout &DL;
----------------
Could we make the TargetFolder final?


================
Comment at: llvm/include/llvm/IR/ConstantFolder.h:28
 /// ConstantFolder - Create constants with minimum, target independent, folding.
-class ConstantFolder {
+class ConstantFolder : public IRBuilderFolder {
+  virtual void anchor();
----------------
Same question here: could we make the ConstantFolder final?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73835/new/

https://reviews.llvm.org/D73835





More information about the llvm-commits mailing list