aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-03-26 17:46:14 +0000
committerHeejin Ahn <aheejin@gmail.com>2019-03-26 17:46:14 +0000
commit1aaa481fc1f8ad45d36e7e9e9340d22790a7c739 (patch)
tree98f71cadec07d5afe82d7519b5d867fa7e961aa4 /llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
parent57839425aa4802986acbb17392ca697ee76aa633 (diff)
downloadllvm-1aaa481fc1f8ad45d36e7e9e9340d22790a7c739.zip
llvm-1aaa481fc1f8ad45d36e7e9e9340d22790a7c739.tar.gz
llvm-1aaa481fc1f8ad45d36e7e9e9340d22790a7c739.tar.bz2
[WebAssembly] Add CFGStacikfied field to WebAssemblyFunctionInfo
Summary: This adds `CFGStackified` field and its serialization to WebAssemblyFunctionInfo. Reviewers: dschuff Subscribers: sunfish, sbc100, jgravelle-google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59747 llvm-svn: 357011
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
index 6844656..4b9ba49 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
@@ -56,6 +56,9 @@ class WebAssemblyFunctionInfo final : public MachineFunctionInfo {
// overaligned values on the user stack.
unsigned BasePtrVreg = -1U;
+ // Function properties.
+ bool CFGStackified = false;
+
public:
explicit WebAssemblyFunctionInfo(MachineFunction &MF) : MF(MF) {}
~WebAssemblyFunctionInfo() override;
@@ -123,6 +126,9 @@ public:
assert(Reg & INT32_MIN);
return Reg & INT32_MAX;
}
+
+ bool isCFGStackified() const { return CFGStackified; }
+ void setCFGStackified(bool Value = true) { CFGStackified = Value; }
};
void computeLegalValueVTs(const Function &F, const TargetMachine &TM, Type *Ty,
@@ -144,6 +150,8 @@ signatureFromMVTs(const SmallVectorImpl<MVT> &Results,
namespace yaml {
struct WebAssemblyFunctionInfo final : public yaml::MachineFunctionInfo {
+ bool CFGStackified = false;
+
WebAssemblyFunctionInfo() = default;
WebAssemblyFunctionInfo(const llvm::WebAssemblyFunctionInfo &MFI);
@@ -152,7 +160,9 @@ struct WebAssemblyFunctionInfo final : public yaml::MachineFunctionInfo {
};
template <> struct MappingTraits<WebAssemblyFunctionInfo> {
- static void mapping(IO &YamlIO, WebAssemblyFunctionInfo &MFI) {}
+ static void mapping(IO &YamlIO, WebAssemblyFunctionInfo &MFI) {
+ YamlIO.mapOptional("isCFGStackified", MFI.CFGStackified, false);
+ }
};
} // end namespace yaml