[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 05:18:13 PST 2024


================
@@ -4303,21 +4288,15 @@ void CodeGenModule::emitMultiVersionFunctions() {
                 continue;
 
               llvm::Function *Func = createFunction(CurFD, I);
-              StringRef Architecture;
               Feats.clear();
-              if (getTarget().getTriple().isAArch64())
-                TC->getFeatures(Feats, I);
-              else if (getTarget().getTriple().isRISCV()) {
-                StringRef Version = TC->getFeatureStr(I);
-                Feats.push_back(Version);
+              if (getTarget().getTriple().isX86()) {
+                TC->getAddedFeatures(Feats, I);
----------------
phoebewang wrote:

So my initial question is given it's already split by `,`, why do we split again here https://github.com/llvm/llvm-project/pull/116257/files#diff-ae2ec9524bdbeea1f06917607482634dd89af5bcbb929805032463e5dafe79e7R3353

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


More information about the cfe-commits mailing list