[llvm] [WebAssembly] Update generic and bleeding-edge CPUs (PR #96584)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 19:26:17 PDT 2024


https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/96584

This updates the list of features in 'generic' and 'bleeding-edge' CPUs in the backend to match
https://github.com/llvm/llvm-project/blob/4e0a0eae58f7a6998866719f7eb970096a2a52e9/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L175.

It is hard to add a backend test for this, given that we don't have a convenient way of testing the list of features included in each cpu like the preprocessor test in Clang:
https://github.com/llvm/llvm-project/blob/4e0a0eae58f7a6998866719f7eb970096a2a52e9/clang/test/Preprocessor/wasm-target-features.c#L158-L208 And the current features for 'generic' and 'bleeding-edge' don't have a separate backend test anyway.

>From c35701860870bd7f082d11808ec5d3262bd7669b Mon Sep 17 00:00:00 2001
From: Heejin Ahn <aheejin at gmail.com>
Date: Tue, 25 Jun 2024 02:21:23 +0000
Subject: [PATCH] [WebAssembly] Update generic and bleeding-edge CPUs

This updates the list of features in 'generic' and 'bleeding-edge' CPUs
in the backend to match
https://github.com/llvm/llvm-project/blob/4e0a0eae58f7a6998866719f7eb970096a2a52e9/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L175.

It is hard to add a backend test for this, given that we don't have a
convenient way of testing the list of features included in each cpu like
the preprocessor test in Clang:
https://github.com/llvm/llvm-project/blob/4e0a0eae58f7a6998866719f7eb970096a2a52e9/clang/test/Preprocessor/wasm-target-features.c#L158-L208
And the current features for 'generic' and 'bleeding-edge' don't have a
separate backend test anyway.
---
 llvm/lib/Target/WebAssembly/WebAssembly.td | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/llvm/lib/Target/WebAssembly/WebAssembly.td b/llvm/lib/Target/WebAssembly/WebAssembly.td
index 0dd674426e9e8..97618617ff82f 100644
--- a/llvm/lib/Target/WebAssembly/WebAssembly.td
+++ b/llvm/lib/Target/WebAssembly/WebAssembly.td
@@ -110,13 +110,17 @@ def : ProcessorModel<"mvp", NoSchedModel, []>;
 // consideration given to available support in relevant engines and tools, and
 // the importance of the features.
 def : ProcessorModel<"generic", NoSchedModel,
-                      [FeatureSignExt, FeatureMutableGlobals]>;
+                      [FeatureMultivalue, FeatureMutableGlobals,
+                       FeatureReferenceTypes, FeatureSignExt]>;
 
 // Latest and greatest experimental version of WebAssembly. Bugs included!
 def : ProcessorModel<"bleeding-edge", NoSchedModel,
-                      [FeatureSIMD128, FeatureAtomics,
-                       FeatureNontrappingFPToInt, FeatureSignExt,
-                       FeatureMutableGlobals, FeatureBulkMemory,
+                      [FeatureAtomics, FeatureBulkMemory,
+                       FeatureExceptionHandling, FeatureExtendedConst,
+                       FeatureHalfPrecision, FeatureMultiMemory,
+                       FeatureMultivalue, FeatureMutableGlobals,
+                       FeatureNontrappingFPToInt, FeatureRelaxedSIMD,
+                       FeatureReferenceTypes, FeatureSIMD128, FeatureSignExt,
                        FeatureTailCall]>;
 
 //===----------------------------------------------------------------------===//



More information about the llvm-commits mailing list