OSDN Git Service

[WebAssembly] Use Function::hasOptSize() (NFC)
authorHeejin Ahn <aheejin@gmail.com>
Sat, 13 Apr 2019 16:54:39 +0000 (16:54 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Sat, 13 Apr 2019 16:54:39 +0000 (16:54 +0000)
Summary: Use member function.

Reviewers: aheejin

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

Tags: #llvm

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

Patch by Hideto Ueno (uenoku)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358336 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp

index 40ec915..852e2e7 100644 (file)
@@ -51,8 +51,7 @@ public:
                          "********** Function: "
                       << MF.getName() << '\n');
 
-    ForCodeSize = MF.getFunction().hasFnAttribute(Attribute::OptimizeForSize) ||
-                  MF.getFunction().hasFnAttribute(Attribute::MinSize);
+    ForCodeSize = MF.getFunction().hasOptSize();
     Subtarget = &MF.getSubtarget<WebAssemblySubtarget>();
     return SelectionDAGISel::runOnMachineFunction(MF);
   }