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

Method computeAccessStats

ir/memory.cpp:810–827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

808static uint64_t only_local = 0, only_nonlocal = 0;
809
810void Memory::AliasSet::computeAccessStats() const {
811 auto nlocal = numMayAlias(true);
812 auto nnonlocal = numMayAlias(false);
813
814 if (nlocal > 0 && nnonlocal == 0)
815 ++only_local;
816 else if (nlocal == 0 && nnonlocal > 0)
817 ++only_nonlocal;
818
819 auto alias = nlocal + nnonlocal;
820 for (unsigned i = 0; i < alias_buckets_vals.size(); ++i) {
821 if (alias <= alias_buckets_vals[i]) {
822 ++alias_buckets_hits[i];
823 return;
824 }
825 }
826 ++alias_buckets_hits.back();
827}
828
829void Memory::AliasSet::printStats(ostream &os) {
830 double total

Callers 1

computeAliasingMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected