Add support for accurate garbage collection to the LLVM code generators

llvm-svn: 13696
This commit is contained in:
Chris Lattner 2004-05-23 21:23:35 +00:00
parent 3ef067ff33
commit 6e4edd65ab
3 changed files with 12 additions and 0 deletions

View File

@ -1498,6 +1498,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) { bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
PM.add(createLowerGCPass());
PM.add(createLowerAllocationsPass()); PM.add(createLowerAllocationsPass());
PM.add(createLowerInvokePass()); PM.add(createLowerInvokePass());
PM.add(new CBackendNameAllUsedStructs()); PM.add(new CBackendNameAllUsedStructs());

View File

@ -125,6 +125,9 @@ SparcV9TargetMachine::SparcV9TargetMachine(IntrinsicLowering *il)
bool bool
SparcV9TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) SparcV9TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
{ {
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
// Replace malloc and free instructions with library calls. // Replace malloc and free instructions with library calls.
PM.add(createLowerAllocationsPass()); PM.add(createLowerAllocationsPass());
@ -199,6 +202,9 @@ SparcV9TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out
/// generation for the UltraSparcV9. /// generation for the UltraSparcV9.
/// ///
void SparcV9JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { void SparcV9JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
// Replace malloc and free instructions with library calls. // Replace malloc and free instructions with library calls.
PM.add(createLowerAllocationsPass()); PM.add(createLowerAllocationsPass());

View File

@ -59,6 +59,9 @@ X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *IL)
// does to emit statically compiled machine code. // does to emit statically compiled machine code.
bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
std::ostream &Out) { std::ostream &Out) {
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
// FIXME: Implement the invoke/unwind instructions! // FIXME: Implement the invoke/unwind instructions!
PM.add(createLowerInvokePass()); PM.add(createLowerInvokePass());
@ -117,6 +120,8 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
/// not supported for this target. /// not supported for this target.
/// ///
void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
// FIXME: Implement the invoke/unwind instructions! // FIXME: Implement the invoke/unwind instructions!
PM.add(createLowerInvokePass()); PM.add(createLowerInvokePass());