本文整理汇总了C++中FixedBits::isTotallyFixed方法的典型用法代码示例。如果您正苦于以下问题:C++ FixedBits::isTotallyFixed方法的具体用法?C++ FixedBits::isTotallyFixed怎么用?C++ FixedBits::isTotallyFixed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FixedBits
的用法示例。
在下文中一共展示了FixedBits::isTotallyFixed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
// If the bits are totally fixed, then return a new matching ASTNode.
ASTNode
bitsToNode(const ASTNode& node, const FixedBits& bits)
{
ASTNode result;
STPMgr & beev = *node.GetSTPMgr();
assert (bits.isTotallyFixed());
assert (!node.isConstant()); // Peformance. Shouldn't waste time calling it on constants.
if (node.GetType() == BOOLEAN_TYPE)
{
if (bits.getValue(0))
{
result = beev.CreateNode(TRUE);
}
else
{
result = beev.CreateNode(FALSE);
}
}
else if (node.GetType() == BITVECTOR_TYPE)
{
result = beev.CreateBVConst(bits.GetBVConst(), node.GetValueWidth());
}
else
FatalError("sadf234s");
assert(result.isConstant());
return result;
}
示例2: getCurrentFixedBits
FixedBits*
ConstantBitPropagation::getUpdatedFixedBits(const ASTNode& n)
{
FixedBits* output = getCurrentFixedBits(n);
const Kind k = n.GetKind();
if (n.isConstant())
{
assert(output->isTotallyFixed());
return output;
}
if (SYMBOL == k)
return output; // No transfer functions for these.
vector<FixedBits*> children;
const int numberOfChildren = n.GetChildren().size();
children.reserve(numberOfChildren);
for (int i = 0; i < numberOfChildren; i++)
{
children.push_back(getCurrentFixedBits(n.GetChildren()[i]));
}
assert(status != CONFLICT);
status = dispatchToTransferFunctions(k, children, *output, n, msm);
//result = dispatchToMaximallyPrecise(k, children, *output, n,msm);
assert(((unsigned)output->getWidth()) == n.GetValueWidth() || output->getWidth() ==1);
return output;
}