[flang-commits] [clang] [flang] [flang] Emit target features for PPC (PR #169860)
via flang-commits
flang-commits at lists.llvm.org
Fri Dec 12 05:53:33 PST 2025
https://github.com/jeanPerier commented:
Thanks for the explanation, well it is a bit weird to me that `targetMachine->getTargetFeatureString()` is not the single source of truth once created (why is it not what LLVM uses in the producer IR?), but that problem seems to not be flang specific here.
For the flang part, I am not an expert with the driver, but the fact that the compiler instance is modifying the compiler invocation seems a bit reverse to me (as I understand it, one invocation can be shared by multiple instances). I would welcome some driver expert feedback here like @tblah or @banach-space.
My minimum request on my side would be to avoid having the side effect in `getExplicitAndImplicitPPCTargetFeatures`, and to centralize the setting of `targetOpts.targetFeatureStr` in `CompilerInstance::setUpTargetMachine` using `featuresStr` for the PPC case after the `if (!triple.isPPC())` case.
https://github.com/llvm/llvm-project/pull/169860
More information about the flang-commits
mailing list