From: Chris Lattner Date: Sun, 23 May 2004 21:23:35 +0000 (+0000) Subject: Add support for accurate garbage collection to the LLVM code generators X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=99c59e8e217cd08bc53f7a260dce6c7a66b583f9;p=oota-llvm.git Add support for accurate garbage collection to the LLVM code generators git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13696 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 6e536f07298..222fc82d197 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1498,6 +1498,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) { //===----------------------------------------------------------------------===// bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) { + PM.add(createLowerGCPass()); PM.add(createLowerAllocationsPass()); PM.add(createLowerInvokePass()); PM.add(new CBackendNameAllUsedStructs()); diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 6e536f07298..222fc82d197 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -1498,6 +1498,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) { //===----------------------------------------------------------------------===// bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) { + PM.add(createLowerGCPass()); PM.add(createLowerAllocationsPass()); PM.add(createLowerInvokePass()); PM.add(new CBackendNameAllUsedStructs()); diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp index c5d815c987e..06efeb31e25 100644 --- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp +++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp @@ -125,6 +125,9 @@ SparcV9TargetMachine::SparcV9TargetMachine(IntrinsicLowering *il) bool 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. PM.add(createLowerAllocationsPass()); @@ -199,6 +202,9 @@ SparcV9TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out /// generation for the UltraSparcV9. /// void SparcV9JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { + // FIXME: Implement efficient support for garbage collection intrinsics. + PM.add(createLowerGCPass()); + // Replace malloc and free instructions with library calls. PM.add(createLowerAllocationsPass()); diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 0d9a0d6e40e..a1884a6725e 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -59,6 +59,9 @@ X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *IL) // does to emit statically compiled machine code. bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) { + // FIXME: Implement efficient support for garbage collection intrinsics. + PM.add(createLowerGCPass()); + // FIXME: Implement the invoke/unwind instructions! PM.add(createLowerInvokePass()); @@ -117,6 +120,8 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, /// not supported for this target. /// void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { + // FIXME: Implement efficient support for garbage collection intrinsics. + PM.add(createLowerGCPass()); // FIXME: Implement the invoke/unwind instructions! PM.add(createLowerInvokePass());