Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/lir/LIRList.java @ 2708:4272b7af2d17
merge
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 18 May 2011 18:40:58 +0200 |
parents | 7ed72769d51a 42450f536d24 |
children | c1a9bf38da28 |
comparison
equal
deleted
inserted
replaced
2707:7ed72769d51a | 2708:4272b7af2d17 |
---|---|
29 import com.sun.c1x.alloc.*; | 29 import com.sun.c1x.alloc.*; |
30 import com.sun.c1x.debug.*; | 30 import com.sun.c1x.debug.*; |
31 import com.sun.c1x.gen.*; | 31 import com.sun.c1x.gen.*; |
32 import com.sun.c1x.globalstub.*; | 32 import com.sun.c1x.globalstub.*; |
33 import com.sun.c1x.ir.*; | 33 import com.sun.c1x.ir.*; |
34 import com.sun.c1x.lir.FrameMap.StackBlock; | |
35 import com.sun.cri.ci.*; | 34 import com.sun.cri.ci.*; |
36 import com.sun.cri.ci.CiTargetMethod.Mark; | 35 import com.sun.cri.ci.CiTargetMethod.Mark; |
37 import com.sun.cri.ri.*; | 36 import com.sun.cri.ri.*; |
38 import com.sun.cri.xir.CiXirAssembler.XirMark; | 37 import com.sun.cri.xir.CiXirAssembler.XirMark; |
39 import com.sun.cri.xir.*; | 38 import com.sun.cri.xir.*; |
99 | 98 |
100 public void membar(int barriers) { | 99 public void membar(int barriers) { |
101 append(new LIRMemoryBarrier(barriers)); | 100 append(new LIRMemoryBarrier(barriers)); |
102 } | 101 } |
103 | 102 |
104 public void osrEntry(CiValue osrPointer) { | |
105 append(new LIROp0(LIROpcode.OsrEntry, osrPointer)); | |
106 } | |
107 | |
108 public void branchDestination(Label lbl) { | 103 public void branchDestination(Label lbl) { |
109 append(new LIRLabel(lbl)); | 104 append(new LIRLabel(lbl)); |
110 } | 105 } |
111 | 106 |
112 public void negate(CiValue src, CiValue dst, GlobalStub globalStub) { | 107 public void negate(CiValue src, CiValue dst, GlobalStub globalStub) { |
153 | 148 |
154 public void monitorAddress(int monitor, CiValue dst) { | 149 public void monitorAddress(int monitor, CiValue dst) { |
155 append(new LIRMonitorAddress(dst, monitor)); | 150 append(new LIRMonitorAddress(dst, monitor)); |
156 } | 151 } |
157 | 152 |
158 public void infopoint(LIROpcode opcode, CiValue dst, LIRDebugInfo info) { | |
159 append(new LIROp0(opcode, dst, info)); | |
160 } | |
161 | |
162 public void alloca(StackBlock stackBlock, CiValue dst) { | |
163 append(new LIRStackAllocate(dst, stackBlock)); | |
164 } | |
165 | |
166 public void convert(int code, CiValue left, CiValue dst, GlobalStub globalStub) { | 153 public void convert(int code, CiValue left, CiValue dst, GlobalStub globalStub) { |
167 LIRConvert op = new LIRConvert(code, left, dst); | 154 LIRConvert op = new LIRConvert(code, left, dst); |
168 op.globalStub = globalStub; | 155 op.globalStub = globalStub; |
169 append(op); | 156 append(op); |
170 } | 157 } |
301 | 288 |
302 public void callRuntime(CiRuntimeCall rtCall, CiValue result, List<CiValue> arguments, LIRDebugInfo info) { | 289 public void callRuntime(CiRuntimeCall rtCall, CiValue result, List<CiValue> arguments, LIRDebugInfo info) { |
303 append(new LIRCall(runtimeCallOp, rtCall, result, arguments, info, null, false, null)); | 290 append(new LIRCall(runtimeCallOp, rtCall, result, arguments, info, null, false, null)); |
304 } | 291 } |
305 | 292 |
306 public void pause() { | |
307 append(new LIROp0(LIROpcode.Pause)); | |
308 } | |
309 | |
310 public void breakpoint() { | 293 public void breakpoint() { |
311 append(new LIROp0(LIROpcode.Breakpoint)); | 294 append(new LIROp0(LIROpcode.Breakpoint)); |
312 } | 295 } |
313 | 296 |
314 public void prefetch(CiAddress addr, boolean isStore) { | 297 public void prefetch(CiAddress addr, boolean isStore) { |
409 // print block id | 392 // print block id |
410 BlockEnd end = x.end(); | 393 BlockEnd end = x.end(); |
411 TTY.print("B%d ", x.blockID); | 394 TTY.print("B%d ", x.blockID); |
412 | 395 |
413 // print flags | 396 // print flags |
414 if (x.checkBlockFlag(BlockBegin.BlockFlag.SubroutineEntry)) { | 397 if (x.isLinearScanLoopHeader()) { |
415 TTY.print("jsr "); | |
416 } | |
417 if (x.checkBlockFlag(BlockBegin.BlockFlag.BackwardBranchTarget)) { | |
418 TTY.print("bb "); | |
419 } | |
420 if (x.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopHeader)) { | |
421 TTY.print("lh "); | 398 TTY.print("lh "); |
422 } | 399 } |
423 if (x.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopEnd)) { | 400 if (x.isLinearScanLoopEnd()) { |
424 TTY.print("le "); | 401 TTY.print("le "); |
425 } | 402 } |
426 | 403 |
427 // print block bci range | 404 // print block bci range |
428 TTY.print("[%d, %d] ", x.bci(), (end == null ? -1 : end.bci())); | 405 TTY.print("[%d, %d] ", x.bci(), (end == null ? -1 : end.bci())); |