Lines Matching defs:Bit
250 // Can only convert single bit.
289 if (getNumBits() != 1) return nullptr; // Only accept if just one bit!
303 if (auto *Bit = dyn_cast<BitInit>(getBit(i)))
304 Result |= static_cast<int64_t>(Bit->getValue()) << i;
329 if (Init *Bit = getBit(e-i-1))
330 Result += Bit->getAsString();
337 // Fix bit initializer to preserve the behavior that bit reference from a unset
338 // bits initializer will resolve into VarBitInit to keep the field name and bit
365 Init *Bit = CachedInit->getBit(CurBit->getBitNum());
366 NewBits[i] = fixBitInit(RV, CurBit, Bit);
383 Init *Bit = CurBitVar->getBit(CurBit->getBitNum());
384 NewBits[i] = fixBitInit(RV, CurBit, Bit);
420 if (Val != 0 && Val != 1) return nullptr; // Only accept 0 or 1 for a bit!
600 Init *OpInit::getBit(unsigned Bit) const {
603 return VarBitInit::get(const_cast<OpInit*>(this), Bit);
795 // try to fold eq comparison for 'bit' and 'int', otherwise fallback
1116 // Accept variable if it is already of bit type!
1125 // Ternary !if can be converted to bit, but only if both sides are
1126 // convertible to a bit.
1231 Init *VarInit::getBit(unsigned Bit) const {
1234 return VarBitInit::get(const_cast<VarInit*>(this), Bit);
1314 return TI->getAsString() + "{" + utostr(Bit) + "}";
1349 Init *VarListElementInit::getBit(unsigned Bit) const {
1352 return VarBitInit::get(const_cast<VarListElementInit*>(this), Bit);
1408 Init *FieldInit::getBit(unsigned Bit) const {
1411 return VarBitInit::get(const_cast<FieldInit*>(this), Bit);
1824 /// value as a bit, aborting if the field does not exist or if the value is
1836 FieldName + "' does not have a bit initializer!");
1853 FieldName + "' does not have a bit initializer!");