================
@@ -311,11 +311,15 @@ ARMBaseTargetMachine::getSubtargetImpl(const Function &F) 
const {
     // function that reside in TargetOptions.
     resetTargetOptions(F);
     I = std::make_unique<ARMSubtarget>(TargetTriple, CPU, FS, *this, isLittle,
-                                        F.hasMinSize());
+                                       F.hasMinSize());
 
     if (!I->isThumb() && !I->hasARMOps())
       F.getContext().emitError("Function '" + F.getName() + "' uses ARM "
           "instructions, but the target does not support ARM mode execution.");
+
----------------
smithp35 wrote:

IIUC [*] TargetMachine::getSubtargetImpl is the "global" subtarget. It has been 
a long time since I've looked at the area so I could be wrong.

Putting the warning here makes me nervous as individual functions have their 
own subtargets. It is common for LTO to rely entirely on the per function 
subtarget. I can remember an Android problem that was caused by using the 
global subtarget for a per-function property.

https://github.com/llvm/llvm-project/pull/111334
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to