mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Remove support for "targetdata pass ctors"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5901 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c986392c30
commit
baf64b1e1c
@ -16,7 +16,6 @@
|
||||
|
||||
// No need to include Pass.h, we are being included by it!
|
||||
|
||||
class TargetData;
|
||||
class TargetMachine;
|
||||
|
||||
//===---------------------------------------------------------------------------
|
||||
@ -33,7 +32,6 @@ class PassInfo {
|
||||
std::vector<const PassInfo*> ItfImpl;// Interfaces implemented by this pass
|
||||
|
||||
Pass *(*NormalCtor)(); // No argument ctor
|
||||
Pass *(*DataCtor)(const TargetData&);// Ctor taking const TargetData object...
|
||||
Pass *(*TargetCtor)(TargetMachine&); // Ctor taking TargetMachine object...
|
||||
|
||||
public:
|
||||
@ -50,10 +48,9 @@ public:
|
||||
/// through RegisterPass.
|
||||
PassInfo(const char *name, const char *arg, const std::type_info &ti,
|
||||
unsigned pt, Pass *(*normal)() = 0,
|
||||
Pass *(*datactor)(const TargetData &) = 0,
|
||||
Pass *(*targetctor)(TargetMachine &) = 0)
|
||||
: PassName(name), PassArgument(arg), TypeInfo(ti), PassType(pt),
|
||||
NormalCtor(normal), DataCtor(datactor), TargetCtor(targetctor) {
|
||||
NormalCtor(normal), TargetCtor(targetctor) {
|
||||
}
|
||||
|
||||
/// getPassName - Return the friendly name for the pass, never returns null
|
||||
@ -97,14 +94,6 @@ public:
|
||||
return NormalCtor();
|
||||
}
|
||||
|
||||
/// getDataCtor - Return a pointer to a function that creates an instance of
|
||||
/// the pass and returns it. This returns a constructor for a version of the
|
||||
/// pass that takes a TargetData object as a parameter.
|
||||
///
|
||||
Pass *(*getDataCtor() const)(const TargetData &) {
|
||||
return DataCtor;
|
||||
}
|
||||
|
||||
/// getTargetCtor - Return a pointer to a function that creates an instance of
|
||||
/// the pass and returns it. This returns a constructor for a version of the
|
||||
/// pass that takes a TargetMachine object as a parameter.
|
||||
@ -171,8 +160,6 @@ protected:
|
||||
|
||||
template<typename PassName>
|
||||
Pass *callDefaultCtor() { return new PassName(); }
|
||||
template<typename PassName>
|
||||
Pass *callTargetDataCtor(const TargetData &TD) { return new PassName(TD); }
|
||||
|
||||
template<typename PassName>
|
||||
struct RegisterPass : public RegisterPassBase {
|
||||
@ -189,18 +176,11 @@ struct RegisterPass : public RegisterPassBase {
|
||||
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, ctor));
|
||||
}
|
||||
|
||||
// Register Pass using TargetData constructor...
|
||||
RegisterPass(const char *PassArg, const char *Name, unsigned PassTy,
|
||||
Pass *(*datactor)(const TargetData &)) {
|
||||
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy,
|
||||
0, datactor));
|
||||
}
|
||||
|
||||
// Register Pass using TargetMachine constructor...
|
||||
RegisterPass(const char *PassArg, const char *Name, unsigned PassTy,
|
||||
Pass *(*targetctor)(TargetMachine &)) {
|
||||
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy,
|
||||
0, 0, targetctor));
|
||||
0, targetctor));
|
||||
}
|
||||
|
||||
// Generic constructor version that has an unknown ctor type...
|
||||
@ -229,20 +209,12 @@ struct RegisterOpt : public RegisterPassBase {
|
||||
PassInfo::Optimization, ctor));
|
||||
}
|
||||
|
||||
/// Register Pass using TargetData constructor...
|
||||
///
|
||||
RegisterOpt(const char *PassArg, const char *Name,
|
||||
Pass *(*datactor)(const TargetData &)) {
|
||||
registerPass(new PassInfo(Name, PassArg, typeid(PassName),
|
||||
PassInfo::Optimization, 0, datactor));
|
||||
}
|
||||
|
||||
/// Register Pass using TargetMachine constructor...
|
||||
///
|
||||
RegisterOpt(const char *PassArg, const char *Name,
|
||||
Pass *(*targetctor)(TargetMachine &)) {
|
||||
registerPass(new PassInfo(Name, PassArg, typeid(PassName),
|
||||
PassInfo::Optimization, 0, 0, targetctor));
|
||||
PassInfo::Optimization, 0, targetctor));
|
||||
}
|
||||
};
|
||||
|
||||
@ -282,14 +254,6 @@ struct RegisterLLC : public RegisterPassBase {
|
||||
PassInfo::LLC, ctor));
|
||||
}
|
||||
|
||||
/// Register Pass using TargetData constructor...
|
||||
///
|
||||
RegisterLLC(const char *PassArg, const char *Name,
|
||||
Pass *(*datactor)(const TargetData &)) {
|
||||
registerPass(new PassInfo(Name, PassArg, typeid(PassName),
|
||||
PassInfo::LLC, 0, datactor));
|
||||
}
|
||||
|
||||
/// Register Pass using TargetMachine constructor...
|
||||
///
|
||||
RegisterLLC(const char *PassArg, const char *Name,
|
||||
|
@ -48,8 +48,7 @@ public:
|
||||
// Ignore non-selectable and non-constructible passes! Ignore
|
||||
// non-optimizations.
|
||||
return P->getPassArgument() == 0 || *P->getPassArgument() == 0 ||
|
||||
(P->getNormalCtor() == 0 && P->getDataCtor() == 0 &&
|
||||
P->getTargetCtor() == 0) ||
|
||||
(P->getNormalCtor() == 0 && P->getTargetCtor() == 0) ||
|
||||
ignorablePassImpl(P);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user