MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / mkUndefInput

Method mkUndefInput

ir/memory.cpp:1756–1770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1754}
1755
1756pair<expr, expr> Memory::mkUndefInput(const ParamAttrs &attrs0) {
1757 unsigned bits = bits_for_offset + bits_for_bid - Pointer::hasLocalBit();
1758 expr undef = expr::mkFreshVar("undef", expr::mkUInt(0, bits));
1759
1760 auto attrs = attrs0;
1761 attrs.set(ParamAttrs::IsArg);
1762 Pointer ptr(*this,
1763 Pointer::mkLongBid(undef.extract(bits-1, bits_for_offset), false),
1764 undef.extract(bits_for_offset-1, 0), attrs);
1765
1766 if (attrs0.has(ParamAttrs::NonNull))
1767 state->addPre(!ptr.isNull());
1768
1769 return { std::move(ptr).release(), std::move(undef) };
1770}
1771
1772Memory::FnRetData Memory::FnRetData::mkIf(const expr &cond, const FnRetData &a,
1773 const FnRetData &b) {

Callers

nothing calls this directly

Calls 6

addPreMethod · 0.80
isNullMethod · 0.80
releaseMethod · 0.80
setMethod · 0.45
extractMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected