@@ -24,13 +24,13 @@ class Function;
24
24
class Module ;
25
25
class Triple ;
26
26
27
- // / Describes a possible vectorization of a function.
28
- // / Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
29
- // / by a factor 'VectorizationFactor'.
30
- // / The MangledName string holds scalar-to-vector mapping:
27
+ // / Provides info so a possible vectorization of a function can be
28
+ // / computed. Function 'VectorFnName' is equivalent to 'ScalarFnName'
29
+ // / vectorized by a factor 'VectorizationFactor'.
30
+ // / The MangledNamePrefix string holds information about isa, mask, vlen,
31
+ // / and vparams so a scalar-to-vector mapping of the form:
31
32
// / _ZGV<isa><mask><vlen><vparams>_<scalarname>(<vectorname>)
32
- // /
33
- // / where:
33
+ // / can be constructed where:
34
34
// /
35
35
// / <isa> = "_LLVM_"
36
36
// / <mask> = "M" if masked, "N" if no mask.
@@ -41,26 +41,26 @@ class Triple;
41
41
// / <scalarname> = the name of the scalar function.
42
42
// / <vectorname> = the name of the vector function.
43
43
class VecDesc {
44
- private:
45
44
StringRef ScalarFnName;
46
45
StringRef VectorFnName;
47
46
ElementCount VectorizationFactor;
48
47
bool Masked;
49
- StringRef MangledName ;
48
+ StringRef MangledNamePrefix ;
50
49
51
50
public:
52
51
VecDesc () = delete ;
53
52
VecDesc (StringRef ScalarFnName, StringRef VectorFnName,
54
- ElementCount VectorizationFactor, bool Masked, StringRef MangledName)
53
+ ElementCount VectorizationFactor, bool Masked,
54
+ StringRef MangledNamePrefix)
55
55
: ScalarFnName(ScalarFnName), VectorFnName(VectorFnName),
56
56
VectorizationFactor (VectorizationFactor), Masked(Masked),
57
- MangledName(MangledName ) {}
57
+ MangledNamePrefix(MangledNamePrefix ) {}
58
58
59
59
StringRef getScalarFnName () const { return ScalarFnName; }
60
60
StringRef getVectorFnName () const { return VectorFnName; }
61
61
ElementCount getVectorizationFactor () const { return VectorizationFactor; }
62
- bool getMasked () const { return Masked; }
63
- StringRef getMangledName () const { return MangledName ; }
62
+ bool isMasked () const { return Masked; }
63
+ StringRef getMangledNamePrefix () const { return MangledNamePrefix ; }
64
64
};
65
65
66
66
enum LibFunc : unsigned {
@@ -200,16 +200,16 @@ class TargetLibraryInfoImpl {
200
200
// / vectorization factor.
201
201
bool isFunctionVectorizable (StringRef F) const ;
202
202
203
- // / Return the name of the equivalent of F, vectorized with factor VF.
204
- // / If no such mapping exists, return empty strings .
203
+ // / Return the name of the equivalent of F, vectorized with factor VF. If no
204
+ // / such mapping exists, return the empty string .
205
205
StringRef getVectorizedFunction (StringRef F, const ElementCount &VF,
206
206
bool Masked) const ;
207
207
208
208
// / Return a pointer to a VecDesc object holding all info for scalar to vector
209
209
// / mappings in TLI for the equivalent of F, vectorized with factor VF.
210
210
// / If no such mapping exists, return nullpointer.
211
- const VecDesc *getMangledTLIVectorName (StringRef F, const ElementCount &VF,
212
- bool Masked) const ;
211
+ const VecDesc *getVectorMappingInfo (StringRef F, const ElementCount &VF,
212
+ bool Masked) const ;
213
213
214
214
// / Set to true iff i32 parameters to library functions should have signext
215
215
// / or zeroext attributes if they correspond to C-level int or unsigned int,
@@ -389,9 +389,9 @@ class TargetLibraryInfo {
389
389
bool Masked = false ) const {
390
390
return Impl->getVectorizedFunction (F, VF, Masked);
391
391
}
392
- const VecDesc *getMangledTLIVectorName (StringRef F, const ElementCount &VF,
393
- bool Masked) const {
394
- return Impl->getMangledTLIVectorName (F, VF, Masked);
392
+ const VecDesc *getVectorMappingInfo (StringRef F, const ElementCount &VF,
393
+ bool Masked) const {
394
+ return Impl->getVectorMappingInfo (F, VF, Masked);
395
395
}
396
396
397
397
// / Tests if the function is both available and a candidate for optimized code
0 commit comments