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

Method keep_only_writes

ir/state.cpp:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void State::ValueAnalysis::FnCallRanges::keep_only_writes() {
237 for (auto I = begin(); I != end(); ) {
238 auto &[calls, access] = I->second;
239 for (auto II = calls.begin(); II != calls.end(); ) {
240 if (!II->second)
241 II = calls.erase(II);
242 else
243 ++II;
244 }
245 if (calls.empty())
246 I = erase(I);
247 else
248 ++I;
249 }
250}
251
252void State::ValueAnalysis::FnCallRanges::meet_with(const FnCallRanges &other) {
253 for (auto &[fn, pair] : other) {

Callers 1

addFnCallMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected