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

Method isInitialMemBlock

ir/memory.cpp:546–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546int Memory::isInitialMemBlock(const expr &e, bool match_any_init) {
547 string_view name;
548 expr load, blk, idx;
549 unsigned hi, lo;
550 if (e.isExtract(load, hi, lo) && load.isLoad(blk, idx))
551 name = blk.fn_name();
552 else
553 name = e.fn_name();
554
555 if (name.starts_with("init_mem_"))
556 return 1;
557
558 return match_any_init && name.starts_with("blk_val!") ? 2 : 0;
559}
560
561bool Memory::isInitialMemoryOrLoad(const expr &e, bool match_any_init) {
562 expr arr, idx;

Callers 1

isLocalMethod · 0.80

Calls 3

isExtractMethod · 0.80
isLoadMethod · 0.80
fn_nameMethod · 0.80

Tested by

no test coverage detected