public:
virtual ~TargetJITInfo() {}
- /// addPassesToJITCompile - Add passes to the specified pass manager to
- /// implement a fast code generator for this target.
- ///
- virtual void addPassesToJITCompile(FunctionPassManager &PM) = 0;
-
/// replaceMachineCodeForFunction - Make it so that calling the function
/// whose machine code is at OLD turns into a call to NEW, perhaps by
/// overwriting OLD with a branch to NEW. This is used for self-modifying
assert(NumRelocs == 0 && "This target does not have relocations!");
}
- /// resolveBBRefs - Resolve branches to BasicBlocks for the JIT emitted
- /// function.
- virtual void resolveBBRefs(MachineCodeEmitter &MCE) {}
-
- /// addBBRef - Add a BasicBlock reference to be resolved after the function
- /// is emitted.
- void addBBRef(MachineBasicBlock *BB, intptr_t PC) {
- BBRefs.push_back(std::make_pair(BB, PC));
- }
-
/// needsGOT - Allows a target to specify that it would like the
// JIT to manage a GOT for it.
bool needsGOT() const { return useGOT; }
protected:
bool useGOT;
-
- // Tracks which instruction references which BasicBlock
- std::vector<std::pair<MachineBasicBlock*, intptr_t> > BBRefs;
-
};
} // End llvm namespace