# HG changeset patch # User Thomas Wuerthinger # Date 1304519769 -7200 # Node ID d1ea2563836d56947fef5b85b4520c2f2a528b47 # Parent 6d99b909696d4e3cbaffdf11674e5e238b9bf75c# Parent ac868ecd3cfc47759a404a5273d5f2ffd2ff38b2 Merge. diff -r 6d99b909696d -r d1ea2563836d doc/design/graal_compiler.tex --- 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. diff -r 6d99b909696d -r d1ea2563836d doc/design/graphdrawing.tex --- 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]{} \newcommand{\portsuccessor}[1]{} \newcommand{\portempty}[0]{} -\newcommand{\genericnodelabel}[2]{#1} +\newcommand{\genericnodelabel}[2]{
#1} \newcommand{\nodestart}[0]{start [shape=plaintext, rank=source, label=<
\genericnodelabel{start}{lightyellow} \portsuccessor{successors} \portempty \genericnodeend } \newcommand{\nodeend}[0]{\genericnodestart{end} \portempty \portinput{inputs} \genericnodelabel{end}{lightyellow}
>]} +\newcommand{\nodeconst}[2]{#1 [margin="0.05, 0.05", shape=plaintext, label=<
#2
>]} +\newcommand{\nodeframestate}[2]{#1 [margin="0.05, 0.05", shape=plaintext, label=<
#2
>]} + + \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 } diff -r 6d99b909696d -r d1ea2563836d graal/GraalCompiler/.classpath --- 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 @@ + diff -r 6d99b909696d -r d1ea2563836d graal/GraalCompiler/src/com/sun/c1x/asm/AbstractAssembler.java --- 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); } } } diff -r 6d99b909696d -r d1ea2563836d graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java --- 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 exceptionHandlers = new ArrayList(); 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 exceptionHandlers, ExceptionHandler handler, FrameState curState, int scopeCount) { + private boolean addExceptionHandler(ArrayList 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; diff -r 6d99b909696d -r d1ea2563836d graal/GraalCompiler/src/com/sun/c1x/ir/ExceptionHandler.java --- 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; } diff -r 6d99b909696d -r d1ea2563836d graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java --- 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 */