[PATCH] D70567: [WebAssembly][SelectionDAG] Remove unused WebAssemblyDAGToDAGISel::ForCodeSize.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 13:53:37 PST 2019


yamauchi created this revision.
Herald added subscribers: sunfish, aheejin, hiraditya, jgravelle-google, sbc100, dschuff.
Herald added a project: LLVM.

This follows from the discussion at D70095 <https://reviews.llvm.org/D70095>.

D70095 <https://reviews.llvm.org/D70095> moves hasOptSize calls into SelectionDAG::shouldOptForSize to allow
querying size optimization conditions together with profile guided size
optimization.

Since it appears that size optimizations for WebAssembly SelectionDAG haven't
been implemented yet and thus ForCodeSize is unused, and it would not make a lot
of sense to call shouldOptForSize here as the necessary profile data like
PSI/BFI aren't available at this point, it seems good and less confusing to
remove this for now and use shouldOptForSize when they are implemented in the
future.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70567

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp


Index: llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
@@ -35,12 +35,10 @@
   /// right decision when generating code for different targets.
   const WebAssemblySubtarget *Subtarget;
 
-  bool ForCodeSize;
-
 public:
   WebAssemblyDAGToDAGISel(WebAssemblyTargetMachine &TM,
                           CodeGenOpt::Level OptLevel)
-      : SelectionDAGISel(TM, OptLevel), Subtarget(nullptr), ForCodeSize(false) {
+      : SelectionDAGISel(TM, OptLevel), Subtarget(nullptr) {
   }
 
   StringRef getPassName() const override {
@@ -52,7 +50,6 @@
                          "********** Function: "
                       << MF.getName() << '\n');
 
-    ForCodeSize = MF.getFunction().hasOptSize();
     Subtarget = &MF.getSubtarget<WebAssemblySubtarget>();
 
     // Wasm64 is not fully supported right now (and is not specified)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70567.230531.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191121/ae7e84a3/attachment.bin>


More information about the llvm-commits mailing list