Add support for accurate garbage collection to the LLVM code generators
authorChris Lattner <sabre@nondot.org>
Sun, 23 May 2004 21:23:35 +0000 (21:23 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 23 May 2004 21:23:35 +0000 (21:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13696 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp
lib/Target/SparcV9/SparcV9TargetMachine.cpp
lib/Target/X86/X86TargetMachine.cpp

index 6e536f072988a515d5182c9cde4727792178a9ab..222fc82d197286159408917f0bc51a8992e878b3 100644 (file)
@@ -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());
index 6e536f072988a515d5182c9cde4727792178a9ab..222fc82d197286159408917f0bc51a8992e878b3 100644 (file)
@@ -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());
index c5d815c987e751eccf98cf6e16b6f2d89d843ec1..06efeb31e256729000176178f88e9ab40486b42d 100644 (file)
@@ -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());
   
index 0d9a0d6e40eafd79339cbd185232a093e73ad2ee..a1884a6725ed4ab9a3cae1522716df7e4a8d4a3b 100644 (file)
@@ -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());