harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r528412 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32: Ia32CodeEmitter.cpp Ia32GCMap.cpp Ia32IRManager.h Ia32Printer.cpp Ia32StackInfo.cpp Ia32StackLayout.cpp
Date Fri, 13 Apr 2007 09:55:22 GMT
Author: varlax
Date: Fri Apr 13 02:55:21 2007
New Revision: 528412

URL: http://svn.apache.org/viewvc?view=rev&rev=528412
Log:
Applied HARMONY-3322 [drlvm][jit][opt] assertion failure while printing dot files on jitrino
built in debug mode

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp?view=diff&rev=528412&r1=528411&r2=528412
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp Fri
Apr 13 02:55:21 2007
@@ -294,7 +294,7 @@
         bc2LIRMapHandler = new(memoryManager) VectorHandler(bcOffset2LIRHandlerName, meth);
     }
 
-    irManager->setInfo("inlineInfo", new(irManager->getMemoryManager()) InlineInfoMap(irManager->getMemoryManager()));
+    irManager->setInfo(INLINE_INFO_KEY, new(irManager->getMemoryManager()) InlineInfoMap(irManager->getMemoryManager()));
     constantAreaLayout.doLayout(irManager);
     irManager->resolveRuntimeInfo();
     emitCode();
@@ -310,7 +310,7 @@
 //________________________________________________________________________________________
 void CodeEmitter::registerInlineInfoOffsets() 
 {
-    InlineInfoMap * inlineMap = (InlineInfoMap *)irManager->getInfo("inlineInfo");
+    InlineInfoMap * inlineMap = (InlineInfoMap *)irManager->getInfo(INLINE_INFO_KEY);
     const Nodes& nodes = irManager->getFlowGraph()->getNodes();
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
         Node* node = *it;
@@ -498,7 +498,7 @@
     MemoryManager& irmm = irManager->getMemoryManager();
     bool isBcRequired = irManager->getCompilationInterface().isBCMapInfoRequired();
     BcMap* bcMap = new(irmm) BcMap(irmm);
-    irManager->setInfo("bcMap", bcMap);
+    irManager->setInfo(BCMAP_INFO_KEY, bcMap);
     bool newOpndsCreated = false;
     for( BasicBlock * bb = (BasicBlock*)irManager->getFlowGraph()->getEntryNode();
bb != NULL; bb=bb->getLayoutSucc()) {
         for (Inst* inst = (Inst*)bb->getFirstInst(); inst!=NULL; inst = inst->getNextInst())
{

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp?view=diff&rev=528412&r1=528411&r2=528412
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp Fri Apr 13
02:55:21 2007
@@ -469,7 +469,7 @@
     GCMap * gcMap=new(mm) GCMap(mm);
     irManager->calculateOpndStatistics();
     gcMap->registerInsts(*irManager);
-    irManager->setInfo("gcMap", gcMap);
+    irManager->setInfo(GCMAP_INFO_KEY, gcMap);
 
     if (Log::isEnabled()) {
         gcMap->getGCSafePointsInfo()->dump(getTagName());
@@ -532,13 +532,13 @@
 
 
 void InfoBlockWriter::runImpl() {
-    StackInfo * stackInfo = (StackInfo*)irManager->getInfo("stackInfo");
+    StackInfo * stackInfo = (StackInfo*)irManager->getInfo(STACK_INFO_KEY);
     assert(stackInfo != NULL);
-    GCMap * gcMap = (GCMap*)irManager->getInfo("gcMap");
+    GCMap * gcMap = (GCMap*)irManager->getInfo(GCMAP_INFO_KEY);
     assert(gcMap != NULL);
-    BcMap *bcMap = (BcMap*)irManager->getInfo("bcMap");
+    BcMap *bcMap = (BcMap*)irManager->getInfo(BCMAP_INFO_KEY);
     assert(bcMap != NULL);
-    InlineInfoMap * inlineInfo = (InlineInfoMap*)irManager->getInfo("inlineInfo");
+    InlineInfoMap * inlineInfo = (InlineInfoMap*)irManager->getInfo(INLINE_INFO_KEY);
     assert(inlineInfo !=NULL);
 
     CompilationInterface& compIntf = irManager->getCompilationInterface();

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h?view=diff&rev=528412&r1=528411&r2=528412
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h Fri Apr
13 02:55:21 2007
@@ -41,6 +41,12 @@
 
 #include "LoopTree.h"
 
+
+#define STACK_INFO_KEY "stackInfo"
+#define INLINE_INFO_KEY "inlineInfo"
+#define BCMAP_INFO_KEY "bcMap"
+#define GCMAP_INFO_KEY "gcMap"
+
 namespace Jitrino
 {
 namespace Ia32
@@ -117,7 +123,7 @@
     void setInfo(const char * key, void * info)
     { infoMap[newInternalString(key)]=info; }
 
-    const void * getInfo(const char * key)
+    const void * getInfo(const char * key) const
     { ConstCharStringToVoidPtrMap::const_iterator it=infoMap.find(key); return it!=infoMap.end()?it->second:NULL;
}
 
     //-------------------------------------------------------------------------------------

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp?view=diff&rev=528412&r1=528411&r2=528412
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp Fri Apr
13 02:55:21 2007
@@ -1185,7 +1185,17 @@
 
 #ifdef _DEBUG
             BitSet* entrySet = irManager->getLiveAtEntry(node);
-            assert(entrySet->isEqual(*lsCurrent));
+            if (!entrySet->isEqual(*lsCurrent)) {
+                if (node == irManager->getFlowGraph()->getEntryNode() 
+                    && ((POINTER_SIZE_INT*)irManager->getInfo(STACK_INFO_KEY))!=NULL)

+                {
+                    //DETAILS: callee save regs has no defs. See IRManager.verifyLiveness
for details.
+                    //This is why we skip liveness verification for entry node here after
stacklayouter pass.
+                    //TODO: we can add pseudo-defs for callee save regs to EntryPointPseudoInst
+                } else {
+                    assert(false);
+                }
+            }
 #endif
 
             StlVector<Opnd *> opndsAll(mm);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp?view=diff&rev=528412&r1=528411&r2=528412
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp Fri Apr
13 02:55:21 2007
@@ -47,7 +47,7 @@
 class StackInfoInstRegistrar : public SessionAction {
     void runImpl()
     { 
-        StackInfo * stackInfo = (StackInfo*)irManager->getInfo("stackInfo");
+        StackInfo * stackInfo = (StackInfo*)irManager->getInfo(STACK_INFO_KEY);
         assert(stackInfo!=NULL);
         stackInfo->registerInsts(*irManager);
         stackInfo->setMethodExitString(*irManager);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp?view=diff&rev=528412&r1=528411&r2=528412
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp Fri
Apr 13 02:55:21 2007
@@ -171,7 +171,7 @@
     IRManager & irm=getIRManager();
 
     stackInfo = new(irm.getMemoryManager()) StackInfo(irm.getMemoryManager());
-    irm.setInfo("stackInfo", stackInfo);
+    irm.setInfo(STACK_INFO_KEY, stackInfo);
 
     irm.calculateOpndStatistics();
 #ifdef _DEBUG



Mime
View raw message