On Mar 30, 2007, at 3:03 PM, Evan Cheng wrote: >>> unsigned reg = rep(mop.getReg()); >>> mii->getOperand(i).setReg(reg); >>> >>> + // If the definition instruction is re- >>> materializable, its spill >>> + // weight is zero. >>> LiveInterval &RegInt = getInterval(reg); >>> - RegInt.weight += >>> - (mop.isUse() + mop.isDef()) * pow(10.0F, (int) >>> loopDepth); >>> + if (!RegInt.remat) { >>> + RegInt.weight += >>> + (mop.isUse() + mop.isDef()) * pow(10.0F, (int) >>> loopDepth); >>> + } >> >> Should it really be zero? It should definitely be lower that a >> normal value, but zero seems low. The loop depth should still be >> taken into consideration. > > Funny you should mention this. I am re-evaluating this right now. > My thinking is loads (load from constantpool or stack slots) would > have the normal weight. The rest will have half the weight.
Why not just make everything half weight? What would be lost? -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits