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

Method nonPoison

ir/memory.cpp:373–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373expr Byte::nonPoison() const {
374 if (isAsmMode())
375 return expr::mkInt(-1, bits_poison_per_byte);
376 if (!does_int_mem_access)
377 return ptrNonpoison();
378
379 expr np = nonptrNonpoison();
380 if (byte_has_ptr_bit() && bits_poison_per_byte == 1) {
381 assert(!np.isValid() || ptrNonpoison().eq(np == 1));
382 return np;
383 }
384 return expr::mkIf(isPtr(),
385 expr::mkIf(ptrNonpoison(), expr::mkInt(-1, np),
386 expr::mkUInt(0, np)),
387 np);
388}
389
390expr Byte::isZero() const {
391 return expr::mkIf(isPtr(), ptr().isNull(), nonptrValue() == 0);

Callers 1

refinedMethod · 0.80

Calls 3

byte_has_ptr_bitFunction · 0.85
isValidMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected