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

Method copyUBFromBB

ir/state.cpp:748–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748void State::copyUBFromBB(
749 const unordered_map<const BasicBlock*, BasicBlockInfo> &tgt_data) {
750 auto I = src_bb_paths.find(domain.path);
751 if (I == src_bb_paths.end())
752 return;
753
754 for (auto *src_bb : I->second) {
755 bool all_paths_ok = true;
756 for (auto &[_, src_data] : src_state->predecessor_data.at(src_bb)) {
757 auto I = ranges::find_if(tgt_data, [&](const auto &p) {
758 return is_eq(p.second.path <=> src_data.path);
759 });
760 if (I == tgt_data.end() ||
761 !I->second.analysis.ranges_fn_calls.isLargerThanInclReads(
762 src_data.analysis.ranges_fn_calls)) {
763 all_paths_ok = false;
764 break;
765 }
766 }
767 if (all_paths_ok)
768 copyUBFrom(*src_bb);
769 }
770}
771
772bool State::startBB(const BasicBlock &bb) {
773 assert(undef_vars.empty());

Callers

nothing calls this directly

Calls 4

findMethod · 0.80
atMethod · 0.80
isLargerThanInclReadsMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected