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

Function off_used_bits

ir/instr.cpp:3937–3945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3935DEFINE_AS_EMPTYACCESS(GEP)
3936
3937static unsigned off_used_bits(const Value &v) {
3938 if (auto c = isCast(ConversionOp::SExt, v))
3939 return off_used_bits(c->getValue());
3940
3941 if (auto ty = dynamic_cast<IntType*>(&v.getType()))
3942 return min(ty->bits(), 64u);
3943
3944 return 64;
3945}
3946
3947uint64_t GEP::getMaxGEPOffset() const {
3948 uint64_t off = 0;

Callers 1

getMaxGEPOffsetMethod · 0.85

Calls 3

isCastFunction · 0.85
getValueMethod · 0.45
bitsMethod · 0.45

Tested by

no test coverage detected