mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-05 20:07:48 +00:00
Fixed to address code review. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d65267ee62
commit
c2e8a7e8d2
@ -15,13 +15,13 @@
|
||||
#define LLVM_TARGET_TARGETSUBTARGET_H
|
||||
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class SDep;
|
||||
class SUnit;
|
||||
class TargetRegisterClass;
|
||||
template <typename T> class SmallVectorImpl;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
///
|
||||
@ -38,7 +38,7 @@ public:
|
||||
// AntiDepBreakMode - Type of anti-dependence breaking that should
|
||||
// be performed before post-RA scheduling.
|
||||
typedef enum { ANTIDEP_NONE, ANTIDEP_CRITICAL, ANTIDEP_ALL } AntiDepBreakMode;
|
||||
typedef SmallVector<TargetRegisterClass*, 4> ExcludedRCVector;
|
||||
typedef SmallVectorImpl<TargetRegisterClass*> ExcludedRCVector;
|
||||
|
||||
virtual ~TargetSubtarget();
|
||||
|
||||
@ -53,12 +53,7 @@ public:
|
||||
// return true to enable post-register-allocation scheduling.
|
||||
virtual bool enablePostRAScheduler(CodeGenOpt::Level OptLevel,
|
||||
AntiDepBreakMode& Mode,
|
||||
ExcludedRCVector& ExcludedRCs) const {
|
||||
Mode = ANTIDEP_NONE;
|
||||
ExcludedRCs.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
ExcludedRCVector& ExcludedRCs) const;
|
||||
// adjustSchedDependency - Perform target specific adjustments to
|
||||
// the latency of a schedule dependency.
|
||||
virtual void adjustSchedDependency(SUnit *def, SUnit *use,
|
||||
|
@ -216,7 +216,7 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
|
||||
|
||||
// Check for explicit enable/disable of post-ra scheduling.
|
||||
TargetSubtarget::AntiDepBreakMode AntiDepMode = TargetSubtarget::ANTIDEP_NONE;
|
||||
TargetSubtarget::ExcludedRCVector ExcludedRCs;
|
||||
SmallVector<TargetRegisterClass*, 4> ExcludedRCs;
|
||||
if (EnablePostRAScheduler.getPosition() > 0) {
|
||||
if (!EnablePostRAScheduler)
|
||||
return false;
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "llvm/GlobalValue.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
using namespace llvm;
|
||||
|
||||
static cl::opt<bool>
|
||||
@ -159,3 +160,13 @@ ARMSubtarget::GVIsIndirectSymbol(GlobalValue *GV, Reloc::Model RelocM) const {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ARMSubtarget::enablePostRAScheduler(
|
||||
CodeGenOpt::Level OptLevel,
|
||||
TargetSubtarget::AntiDepBreakMode& Mode,
|
||||
ExcludedRCVector& ExcludedRCs) const {
|
||||
Mode = TargetSubtarget::ANTIDEP_CRITICAL;
|
||||
ExcludedRCs.clear();
|
||||
ExcludedRCs.push_back(&ARM::GPRRegClass);
|
||||
return PostRAScheduler && OptLevel >= CodeGenOpt::Default;
|
||||
}
|
||||
|
@ -127,16 +127,10 @@ protected:
|
||||
|
||||
const std::string & getCPUString() const { return CPUString; }
|
||||
|
||||
/// enablePostRAScheduler - True at 'More' optimization except
|
||||
/// for Thumb1.
|
||||
/// enablePostRAScheduler - True at 'More' optimization.
|
||||
bool enablePostRAScheduler(CodeGenOpt::Level OptLevel,
|
||||
TargetSubtarget::AntiDepBreakMode& Mode,
|
||||
ExcludedRCVector& ExcludedRCs) const {
|
||||
Mode = TargetSubtarget::ANTIDEP_CRITICAL;
|
||||
ExcludedRCs.clear();
|
||||
ExcludedRCs.push_back(&ARM::GPRRegClass);
|
||||
return PostRAScheduler && OptLevel >= CodeGenOpt::Default;
|
||||
}
|
||||
ExcludedRCVector& ExcludedRCs) const;
|
||||
|
||||
/// getInstrItins - Return the instruction itineraies based on subtarget
|
||||
/// selection.
|
||||
|
@ -12,6 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Target/TargetSubtarget.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
using namespace llvm;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -20,3 +21,13 @@ using namespace llvm;
|
||||
TargetSubtarget::TargetSubtarget() {}
|
||||
|
||||
TargetSubtarget::~TargetSubtarget() {}
|
||||
|
||||
bool TargetSubtarget::enablePostRAScheduler(
|
||||
CodeGenOpt::Level OptLevel,
|
||||
AntiDepBreakMode& Mode,
|
||||
ExcludedRCVector& ExcludedRCs) const {
|
||||
Mode = ANTIDEP_NONE;
|
||||
ExcludedRCs.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
using namespace llvm;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
@ -455,3 +456,12 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &FS,
|
||||
if (StackAlignment)
|
||||
stackAlignment = StackAlignment;
|
||||
}
|
||||
|
||||
bool X86Subtarget::enablePostRAScheduler(
|
||||
CodeGenOpt::Level OptLevel,
|
||||
TargetSubtarget::AntiDepBreakMode& Mode,
|
||||
ExcludedRCVector& ExcludedRCs) const {
|
||||
Mode = TargetSubtarget::ANTIDEP_CRITICAL;
|
||||
ExcludedRCs.clear();
|
||||
return OptLevel >= CodeGenOpt::Default;
|
||||
}
|
||||
|
@ -220,11 +220,7 @@ public:
|
||||
/// at 'More' optimization level.
|
||||
bool enablePostRAScheduler(CodeGenOpt::Level OptLevel,
|
||||
TargetSubtarget::AntiDepBreakMode& Mode,
|
||||
ExcludedRCVector& ExcludedRCs) const {
|
||||
Mode = TargetSubtarget::ANTIDEP_CRITICAL;
|
||||
ExcludedRCs.clear();
|
||||
return OptLevel >= CodeGenOpt::Default;
|
||||
}
|
||||
ExcludedRCVector& ExcludedRCs) const;
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user