[PATCH] D77894: [WebAssembly] Minor cleanup to WebAssemblySubtarget. NFC.
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 17:15:20 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG16206ee07d35: [WebAssembly] Minor cleanup to WebAssemblySubtarget. NFC. (authored by sbc100).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77894/new/
https://reviews.llvm.org/D77894
Files:
llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
Index: llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
+++ llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
@@ -49,9 +49,6 @@
bool HasTailCall = false;
bool HasReferenceTypes = false;
- /// String name of used CPU.
- std::string CPUString;
-
/// What processor and OS we're targeting.
Triple TargetTriple;
@@ -60,9 +57,8 @@
WebAssemblySelectionDAGInfo TSInfo;
WebAssemblyTargetLowering TLInfo;
- /// Initializes using CPUString and the passed in feature string so that we
- /// can use initializer lists for subtarget initialization.
- WebAssemblySubtarget &initializeSubtargetDependencies(StringRef FS);
+ WebAssemblySubtarget &initializeSubtargetDependencies(StringRef CPU,
+ StringRef FS);
public:
/// This constructor initializes the data members to match that
Index: llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
@@ -25,13 +25,15 @@
#include "WebAssemblyGenSubtargetInfo.inc"
WebAssemblySubtarget &
-WebAssemblySubtarget::initializeSubtargetDependencies(StringRef FS) {
+WebAssemblySubtarget::initializeSubtargetDependencies(StringRef CPU,
+ StringRef FS) {
// Determine default and user-specified characteristics
+ LLVM_DEBUG(llvm::dbgs() << "initializeSubtargetDependencies\n");
- if (CPUString.empty())
- CPUString = "generic";
+ if (CPU.empty())
+ CPU = "generic";
- ParseSubtargetFeatures(CPUString, FS);
+ ParseSubtargetFeatures(CPU, FS);
return *this;
}
@@ -39,10 +41,9 @@
const std::string &CPU,
const std::string &FS,
const TargetMachine &TM)
- : WebAssemblyGenSubtargetInfo(TT, CPU, FS), CPUString(CPU),
- TargetTriple(TT), FrameLowering(),
- InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(),
- TLInfo(TM, *this) {}
+ : WebAssemblyGenSubtargetInfo(TT, CPU, FS), TargetTriple(TT),
+ FrameLowering(), InstrInfo(initializeSubtargetDependencies(CPU, FS)),
+ TSInfo(), TLInfo(TM, *this) {}
bool WebAssemblySubtarget::enableAtomicExpand() const {
// If atomics are disabled, atomic ops are lowered instead of expanded
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77894.256709.patch
Type: text/x-patch
Size: 2593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200411/ef6304e9/attachment.bin>
More information about the llvm-commits
mailing list