Skip to content

Commit 18ba579

Browse files
committed
simplify mkAxioms: remove implied constraints
found bby Juneyoung Lee
1 parent d8d805d commit 18ba579

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

ir/memory.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,26 +1540,6 @@ void Memory::mkAxioms(const Memory &tgt) const {
15401540
}
15411541
state->addAxiom(p1.isBlockAlive().implies(disj));
15421542
}
1543-
1544-
// ensure locals fit in their reserved space
1545-
expr one = expr::mkUInt(1, bits_size_t - 1);
1546-
auto locals_fit = [&one](const Memory &m) {
1547-
auto sum = expr::mkUInt(0, bits_size_t - 1);
1548-
for (unsigned bid = 0, nlocals = m.numLocals(); bid < nlocals; ++bid) {
1549-
Pointer p(m, bid, true);
1550-
if (auto sz = m.local_blk_size.lookup(p.getShortBid())) {
1551-
auto size = sz->extract(bits_size_t - 2, 0);
1552-
auto align = one << p.blockAlignment().zextOrTrunc(bits_size_t - 1);
1553-
align = align - one;
1554-
auto sz_align = size + align;
1555-
m.state->addPre(size.add_no_uoverflow(align));
1556-
m.state->addPre(sum.add_no_uoverflow(sz_align));
1557-
sum = sum + sz_align;
1558-
}
1559-
}
1560-
};
1561-
locals_fit(*this);
1562-
locals_fit(tgt);
15631543
}
15641544

15651545
void Memory::resetGlobals() {
@@ -1784,7 +1764,6 @@ static expr disjoint_local_blocks(const Memory &m, const expr &addr,
17841764
auto one = expr::mkUInt(1, 1);
17851765
auto zero = expr::mkUInt(0, bits_for_offset);
17861766
for (auto &[sbid, addr0] : blk_addr) {
1787-
(void)addr0;
17881767
Pointer p2(m, prepend_if(one, expr(sbid), ptr_has_local_bit()), zero);
17891768
disj &= p2.isBlockAlive()
17901769
.implies(disjoint(addr, sz, p2.getAddress(), p2.blockSize()));

0 commit comments

Comments
 (0)