[llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp

Christopher Lattner lattner at cs.uiuc.edu
Sun Sep 8 16:20:01 PDT 2002


Changes in directory llvm/lib/CodeGen/InstrSelection:

InstrSelection.cpp updated: 1.46 -> 1.47

---
Log message:

Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
erroneously report them as leaks


---
Diffs of the changes:

Index: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
diff -u llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.46 llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.47
--- llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.46	Sun Sep  8 16:08:43 2002
+++ llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp	Sun Sep  8 16:19:29 2002
@@ -173,7 +173,12 @@
          PHINode *PN = dyn_cast<PHINode>(&*IIt); ++IIt) {
       // FIXME: This is probably wrong...
       Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:");
-        
+
+      // The leak detector shouldn't track these nodes.  They are not garbage,
+      // even though their parent field is never filled in.
+      //
+      LeakDetector::removeGarbageObject(PhiCpRes);
+
       // for each incoming value of the phi, insert phi elimination
       //
       for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i) {





More information about the llvm-commits mailing list