* join two facts from two visits to the same function * return 1 if changed, 0 otherwise */
| 599 | * return 1 if changed, 0 otherwise |
| 600 | */ |
| 601 | int |
| 602 | FactPointTo::join_visits(const Fact& f) |
| 603 | { |
| 604 | // ignore tbd fact from either visit |
| 605 | int changed = 0; |
| 606 | if (is_related(f)) { |
| 607 | const FactPointTo& fact = (const FactPointTo&)f; |
| 608 | if (!fact.is_tbd_only()) { |
| 609 | const vector<const Variable*>& vars = fact.get_point_to_vars(); |
| 610 | if (is_tbd_only()) { |
| 611 | point_to_vars.clear(); |
| 612 | } |
| 613 | for (size_t i=0; i<vars.size(); i++) { |
| 614 | const Variable* v = vars[i]; |
| 615 | if (!is_variable_in_set(point_to_vars, v)) { |
| 616 | point_to_vars.push_back(v); |
| 617 | changed = 1; |
| 618 | } |
| 619 | } |
| 620 | } |
| 621 | } |
| 622 | return changed; |
| 623 | } |
| 624 | |
| 625 | /* |
| 626 | * return false if point-to already contains point-to-set in f, true otherwise |
nothing calls this directly
no test coverage detected