コード例 #1
0
    Reg allocatedReg(Tmp tmp) const
    {
        ASSERT(!tmp.isReg());
        ASSERT(m_coloredTmp.size());
        ASSERT(tmp.isGP() == (type == Arg::GP));

        Reg reg = m_coloredTmp[AbsoluteTmpMapper<type>::absoluteIndex(tmp)];
        if (!reg) {
            // We only care about Tmps that interfere. A Tmp that never interfere with anything
            // can take any register.
            reg = regsInPriorityOrder(type).first();
        }
        return reg;
    }
コード例 #2
0
 static unsigned absoluteIndex(const Tmp& tmp)
 {
     ASSERT(tmp.isGP());
     ASSERT(static_cast<int>(tmp.internalValue()) > 0);
     return tmp.internalValue();
 }