[llvm-commits] CVS: llvm/lib/Reoptimizer/BinInterface/select.cpp
Anand Shukla
ashukla at cs.uiuc.edu
Sat May 31 21:37:01 PDT 2003
Changes in directory llvm/lib/Reoptimizer/BinInterface:
select.cpp updated: 1.4 -> 1.5
---
Log message:
supressed debug output
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/BinInterface/select.cpp
diff -u llvm/lib/Reoptimizer/BinInterface/select.cpp:1.4 llvm/lib/Reoptimizer/BinInterface/select.cpp:1.5
--- llvm/lib/Reoptimizer/BinInterface/select.cpp:1.4 Sat May 31 17:07:49 2003
+++ llvm/lib/Reoptimizer/BinInterface/select.cpp Sat May 31 21:36:20 2003
@@ -63,7 +63,9 @@
for (unsigned int p=0; p< instr->phi.params->size(); p++){
int id = (*instr->phi.params)[p];
ssa_to_vreg[id] = free_vreg;
+#ifdef FOR_DEBUG
printf("PHI Id=%d ssa=%d vreg=%d\n", i, id, ssa_to_vreg[id]);
+#endif
}
ssa_to_vreg[i] = free_vreg;
@@ -81,7 +83,9 @@
for (s=0;s<sections.size();s++){
for (i = begin(s); i!=end(s); i=next(i)){
+#ifdef FOR_DEBUG
printf("SSA: %d vreg: %d\n", i, ssa_to_vreg[i]);
+#endif
}
}
@@ -101,8 +105,9 @@
vregs[free_vreg].uses =
vregs[free_vreg].lastuse =
vregs[free_vreg].mreg = 0;
-
+#ifdef FOR_DEBUG
printf("Assigned vreg to ssa=%d\n",i);
+#endif
free_vreg++;
}
@@ -158,7 +163,9 @@
}
}
+#ifdef FOR_DEBUG
printf("i = %d vreg=%d free-reg=%d\n", i, ssa_to_vreg[i],free_vreg);
+#endif
}
}
// register allocation state
@@ -196,8 +203,10 @@
//mark last use as end of section trace --Anand
vregs[ssa_to_vreg[livein[p]]].lastuse = end(SECTION_TRACE);
-
- printf("liveInId=%d vreg=%d hwreg=%d\n",livein[p], ssa_to_vreg[livein[p]], mreg);
+#ifdef FOR_DEBUG
+ printf("liveInId=%d vreg=%d hwreg=%d\n",livein[p],
+ ssa_to_vreg[livein[p]], mreg);
+#endif
}
//Allocate regs which have been "pinned" down
@@ -210,7 +219,9 @@
freeregs.grabreg(outReg);
regs.touched_regs |= (1<<outReg);
hwregs[outReg] = ssa_to_vreg[*VI];
+#ifdef FOR_DEBUG
printf("pinned down: id=%d mreg=%d\n", *VI, outReg);
+#endif
}
// grab our spill registers
@@ -298,22 +309,25 @@
skipIteration = true;
if(skipIteration){
+#ifdef FOR_DEBUG
printf("Before skipping\n");
sparc_print(instr->instr);
printf("\nSSAid:%u vreg:%u mreg:%u\n", i, ssa_to_vreg[i],
vregs[ssa_to_vreg[i]].mreg);
+#endif
continue;
}
int id = ssa_to_vreg[i];
int dreg = freeregs.allocreg();
-
+#ifdef FOR_DEBUG
printf("instr----\n");
sparc_print(instr->instr);
printf("\nid = %d \t dreg = %d \t free= %x\n", i, dreg,
freeregs.free32());
-
+#endif
+
if (VREG_ISMEM(dreg)){
//printf("Here\n");
//assert(0);
@@ -369,7 +383,8 @@
}
}
}
-
+
+#ifdef FOR_DEBUG
// print register assignment
for (s=0;s<sections.size();s++){
for (unsigned int i = begin(s); i!=end(s); i=next(i)){
@@ -377,7 +392,8 @@
vregs[ssa_to_vreg[i]].mreg);
}
}
-
+#endif
+
// calculate amount of stack space needed
regs.stack_size = max_midx+8;
}
More information about the llvm-commits
mailing list