[LLVMdev] PBQP & CalcSpillWeights
Arnaud de Grandmaison
arnaud.allarddegrandmaison at parrot.com
Wed Mar 21 08:40:00 PDT 2012
Hi All,
I finally had a chance to get back to my pbqp trials, now using the 3.0
release. I still hit the same assert : "Attempting to spill already spilled
value."
This is triggered because in RegAllocPBQP::mapPBQPToRegAlloc, a vreg node is
either :
- a physical register (problem.isPRegOption(vreg, alloc)),
- or a spill (problem.isSpillOption(vreg, alloc))
The problem is that pass CalcSpillWeights can 'hint' that it is a poor
idea to spill this specific register with :
CalcSpillWeights.cpp / VirtRegAuxInfo::CalculateWeightAndHint :
// Mark li as unspillable if all live ranges are tiny.
if (li.isZeroLength(LIS.getSlotIndexes())) {
li.markNotSpillable();
...
This hint makes the register non spillable at all for the spiller (that's the
assert above), not just a bad-idea-to-spill-but-feasible. The pbqp allocator
does not cope with this distinction and allways attempts to spill it.
I would need some guidance on how to modify the pbqp to handle this case
properly.
Best regards,
--
Arnaud de Grandmaison
More information about the llvm-dev
mailing list