[llvm] 70a3c9f - [WebAssembly][SelectionDAG] Remove unused WebAssemblyDAGToDAGISel::ForCodeSize.

Hiroshi Yamauchi via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 09:00:51 PST 2019


Author: Hiroshi Yamauchi
Date: 2019-11-22T09:00:23-08:00
New Revision: 70a3c9f55f8494829d06caae0ab988da518d0e15

URL: https://github.com/llvm/llvm-project/commit/70a3c9f55f8494829d06caae0ab988da518d0e15
DIFF: https://github.com/llvm/llvm-project/commit/70a3c9f55f8494829d06caae0ab988da518d0e15.diff

LOG: [WebAssembly][SelectionDAG] Remove unused WebAssemblyDAGToDAGISel::ForCodeSize.

Summary:
This follows from the discussion at D70095.

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.

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, aheejin, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70567

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
index f83a8a984ae0..435c63a51d89 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
@@ -35,12 +35,10 @@ class WebAssemblyDAGToDAGISel final : public SelectionDAGISel {
   /// right decision when generating code for 
diff erent 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 @@ class WebAssemblyDAGToDAGISel final : public SelectionDAGISel {
                          "********** Function: "
                       << MF.getName() << '\n');
 
-    ForCodeSize = MF.getFunction().hasOptSize();
     Subtarget = &MF.getSubtarget<WebAssemblySubtarget>();
 
     // Wasm64 is not fully supported right now (and is not specified)


        


More information about the llvm-commits mailing list