[llvm] Fix mechanism propagating mangled names for TLI function mappings (PR #66656)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 08:04:05 PDT 2023
================
@@ -27,11 +27,40 @@ class Triple;
/// Describes a possible vectorization of a function.
/// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
/// by a factor 'VectorizationFactor'.
-struct VecDesc {
+/// The MangledName string holds scalar-to-vector mapping:
+/// _ZGV<isa><mask><vlen><vparams>_<scalarname>(<vectorname>)
+///
+/// where:
+///
+/// <isa> = "_LLVM_"
+/// <mask> = "M" if masked, "N" if no mask.
+/// <vlen> = Number of concurrent lanes, stored in the `VectorizationFactor`
+/// field of the `VecDesc` struct. If the number of lanes is scalable
+/// then 'x' is printed instead.
+/// <vparams> = "v", as many as are the numArgs.
+/// <scalarname> = the name of the scalar function.
+/// <vectorname> = the name of the vector function.
+class VecDesc {
+private:
StringRef ScalarFnName;
StringRef VectorFnName;
ElementCount VectorizationFactor;
bool Masked;
+ StringRef MangledName;
+
+public:
+ VecDesc() = delete;
+ VecDesc(StringRef ScalarFnName, StringRef VectorFnName,
+ ElementCount VectorizationFactor, bool Masked, StringRef MangledName)
+ : ScalarFnName(ScalarFnName), VectorFnName(VectorFnName),
+ VectorizationFactor(VectorizationFactor), Masked(Masked),
+ MangledName(MangledName) {}
+
+ StringRef getScalarFnName() const { return ScalarFnName; }
+ StringRef getVectorFnName() const { return VectorFnName; }
+ ElementCount getVectorizationFactor() const { return VectorizationFactor; }
+ bool getMasked() const { return Masked; }
+ StringRef getMangledName() const { return MangledName; }
----------------
JolantaJensen wrote:
Fixed. `getMangledName()` is removed.
https://github.com/llvm/llvm-project/pull/66656
More information about the llvm-commits
mailing list