changeset 2574:d1ea2563836d

Merge.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 04 May 2011 16:36:09 +0200
parents 6d99b909696d (current diff) ac868ecd3cfc (diff)
children cd896249f7a7
files doc/design/graal_compiler.tex doc/design/graphdrawing.tex
diffstat 7 files changed, 16 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/doc/design/graal_compiler.tex	Wed May 04 16:34:28 2011 +0200
+++ b/doc/design/graal_compiler.tex	Wed May 04 16:36:09 2011 +0200
@@ -109,10 +109,6 @@
 \item[M4:] We have reintegrated the new Graal compiler into the Maxine VM and can use it as a Maxine VM bootstrapping compiler.
 \end{description}
 
-\cw{That's a very coarse (not to say useless) listing, sound a bit like the generic ``define problem - think hard about it - publish it''...}
-
-\cw{Mario wants a timeline.  You better think about that carefully, so that you can keep the timeline.  Mario doesn't want to repeat the C1X experience where at first it should take only 2 months, but it finally takes 2 years.  Take that as a confidential hint from me...}
-
 After those four milestones, we see three different possible further development directions that can be followed in parallel:
 \begin{itemize}
   \item Removal of the XIR template mechanism and replacement with a snippet mechanism that works with the Graal compiler graph.
--- a/doc/design/graphdrawing.tex	Wed May 04 16:34:28 2011 +0200
+++ b/doc/design/graphdrawing.tex	Wed May 04 16:36:09 2011 +0200
@@ -24,7 +24,7 @@
 \NewEnviron{digraphenv}[2]{\digraph[#1]{#2}{  \BODY }}
 
 \newcommand{\control}[2]{#1:successors:s -> #2:predecessors:n [color=red];}
-\newcommand{\controllabel}[2]{#1 -> #2:predecessors:n [color=red];}
+\newcommand{\controllabel}[2]{#1:s -> #2:predecessors:n [color=red];}
 \newcommand{\data}[2]{#2:usages:s -> #1:inputs [color=black,dir=back];}
 \newcommand{\datalabel}[2]{#2:usages:s -> #1:n [color=black,dir=back];}
 \newcommand{\datalabeltext}[3]{#2:usages:s -> #1:n [color=black,dir=back,label="#3"];}
@@ -35,18 +35,24 @@
 \newcommand{\portinput}[1]{<TD WIDTH="15" HEIGHT="5" PORT="#1" BGCOLOR="lightgrey"></TD>}
 \newcommand{\portsuccessor}[1]{<TD WIDTH="15" HEIGHT="5" PORT="#1" BGCOLOR="rosybrown1"></TD>}
 \newcommand{\portempty}[0]{<TD WIDTH="15" HEIGHT="5"></TD>}
-\newcommand{\genericnodelabel}[2]{</TR></TABLE></TD></TR><TR><TD BORDER="1" COLSPAN="3" BGCOLOR="#2">#1</TD></TR><TR><TD COLSPAN="2" CELLPADDING="0" ALIGN="RIGHT"><TABLE BORDER="0" CELLSPACING="2" CELLPADDING="0"><TR>}
+\newcommand{\genericnodelabel}[2]{</TR></TABLE></TD></TR><TR><TD BORDER="1" COLSPAN="3" BGCOLOR="#2"><FONT POINT-SIZE="12">#1</FONT></TD></TR><TR><TD COLSPAN="2" CELLPADDING="0" ALIGN="RIGHT"><TABLE BORDER="0" CELLSPACING="2" CELLPADDING="0"><TR>}
 
 \newcommand{\nodestart}[0]{start [shape=plaintext, rank=source, label=< <TABLE BORDER="0" CELLSPACING="0"><TR><TD COLSPAN="3"><TABLE BORDER="0"><TR><TD></TD> \genericnodelabel{start}{lightyellow} \portsuccessor{successors} \portempty \genericnodeend }
 
 \newcommand{\nodeend}[0]{\genericnodestart{end} \portempty \portinput{inputs} \genericnodelabel{end}{lightyellow} <TD></TD></TR></TABLE></TD><TD></TD></TR></TABLE>>]}
 
+\newcommand{\nodeconst}[2]{#1 [margin="0.05, 0.05", shape=plaintext, label=< <TABLE BORDER="0" CELLSPACING="0"><TR><TD BORDER="1" BGCOLOR="white"><FONT POINT-SIZE="12">#2</FONT></TD></TR><TR><TD WIDTH="15" HEIGHT="5" PORT="usages" BGCOLOR="lightgrey"></TD></TR></TABLE>>]}
+\newcommand{\nodeframestate}[2]{#1 [margin="0.05, 0.05", shape=plaintext, label=< <TABLE BORDER="0" CELLSPACING="0"><TR><TD WIDTH="15" HEIGHT="5" PORT="predecessors" BGCOLOR="rosybrown1"></TD></TR><TR><TD BORDER="1" BGCOLOR="lightblue"><FONT POINT-SIZE="12">#2</FONT></TD></TR></TABLE>>]}
+
+
 \newcommand{\node}[2]{\genericnodestart{#1} \portempty \portinput{inputs} \genericnodelabel{#2}{white} \portsuccessor{successors} \portempty \genericnodeend }
 \newcommand{\nodebi}[2]{\genericnodestart{#1} \portinput{in1} \portinput{in2} \genericnodelabel{#2}{white} \portsuccessor{successors} \portempty \genericnodeend }
 \newcommand{\nodetri}[2]{\genericnodestart{#1} \portinput{in1} \portinput{in2} \portinput{in3} \genericnodelabel{#2}{white} \portsuccessor{successors} \portempty \portempty \genericnodeend }
-\newcommand{\nodequad}[2]{\genericnodestart{#1} \portinput{in1} \portinput{in2} \portinput{in3} \portinput{in4} \genericnodelabel{#2}{white} \portsuccessor{successors} \portempty \portempty \genericnodeend }
+\newcommand{\nodequad}[2]{\genericnodestart{#1} \portinput{in1} \portinput{in2} \portinput{in3} \portinput{in4} \genericnodelabel{#2}{white} \portsuccessor{successors} \portempty \portempty \portempty \genericnodeend }
 \newcommand{\nodesplit}[2]{\genericnodestart{#1} \portempty \portinput{inputs} \genericnodelabel{#2}{white} \portsuccessor{succ1} \portsuccessor{succ2} \genericnodeend }
+\newcommand{\nodequadsplit}[2]{\genericnodestart{#1} \portinput{in1} \portinput{in2} \portinput{in3} \portinput{in4} \genericnodelabel{#2}{white} \portsuccessor{succ1} \portsuccessor{succ2} \portempty \portempty \genericnodeend }
 \newcommand{\nodesplittri}[2]{\genericnodestart{#1} \portempty \portinput{inputs} \genericnodelabel{#2}{white} \portsuccessor{succ1} \portsuccessor{succ2} \portsuccessor{succ3} \genericnodeend }
+\newcommand{\nodetrap}[2]{\cnodebi{#1}{#2}{rosybrown1}}
 
 \newcommand{\cnode}[3]{\genericnodestart{#1} \portempty \portinput{inputs} \genericnodelabel{#2}{#3} \portsuccessor{successors} \portempty \genericnodeend }
 \newcommand{\cnodebi}[3]{\genericnodestart{#1} \portinput{in1} \portinput{in2} \genericnodelabel{#2}{#3} \portsuccessor{successors} \portempty \genericnodeend }
--- a/graal/GraalCompiler/.classpath	Wed May 04 16:34:28 2011 +0200
+++ b/graal/GraalCompiler/.classpath	Wed May 04 16:36:09 2011 +0200
@@ -3,5 +3,6 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/CRI"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/GraalGraph"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
--- a/graal/GraalCompiler/src/com/sun/c1x/asm/AbstractAssembler.java	Wed May 04 16:34:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/asm/AbstractAssembler.java	Wed May 04 16:36:09 2011 +0200
@@ -73,7 +73,7 @@
                 for (ExceptionHandler handler : ei.exceptionHandlers) {
                     int entryOffset = handler.entryCodeOffset();
                     RiType caughtType = handler.handler.catchType();
-                    targetMethod.recordExceptionHandler(codeOffset, ei.bci, handler.scopeCount(), entryOffset, handler.handlerBCI(), caughtType);
+                    targetMethod.recordExceptionHandler(codeOffset, ei.bci, 0, entryOffset, handler.handlerBCI(), caughtType);
                 }
             }
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 04 16:34:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 04 16:36:09 2011 +0200
@@ -214,7 +214,7 @@
 
         if (syncHandler != null && syncHandler.stateBefore() != null) {
             // generate unlocking code if the exception handler is reachable
-            fillSyncHandler(rootMethodSynchronizedObject, syncHandler, false);
+            fillSyncHandler(rootMethodSynchronizedObject, syncHandler);
         }
     }
 
@@ -332,7 +332,6 @@
 
         ArrayList<ExceptionHandler> exceptionHandlers = new ArrayList<ExceptionHandler>();
         FrameState stateBefore = x.stateBefore();
-        int scopeCount = 0;
 
         assert stateBefore != null : "exception handler state must be available for " + x;
         FrameState state = stateBefore;
@@ -343,7 +342,7 @@
             for (ExceptionHandler handler : this.exceptionHandlers) {
                 if (handler.covers(bci)) {
                     // if the handler covers this bytecode index, add it to the list
-                    if (addExceptionHandler(exceptionHandlers, handler, state, scopeCount)) {
+                    if (addExceptionHandler(exceptionHandlers, handler, state)) {
                         // if the handler was a default handler, we are done
                         return exceptionHandlers;
                     }
@@ -365,7 +364,7 @@
      * @param scopeCount
      * @return {@code true} if handler catches all exceptions (i.e. {@code handler.isCatchAll() == true})
      */
-    private boolean addExceptionHandler(ArrayList<ExceptionHandler> exceptionHandlers, ExceptionHandler handler, FrameState curState, int scopeCount) {
+    private boolean addExceptionHandler(ArrayList<ExceptionHandler> exceptionHandlers, ExceptionHandler handler, FrameState curState) {
         compilation.setHasExceptionHandlers();
 
         BlockBegin entry = handler.entryBlock();
@@ -393,7 +392,6 @@
         // clone exception handler
         ExceptionHandler newHandler = new ExceptionHandler(handler);
         newHandler.setPhiOperand(phiOperand);
-        newHandler.setScopeCount(scopeCount);
         exceptionHandlers.add(newHandler);
 
         // fill in exception handler subgraph lazily
@@ -1244,7 +1242,7 @@
         }
     }
 
-    private void fillSyncHandler(Value lock, BlockBegin syncHandler, boolean inlinedMethod) {
+    private void fillSyncHandler(Value lock, BlockBegin syncHandler) {
         BlockBegin origBlock = curBlock;
         MutableFrameState origState = curState;
         Instruction origLast = lastInstr;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ExceptionHandler.java	Wed May 04 16:34:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ExceptionHandler.java	Wed May 04 16:36:09 2011 +0200
@@ -47,14 +47,12 @@
     private LIRList entryCode;
     private int entryCodeOffset;
     private int phiOperand;
-    private int scopeCount;
     private int lirOpId;
 
     public ExceptionHandler(RiExceptionHandler handler) {
         this.handler = handler;
         this.entryCodeOffset = -1;
         this.phiOperand = -1;
-        this.scopeCount = -1;
         this.lirOpId = -1;
     }
 
@@ -64,7 +62,6 @@
         this.entryCode = other.entryCode;
         this.entryCodeOffset = other.entryCodeOffset;
         this.phiOperand = other.phiOperand;
-        this.scopeCount = other.scopeCount;
         this.lirOpId = other.lirOpId;
     }
 
@@ -120,10 +117,6 @@
         return phiOperand;
     }
 
-    public int scopeCount() {
-        return scopeCount;
-    }
-
     public void setEntryBlock(BlockBegin entry) {
         entryBlock = entry;
     }
@@ -136,10 +129,6 @@
         phiOperand = phi;
     }
 
-    public void setScopeCount(int count) {
-        scopeCount = count;
-    }
-
     public boolean isCatchAll() {
         return handler.catchTypeCPI() == 0;
     }
--- a/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java	Wed May 04 16:34:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java	Wed May 04 16:36:09 2011 +0200
@@ -528,7 +528,7 @@
     }
 
     /**
-     * Traverses all {@linkplain Value#isLive() live values} of this frame state and it's callers.
+     * Traverses all {@linkplain Value#isLive() live values} of this frame state.
      *
      * @param proc the call back called to process each live value traversed
      */