[llvm] [WebAssembly] Add missing feature methods (PR #90644)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 11:19:24 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-webassembly

Author: Heejin Ahn (aheejin)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/90644.diff


2 Files Affected:

- (modified) llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td (+4) 
- (modified) llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h (+1) 


``````````diff
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
index 7b57f8ce90e066..fb2ca532d2523e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
@@ -78,6 +78,10 @@ def HasMultiMemory :
     Predicate<"Subtarget->hasMultiMemory()">,
     AssemblerPredicate<(all_of FeatureMultiMemory), "multimemory">;
 
+def HasMutableGlobals:
+    Predicate<"Subtarget->hasMutableGlobals()">,
+    AssemblerPredicate<(all_of FeatureMutableGlobals), "mutable-globals">;
+
 //===----------------------------------------------------------------------===//
 // WebAssembly-specific DAG Node Types.
 //===----------------------------------------------------------------------===//
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h b/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
index 8b0d9fa12de8f3..cb4589961867e6 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
@@ -105,6 +105,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
   bool hasTailCall() const { return HasTailCall; }
   bool hasReferenceTypes() const { return HasReferenceTypes; }
   bool hasMultiMemory() const { return HasMultiMemory; }
+  bool hasExtendedConst() const { return HasExtendedConst; }
 
   /// Parses features string setting specified subtarget options. Definition of
   /// function is auto generated by tblgen.

``````````

</details>


https://github.com/llvm/llvm-project/pull/90644


More information about the llvm-commits mailing list