[vmkit-commits] [vmkit] r69040 - /vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Apr 14 06:11:05 PDT 2009
Author: geoffray
Date: Tue Apr 14 08:11:03 2009
New Revision: 69040
URL: http://llvm.org/viewvc/llvm-project?rev=69040&view=rev
Log:
Also look at what a function returns, when the object is given to the function.
Modified:
vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp
Modified: vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp?rev=69040&r1=69039&r2=69040&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp Tue Apr 14 08:11:03 2009
@@ -127,6 +127,12 @@
return true;
}
}
+
+ // We must also consider the value returned by the function.
+ if (II->getType() == Ins->getType()) {
+ if (escapes(II, visited)) return true;
+ }
+
} else if (dyn_cast<BitCastInst>(II)) {
if (escapes(II, visited)) return true;
} else if (StoreInst* SI = dyn_cast<StoreInst>(II)) {
More information about the vmkit-commits
mailing list