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

Function is_constglb

ir/memory.cpp:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55static bool is_constglb(unsigned bid, bool src_only = false) {
56 if (has_null_block <= bid && bid < num_consts_src + has_null_block) {
57 // src constglb
58 assert(is_globalvar(bid, false));
59 return true;
60 }
61 if (!src_only && num_nonlocals_src <= bid && bid < num_nonlocals) {
62 // tgt constglb
63 assert(!is_globalvar(bid, false) &&
64 is_globalvar(bid, true));
65 return true;
66 }
67 return false;
68}
69
70// Return true if bid is the nonlocal block used to encode function calls' side
71// effects

Callers 4

always_nowriteFunction · 0.85
allocMethod · 0.85
refinedMethod · 0.85
printMethod · 0.85

Calls 1

is_globalvarFunction · 0.85

Tested by

no test coverage detected