mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Use the 'target-features' and 'target-cpu' attributes to reset the subtarget features.
If two functions require different features (e.g., `-mno-sse' vs. `-msse') then we want to honor that, especially during LTO. We can do that by resetting the subtarget's features depending upon the 'target-feature' attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175314 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -354,6 +354,10 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
||||
TTI = getAnalysisIfAvailable<TargetTransformInfo>();
|
||||
GFI = Fn.hasGC() ? &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn) : 0;
|
||||
|
||||
TargetSubtargetInfo &ST =
|
||||
const_cast<TargetSubtargetInfo&>(TM.getSubtarget<TargetSubtargetInfo>());
|
||||
ST.resetSubtargetFeatures(MF);
|
||||
|
||||
DEBUG(dbgs() << "\n\n\n=== " << Fn.getName() << "\n");
|
||||
|
||||
SplitCriticalSideEffectEdges(const_cast<Function&>(Fn), this);
|
||||
|
Reference in New Issue
Block a user