[llvm] CSKY: Consume "float-abi" module flag (PR #212975)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 10:47:29 PDT 2026


================
@@ -59,10 +60,16 @@ CSKYTargetMachine::getSubtargetImpl(const Function &F) const {
   std::string FS =
       FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS;
 
+  FloatABI::ABIType FloatABI = F.getParent()->getFloatABI();
+  if (FloatABI == FloatABI::Default)
+    FloatABI = Options.FloatABIType;
+
   std::string Key = CPU + TuneCPU + FS;
+  Key += FloatABI == FloatABI::Soft ? "+soft-float-abi" : "+hard-float-abi";
----------------
s-barannikov wrote:

I feel a bit out of scope here.
If the option and subtarget feature are going to be removed soon, why do we need to adjust Key?
Also, why pass FloatABI to subtarget? If the abi is going to be strictly module-level, it is the same for all subtargets, why copy it into each subtarget instance?


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


More information about the llvm-commits mailing list