aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
index 619617049bb2..7622164449a5 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
@@ -31,8 +31,6 @@ struct WebAssemblyFunctionInfo;
/// This class is derived from MachineFunctionInfo and contains private
/// WebAssembly-specific information for each MachineFunction.
class WebAssemblyFunctionInfo final : public MachineFunctionInfo {
- const MachineFunction *MF;
-
std::vector<MVT> Params;
std::vector<MVT> Results;
std::vector<MVT> Locals;
@@ -66,12 +64,9 @@ class WebAssemblyFunctionInfo final : public MachineFunctionInfo {
// Function properties.
bool CFGStackified = false;
- // Catchpad unwind destination info for wasm EH.
- WasmEHFuncInfo *WasmEHInfo = nullptr;
-
public:
- explicit WebAssemblyFunctionInfo(MachineFunction &MF_)
- : MF(&MF_), WasmEHInfo(MF_.getWasmEHFuncInfo()) {}
+ explicit WebAssemblyFunctionInfo(const Function &F,
+ const TargetSubtargetInfo *STI) {}
~WebAssemblyFunctionInfo() override;
MachineFunctionInfo *
@@ -79,9 +74,8 @@ public:
const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)
const override;
- const MachineFunction &getMachineFunction() const { return *MF; }
-
- void initializeBaseYamlFields(const yaml::WebAssemblyFunctionInfo &YamlMFI);
+ void initializeBaseYamlFields(MachineFunction &MF,
+ const yaml::WebAssemblyFunctionInfo &YamlMFI);
void addParam(MVT VT) { Params.push_back(VT); }
const std::vector<MVT> &getParams() const { return Params; }
@@ -166,9 +160,6 @@ public:
bool isCFGStackified() const { return CFGStackified; }
void setCFGStackified(bool Value = true) { CFGStackified = Value; }
-
- WasmEHFuncInfo *getWasmEHFuncInfo() const { return WasmEHInfo; }
- void setWasmEHFuncInfo(WasmEHFuncInfo *Info) { WasmEHInfo = Info; }
};
void computeLegalValueVTs(const WebAssemblyTargetLowering &TLI,
@@ -205,7 +196,8 @@ struct WebAssemblyFunctionInfo final : public yaml::MachineFunctionInfo {
BBNumberMap SrcToUnwindDest;
WebAssemblyFunctionInfo() = default;
- WebAssemblyFunctionInfo(const llvm::WebAssemblyFunctionInfo &MFI);
+ WebAssemblyFunctionInfo(const llvm::MachineFunction &MF,
+ const llvm::WebAssemblyFunctionInfo &MFI);
void mappingImpl(yaml::IO &YamlIO) override;
~WebAssemblyFunctionInfo() = default;