Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java @ 13229:325b4e4efb60
added CompilationResultBuilderFactory to support peep-hole instrumentation of methods as their code is emitted
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 03 Dec 2013 16:33:41 +0100 |
parents | 1a66453f73db |
children | 7e237378923d |
comparison
equal
deleted
inserted
replaced
13228:4568980f7257 | 13229:325b4e4efb60 |
---|---|
165 public void leave(CompilationResultBuilder crb) { | 165 public void leave(CompilationResultBuilder crb) { |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 @Override | 169 @Override |
170 public CompilationResultBuilder newCompilationResultBuilder(LIRGenerator lirGen, CompilationResult compilationResult) { | 170 public CompilationResultBuilder newCompilationResultBuilder(LIRGenerator lirGen, CompilationResult compilationResult, CompilationResultBuilderFactory factory) { |
171 // Omit the frame of the method: | 171 // Omit the frame of the method: |
172 // - has no spill slots or other slots allocated during register allocation | 172 // - has no spill slots or other slots allocated during register allocation |
173 // - has no callee-saved registers | 173 // - has no callee-saved registers |
174 // - has no incoming arguments passed on the stack | 174 // - has no incoming arguments passed on the stack |
175 // - has no instructions with debug info | 175 // - has no instructions with debug info |
176 FrameMap frameMap = lirGen.frameMap; | 176 FrameMap frameMap = lirGen.frameMap; |
177 AbstractAssembler masm = createAssembler(frameMap); | 177 AbstractAssembler masm = createAssembler(frameMap); |
178 PTXFrameContext frameContext = new PTXFrameContext(); | 178 PTXFrameContext frameContext = new PTXFrameContext(); |
179 CompilationResultBuilder crb = new CompilationResultBuilder(getCodeCache(), getForeignCalls(), frameMap, masm, frameContext, compilationResult); | 179 CompilationResultBuilder crb = factory.createBuilder(getCodeCache(), getForeignCalls(), frameMap, masm, frameContext, compilationResult); |
180 crb.setFrameSize(0); | 180 crb.setFrameSize(0); |
181 return crb; | 181 return crb; |
182 } | 182 } |
183 | 183 |
184 @Override | 184 @Override |