mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Remove resetSubtargetFeatures as it is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -160,10 +160,6 @@ public:
|
|||||||
|
|
||||||
/// \brief Enable the use of the early if conversion pass.
|
/// \brief Enable the use of the early if conversion pass.
|
||||||
virtual bool enableEarlyIfConversion() const { return false; }
|
virtual bool enableEarlyIfConversion() const { return false; }
|
||||||
|
|
||||||
/// \brief Reset the features for the subtarget.
|
|
||||||
virtual void resetSubtargetFeatures(const MachineFunction *MF) { }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|||||||
@@ -421,9 +421,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
LibInfo = &getAnalysis<TargetLibraryInfo>();
|
LibInfo = &getAnalysis<TargetLibraryInfo>();
|
||||||
GFI = Fn.hasGC() ? &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn) : nullptr;
|
GFI = Fn.hasGC() ? &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn) : nullptr;
|
||||||
|
|
||||||
TargetSubtargetInfo &ST =
|
|
||||||
const_cast<TargetSubtargetInfo&>(TM.getSubtarget<TargetSubtargetInfo>());
|
|
||||||
ST.resetSubtargetFeatures(MF);
|
|
||||||
TM.resetTargetOptions(MF);
|
TM.resetTargetOptions(MF);
|
||||||
|
|
||||||
// Reset OptLevel to None for optnone functions.
|
// Reset OptLevel to None for optnone functions.
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ static std::string computeDataLayout(ARMSubtarget &ST) {
|
|||||||
ARMSubtarget &ARMSubtarget::initializeSubtargetDependencies(StringRef CPU,
|
ARMSubtarget &ARMSubtarget::initializeSubtargetDependencies(StringRef CPU,
|
||||||
StringRef FS) {
|
StringRef FS) {
|
||||||
initializeEnvironment();
|
initializeEnvironment();
|
||||||
resetSubtargetFeatures(CPU, FS);
|
initSubtargetFeatures(CPU, FS);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,23 +219,7 @@ void ARMSubtarget::initializeEnvironment() {
|
|||||||
UnsafeFPMath = false;
|
UnsafeFPMath = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARMSubtarget::resetSubtargetFeatures(const MachineFunction *MF) {
|
void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||||
AttributeSet FnAttrs = MF->getFunction()->getAttributes();
|
|
||||||
Attribute CPUAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex,
|
|
||||||
"target-cpu");
|
|
||||||
Attribute FSAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex,
|
|
||||||
"target-features");
|
|
||||||
std::string CPU =
|
|
||||||
!CPUAttr.hasAttribute(Attribute::None) ?CPUAttr.getValueAsString() : "";
|
|
||||||
std::string FS =
|
|
||||||
!FSAttr.hasAttribute(Attribute::None) ? FSAttr.getValueAsString() : "";
|
|
||||||
if (!FS.empty()) {
|
|
||||||
initializeEnvironment();
|
|
||||||
resetSubtargetFeatures(CPU, FS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|
||||||
if (CPUString.empty()) {
|
if (CPUString.empty()) {
|
||||||
if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s"))
|
if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s"))
|
||||||
// Default to the Swift CPU when targeting armv7s/thumbv7s.
|
// Default to the Swift CPU when targeting armv7s/thumbv7s.
|
||||||
|
|||||||
@@ -248,9 +248,6 @@ protected:
|
|||||||
/// subtarget options. Definition of function is auto generated by tblgen.
|
/// subtarget options. Definition of function is auto generated by tblgen.
|
||||||
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
|
|
||||||
/// \brief Reset the features for the ARM target.
|
|
||||||
void resetSubtargetFeatures(const MachineFunction *MF) override;
|
|
||||||
|
|
||||||
/// initializeSubtargetDependencies - Initializes using a CPU and feature string
|
/// initializeSubtargetDependencies - Initializes using a CPU and feature string
|
||||||
/// so that we can use initializer lists for subtarget initialization.
|
/// so that we can use initializer lists for subtarget initialization.
|
||||||
ARMSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
ARMSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
||||||
@@ -282,7 +279,7 @@ private:
|
|||||||
std::unique_ptr<ARMFrameLowering> FrameLowering;
|
std::unique_ptr<ARMFrameLowering> FrameLowering;
|
||||||
|
|
||||||
void initializeEnvironment();
|
void initializeEnvironment();
|
||||||
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
|
void initSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
public:
|
public:
|
||||||
void computeIssueWidth();
|
void computeIssueWidth();
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ static std::string getDataLayoutString(const Triple &T) {
|
|||||||
PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU,
|
PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU,
|
||||||
StringRef FS) {
|
StringRef FS) {
|
||||||
initializeEnvironment();
|
initializeEnvironment();
|
||||||
resetSubtargetFeatures(CPU, FS);
|
initSubtargetFeatures(CPU, FS);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,22 +84,6 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU,
|
|||||||
FrameLowering(initializeSubtargetDependencies(CPU, FS)), InstrInfo(*this),
|
FrameLowering(initializeSubtargetDependencies(CPU, FS)), InstrInfo(*this),
|
||||||
TLInfo(TM), TSInfo(&DL) {}
|
TLInfo(TM), TSInfo(&DL) {}
|
||||||
|
|
||||||
void PPCSubtarget::resetSubtargetFeatures(const MachineFunction *MF) {
|
|
||||||
AttributeSet FnAttrs = MF->getFunction()->getAttributes();
|
|
||||||
Attribute CPUAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex,
|
|
||||||
"target-cpu");
|
|
||||||
Attribute FSAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex,
|
|
||||||
"target-features");
|
|
||||||
std::string CPU =
|
|
||||||
!CPUAttr.hasAttribute(Attribute::None) ? CPUAttr.getValueAsString() : "";
|
|
||||||
std::string FS =
|
|
||||||
!FSAttr.hasAttribute(Attribute::None) ? FSAttr.getValueAsString() : "";
|
|
||||||
if (!FS.empty()) {
|
|
||||||
initializeEnvironment();
|
|
||||||
resetSubtargetFeatures(CPU, FS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PPCSubtarget::initializeEnvironment() {
|
void PPCSubtarget::initializeEnvironment() {
|
||||||
StackAlignment = 16;
|
StackAlignment = 16;
|
||||||
DarwinDirective = PPC::DIR_NONE;
|
DarwinDirective = PPC::DIR_NONE;
|
||||||
@@ -134,7 +118,7 @@ void PPCSubtarget::initializeEnvironment() {
|
|||||||
HasLazyResolverStubs = false;
|
HasLazyResolverStubs = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPCSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||||
// Determine default and user specified characteristics
|
// Determine default and user specified characteristics
|
||||||
std::string CPUName = CPU;
|
std::string CPUName = CPU;
|
||||||
if (CPUName.empty())
|
if (CPUName.empty())
|
||||||
|
|||||||
@@ -171,11 +171,9 @@ public:
|
|||||||
/// so that we can use initializer lists for subtarget initialization.
|
/// so that we can use initializer lists for subtarget initialization.
|
||||||
PPCSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
PPCSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
||||||
|
|
||||||
/// \brief Reset the features for the PowerPC target.
|
|
||||||
void resetSubtargetFeatures(const MachineFunction *MF) override;
|
|
||||||
private:
|
private:
|
||||||
void initializeEnvironment();
|
void initializeEnvironment();
|
||||||
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
|
void initSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// isPPC64 - Return true if we are generating code for 64-bit pointer mode.
|
/// isPPC64 - Return true if we are generating code for 64-bit pointer mode.
|
||||||
|
|||||||
@@ -183,23 +183,7 @@ bool X86Subtarget::IsLegalToCallImmediateAddr(const TargetMachine &TM) const {
|
|||||||
return isTargetELF() || TM.getRelocationModel() == Reloc::Static;
|
return isTargetELF() || TM.getRelocationModel() == Reloc::Static;
|
||||||
}
|
}
|
||||||
|
|
||||||
void X86Subtarget::resetSubtargetFeatures(const MachineFunction *MF) {
|
void X86Subtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||||
AttributeSet FnAttrs = MF->getFunction()->getAttributes();
|
|
||||||
Attribute CPUAttr =
|
|
||||||
FnAttrs.getAttribute(AttributeSet::FunctionIndex, "target-cpu");
|
|
||||||
Attribute FSAttr =
|
|
||||||
FnAttrs.getAttribute(AttributeSet::FunctionIndex, "target-features");
|
|
||||||
std::string CPU =
|
|
||||||
!CPUAttr.hasAttribute(Attribute::None) ? CPUAttr.getValueAsString() : "";
|
|
||||||
std::string FS =
|
|
||||||
!FSAttr.hasAttribute(Attribute::None) ? FSAttr.getValueAsString() : "";
|
|
||||||
if (!FS.empty()) {
|
|
||||||
initializeEnvironment();
|
|
||||||
resetSubtargetFeatures(CPU, FS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|
||||||
std::string CPUName = CPU;
|
std::string CPUName = CPU;
|
||||||
if (CPUName.empty())
|
if (CPUName.empty())
|
||||||
CPUName = "generic";
|
CPUName = "generic";
|
||||||
@@ -342,7 +326,7 @@ static std::string computeDataLayout(const Triple &TT) {
|
|||||||
X86Subtarget &X86Subtarget::initializeSubtargetDependencies(StringRef CPU,
|
X86Subtarget &X86Subtarget::initializeSubtargetDependencies(StringRef CPU,
|
||||||
StringRef FS) {
|
StringRef FS) {
|
||||||
initializeEnvironment();
|
initializeEnvironment();
|
||||||
resetSubtargetFeatures(CPU, FS);
|
initSubtargetFeatures(CPU, FS);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,14 +283,12 @@ public:
|
|||||||
/// subtarget options. Definition of function is auto generated by tblgen.
|
/// subtarget options. Definition of function is auto generated by tblgen.
|
||||||
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
|
|
||||||
/// \brief Reset the features for the X86 target.
|
|
||||||
void resetSubtargetFeatures(const MachineFunction *MF) override;
|
|
||||||
private:
|
private:
|
||||||
/// \brief Initialize the full set of dependencies so we can use an initializer
|
/// \brief Initialize the full set of dependencies so we can use an initializer
|
||||||
/// list for X86Subtarget.
|
/// list for X86Subtarget.
|
||||||
X86Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
X86Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
||||||
void initializeEnvironment();
|
void initializeEnvironment();
|
||||||
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
|
void initSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
public:
|
public:
|
||||||
/// Is this x86_64? (disregarding specific ABI / programming model)
|
/// Is this x86_64? (disregarding specific ABI / programming model)
|
||||||
bool is64Bit() const {
|
bool is64Bit() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user