namespace llvm {
class Module;
class TargetMachine;
- class IntrinsicLowering;
struct TargetMachineRegistry {
struct Entry;
struct Entry {
const char *Name;
const char *ShortDesc;
- TargetMachine *(*CtorFn)(const Module &, IntrinsicLowering*,
- const std::string &);
+ TargetMachine *(*CtorFn)(const Module &, const std::string &);
unsigned (*ModuleMatchQualityFn)(const Module &M);
unsigned (*JITMatchQualityFn)();
protected:
Entry(const char *N, const char *SD,
- TargetMachine *(*CF)(const Module &, IntrinsicLowering*,
- const std::string &),
+ TargetMachine *(*CF)(const Module &, const std::string &),
unsigned (*MMF)(const Module &M), unsigned (*JMF)());
private:
const Entry *Next; // Next entry in the linked list.
&TargetMachineImpl::getJITMatchQuality) {
}
private:
- static TargetMachine *Allocator(const Module &M, IntrinsicLowering *IL,
- const std::string &FS) {
- return new TargetMachineImpl(M, IL, FS);
+ static TargetMachine *Allocator(const Module &M, const std::string &FS) {
+ return new TargetMachineImpl(M, 0, FS);
}
};
}
// Allocate a target...
- TargetMachine *Target = MArch->CtorFn(*MP->getModule(), 0, FeaturesStr);
+ TargetMachine *Target = MArch->CtorFn(*MP->getModule(), FeaturesStr);
assert(Target && "Could not allocate target machine!");
// If the target supports JIT code generation, return a new JIT now.
static TargetRegistrationListener *Listeners = 0;
TargetMachineRegistry::Entry::Entry(const char *N, const char *SD,
- TargetMachine *(*CF)(const Module &, IntrinsicLowering*,
- const std::string &),
+ TargetMachine *(*CF)(const Module &,const std::string &),
unsigned (*MMF)(const Module &M), unsigned (*JMF)())
: Name(N), ShortDesc(SD), CtorFn(CF), ModuleMatchQualityFn(MMF),
JITMatchQualityFn(JMF), Next(List) {
// Allocate target machine. First, check whether the user has
// explicitly specified an architecture to compile for.
- TargetMachine* (*TargetMachineAllocator)(const Module&,
- IntrinsicLowering *) = 0;
if (MArch == 0) {
std::string Err;
MArch = TargetMachineRegistry::getClosestStaticTargetForModule(mod, Err);
FeaturesStr = Features.getString();
}
- std::auto_ptr<TargetMachine> target(MArch->CtorFn(mod, 0, FeaturesStr));
+ std::auto_ptr<TargetMachine> target(MArch->CtorFn(mod, FeaturesStr));
assert(target.get() && "Could not allocate target machine!");
TargetMachine &Target = *target.get();
const TargetData &TD = Target.getTargetData();