[PATCH] D151730: [RISCV] Support target attribute for function

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 11:48:50 PDT 2023


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/TargetInfo.h:1401
+    return getTriple().isX86() || getTriple().isAArch64() ||
+           getTriple().isRISCV();
   }
----------------
Is this needed for target attribute? The description to me reads like its for doing runtime dispatch with ifunc.


================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:260
+
+  for (const std::string &Feature : ImpliedFeatures)
+    UpdatedFeatures.push_back(Feature);
----------------
UpdatedFeatures.insert(UpdatedFeatures.end(), ImpliedFeatures.begin(), ImpliedFeatures.end())


================
Comment at: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp:247
+  const MCSubtargetInfo &MCSTI = *TM.getMCSubtargetInfo();
+  for (auto Feature : RISCVFeatureKV) {
+    if (!llvm::RISCVISAInfo::isSupportedExtensionFeature(Feature.Key))
----------------
const auto &Feature


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151730/new/

https://reviews.llvm.org/D151730



More information about the cfe-commits mailing list