harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r530747 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeGenerator.cpp
Date Fri, 20 Apr 2007 11:30:47 GMT
Author: varlax
Date: Fri Apr 20 04:30:46 2007
New Revision: 530747

URL: http://svn.apache.org/viewvc?view=rev&rev=530747
Log:
Applied HARMONY-3673 [drlvm][jit] Adding IR and DOT files logging after HIR2LIR translation

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeGenerator.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeGenerator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeGenerator.cpp?view=diff&rev=530747&r1=530746&r2=530747
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeGenerator.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeGenerator.cpp Fri
Apr 20 04:30:46 2007
@@ -95,6 +95,15 @@
 //___________________________________________________________________________________________________
 
 void CodeGenerator::genCode(::Jitrino::SessionAction* sa, ::Jitrino::MethodCodeSelector&
inputProvider) {
+    LogStream& irdump  = Log::log(LogStream::IRDUMP);
+    LogStream& dotdump = Log::log(LogStream::DOTDUMP);
+    uint32 stageId = Log::getStageId();
+    const char* stageName = sa->getName();
+    if (irdump.isEnabled()) {
+        Log::printStageBegin(irdump.out(), stageId, "IA32", stageName, stageName);
+    }
+
+
     CompilationContext* cc = sa->getCompilationContext();
     CompilationInterface* ci = cc->getVMCompilationInterface();
     MemoryManager& mm = cc->getCompilationLevelMemoryManager();
@@ -119,7 +128,26 @@
     MethodCodeSelector    codeSelector(*ci, mm, codeSelectorMemManager, *irManager, slowLdString);
 
     inputProvider.selectCode(codeSelector);
+
+    
+    const char* logKind = "after";
+
+    if (irdump.isEnabled()) {
+        irManager->updateLoopInfo();
+        irManager->updateLivenessInfo();
+        Ia32::dumpIR(irManager, stageId, "IA32 LIR CFG after ", stageName, stageName, logKind,
"opnds");
+        Ia32::dumpIR(irManager, stageId, "IA32 LIR CFG after ", stageName, stageName, logKind);
+        Log::printStageEnd(irdump.out(), stageId, "IA32", stageName, stageName);
+    }
+
+    if (dotdump.isEnabled()) {
+        irManager->updateLoopInfo();
+        irManager->updateLivenessInfo();
+        Ia32::printDot(irManager, stageId, "IA32 LIR CFG after ", stageName, stageName, 
logKind);
+        Ia32::printDot(irManager, stageId, "IA32 LIR CFG after ", stageName, stageName, logKind,
"liveness");
+    }
 }
 
 }}; // namespace Ia32
+
 



Mime
View raw message