kkwli wrote: > While it makes sense to me that target features are set-up and emitted for > PPC, I do not get why the way is done has to be modified in a custom way for > PPC (see inline comments). I am not saying the changes are not needed, I just > do not understand why it is only needed for PPC. > > Can you explain what is not going as expected if you where to not add the new > targetFeatureStr and set-it up in getExplicitAndImplicitPPCTargetFeatures?
@jeanPerier Thanks for the review. The issue I encounter is in `CompilerInstance::setUpTargetMachine` the call to `createTargetMachine` adds some extra features by `computeFSAdditions`. The extra features are not part of what clang emits. One of my requirements is to emit an identical list so that LTO can take advantage of. My approach is to preserve the list return from `llvm::PPC::getPPCDefaultTargetFeatures` and to use it for the call to `fir::setTargetFeatures` in `Fortran::lower::LoweringBridge::LoweringBridge`. The reason to have the list `targetFeatureStr` in `TargetOptions` is to be closer to `featuresAsWritten` which is of similar nature. https://github.com/llvm/llvm-project/pull/169860 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
