mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 02:22:31 +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:
parent
c24df453b0
commit
5b7ae59f6d
@ -160,10 +160,6 @@ public:
|
||||
|
||||
/// \brief Enable the use of the early if conversion pass.
|
||||
virtual bool enableEarlyIfConversion() const { return false; }
|
||||
|
||||
/// \brief Reset the features for the subtarget.
|
||||
virtual void resetSubtargetFeatures(const MachineFunction *MF) { }
|
||||
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -421,9 +421,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
||||
LibInfo = &getAnalysis<TargetLibraryInfo>();
|
||||
GFI = Fn.hasGC() ? &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn) : nullptr;
|
||||
|
||||
TargetSubtargetInfo &ST =
|
||||
const_cast<TargetSubtargetInfo&>(TM.getSubtarget<TargetSubtargetInfo>());
|
||||
ST.resetSubtargetFeatures(MF);
|
||||
TM.resetTargetOptions(MF);
|
||||
|
||||
// Reset OptLevel to None for optnone functions.
|
||||
|
@ -148,7 +148,7 @@ static std::string computeDataLayout(ARMSubtarget &ST) {
|
||||
ARMSubtarget &ARMSubtarget::initializeSubtargetDependencies(StringRef CPU,
|
||||
StringRef FS) {
|
||||
initializeEnvironment();
|
||||
resetSubtargetFeatures(CPU, FS);
|
||||
initSubtargetFeatures(CPU, FS);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -219,23 +219,7 @@ void ARMSubtarget::initializeEnvironment() {
|
||||
UnsafeFPMath = false;
|
||||
}
|
||||
|
||||
void ARMSubtarget::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 ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
if (CPUString.empty()) {
|
||||
if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s"))
|
||||
// Default to the Swift CPU when targeting armv7s/thumbv7s.
|
||||
|
@ -248,9 +248,6 @@ protected:
|
||||
/// subtarget options. Definition of function is auto generated by tblgen.
|
||||
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
|
||||
/// so that we can use initializer lists for subtarget initialization.
|
||||
ARMSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
||||
@ -282,7 +279,7 @@ private:
|
||||
std::unique_ptr<ARMFrameLowering> FrameLowering;
|
||||
|
||||
void initializeEnvironment();
|
||||
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
void initSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
public:
|
||||
void computeIssueWidth();
|
||||
|
||||
|
@ -69,7 +69,7 @@ static std::string getDataLayoutString(const Triple &T) {
|
||||
PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU,
|
||||
StringRef FS) {
|
||||
initializeEnvironment();
|
||||
resetSubtargetFeatures(CPU, FS);
|
||||
initSubtargetFeatures(CPU, FS);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -84,22 +84,6 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU,
|
||||
FrameLowering(initializeSubtargetDependencies(CPU, FS)), InstrInfo(*this),
|
||||
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() {
|
||||
StackAlignment = 16;
|
||||
DarwinDirective = PPC::DIR_NONE;
|
||||
@ -134,7 +118,7 @@ void PPCSubtarget::initializeEnvironment() {
|
||||
HasLazyResolverStubs = false;
|
||||
}
|
||||
|
||||
void PPCSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
// Determine default and user specified characteristics
|
||||
std::string CPUName = CPU;
|
||||
if (CPUName.empty())
|
||||
|
@ -171,11 +171,9 @@ public:
|
||||
/// so that we can use initializer lists for subtarget initialization.
|
||||
PPCSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
||||
|
||||
/// \brief Reset the features for the PowerPC target.
|
||||
void resetSubtargetFeatures(const MachineFunction *MF) override;
|
||||
private:
|
||||
void initializeEnvironment();
|
||||
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
void initSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
|
||||
public:
|
||||
/// 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;
|
||||
}
|
||||
|
||||
void X86Subtarget::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 X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
void X86Subtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
std::string CPUName = CPU;
|
||||
if (CPUName.empty())
|
||||
CPUName = "generic";
|
||||
@ -342,7 +326,7 @@ static std::string computeDataLayout(const Triple &TT) {
|
||||
X86Subtarget &X86Subtarget::initializeSubtargetDependencies(StringRef CPU,
|
||||
StringRef FS) {
|
||||
initializeEnvironment();
|
||||
resetSubtargetFeatures(CPU, FS);
|
||||
initSubtargetFeatures(CPU, FS);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -283,14 +283,12 @@ public:
|
||||
/// subtarget options. Definition of function is auto generated by tblgen.
|
||||
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
|
||||
/// \brief Reset the features for the X86 target.
|
||||
void resetSubtargetFeatures(const MachineFunction *MF) override;
|
||||
private:
|
||||
/// \brief Initialize the full set of dependencies so we can use an initializer
|
||||
/// list for X86Subtarget.
|
||||
X86Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
|
||||
void initializeEnvironment();
|
||||
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
void initSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
public:
|
||||
/// Is this x86_64? (disregarding specific ABI / programming model)
|
||||
bool is64Bit() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user