comparison graal/GraalCompiler/src/com/sun/c1x/lir/LIRList.java @ 2718:c1ce2a53d6c3

Attempt to remove dependency between backend and BlockBegin.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 19 May 2011 16:05:42 +0200
parents c1a9bf38da28
children c379183d1c54
comparison
equal deleted inserted replaced
2717:bd85cf08720a 2718:c1ce2a53d6c3
386 386
387 public void load(CiAddress src, CiValue dst, LIRDebugInfo info) { 387 public void load(CiAddress src, CiValue dst, LIRDebugInfo info) {
388 append(new LIROp1(LIROpcode.Move, src, dst, src.kind, info)); 388 append(new LIROp1(LIROpcode.Move, src, dst, src.kind, info));
389 } 389 }
390 390
391 public static void printBlock(BlockBegin x) { 391 public static void printBlock(LIRBlock x) {
392 // print block id 392 // print block id
393 TTY.print("B%d ", x.blockID); 393 TTY.print("B%d ", x.blockID());
394 394
395 // print flags 395 // print flags
396 if (x.isLinearScanLoopHeader()) { 396 if (x.isLinearScanLoopHeader()) {
397 TTY.print("lh "); 397 TTY.print("lh ");
398 } 398 }
405 405
406 // print predecessors and successors 406 // print predecessors and successors
407 if (x.numberOfPreds() > 0) { 407 if (x.numberOfPreds() > 0) {
408 TTY.print("preds: "); 408 TTY.print("preds: ");
409 for (int i = 0; i < x.numberOfPreds(); i++) { 409 for (int i = 0; i < x.numberOfPreds(); i++) {
410 TTY.print("B%d ", x.predAt(i).block().blockID); 410 TTY.print("B%d ", x.predAt(i).blockID());
411 } 411 }
412 } 412 }
413 413
414 if (x.numberOfSux() > 0) { 414 if (x.numberOfSux() > 0) {
415 TTY.print("sux: "); 415 TTY.print("sux: ");
416 for (int i = 0; i < x.numberOfSux(); i++) { 416 for (int i = 0; i < x.numberOfSux(); i++) {
417 TTY.print("B%d ", x.suxAt(i).blockID); 417 TTY.print("B%d ", x.suxAt(i).blockID());
418 } 418 }
419 } 419 }
420 420
421 TTY.println(); 421 TTY.println();
422 } 422 }
423 423
424 public static void printLIR(List<BlockBegin> blocks) { 424 public static void printLIR(List<LIRBlock> blocks) {
425 if (TTY.isSuppressed()) { 425 if (TTY.isSuppressed()) {
426 return; 426 return;
427 } 427 }
428 TTY.println("LIR:"); 428 TTY.println("LIR:");
429 int i; 429 int i;
430 for (i = 0; i < blocks.size(); i++) { 430 for (i = 0; i < blocks.size(); i++) {
431 BlockBegin bb = blocks.get(i); 431 LIRBlock bb = blocks.get(i);
432 printBlock(bb); 432 printBlock(bb);
433 TTY.println("__id_Instruction___________________________________________"); 433 TTY.println("__id_Instruction___________________________________________");
434 bb.lir().printInstructions(); 434 bb.lir().printInstructions();
435 } 435 }
436 } 436 }