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

Method isConstGlobal

ir/pointer.cpp:221–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221expr Pointer::isConstGlobal() const {
222 auto bid = getShortBid();
223 auto generic = bid.uge(has_null_block) &&
224 expr(num_consts_src > 0) &&
225 bid.ule(num_consts_src + has_null_block - 1);
226 auto tgt
227 = (num_nonlocals_src == 0 ? expr(true) : bid.ugt(num_nonlocals_src-1)) &&
228 expr(num_nonlocals != num_nonlocals_src);
229 return !isLocal() && (generic || tgt);
230}
231
232expr Pointer::isWritableGlobal() const {
233 auto bid = getShortBid();

Callers 1

check_can_loadFunction · 0.80

Calls 4

ugeMethod · 0.80
uleMethod · 0.80
ugtMethod · 0.80
exprClass · 0.70

Tested by

no test coverage detected