Page MenuHomePhabricator

[Attributor] AAFunctionReachability, Handle CallBase Reachability.
ClosedPublic

Authored by kuter on Jul 20 2021, 2:48 PM.

Details

Summary

This patch makes it possible to query callbase reachability
(Can a callbase reach a function Fn transitively).
The patch moves the reachability query handling logic to a member class,
this class will have more users within the AA once we add other function
reachability queries.

Diff Detail

Event Timeline

kuter created this revision.Jul 20 2021, 2:48 PM
kuter requested review of this revision.Jul 20 2021, 2:48 PM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
kuter updated this revision to Diff 360287.Jul 20 2021, 2:51 PM

Rmove useless comment.

kuter updated this revision to Diff 360289.Jul 20 2021, 3:03 PM

Fix issue with the unittest.
Change tracking issue.

kuter updated this revision to Diff 361928.Jul 27 2021, 12:35 AM

Use the new |= operator for change tracking.

kuter updated this revision to Diff 372095.Sat, Sep 11, 1:54 PM
  • Use early increment iterator range rather than hacky code.
  • Fix the infinite loop issue.
  • Negative test case.
jdoerfert added inline comments.Sat, Sep 11, 3:22 PM
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
9546

I don't get this. In line 9331 we iterate over unreachable and ask isReachable but we always would return false because of this, no?

9597
9622

You can use recordDependence here to make it clear what is happening and avoid some unnecessary code.

9671

Documentation for both.

kuter updated this revision to Diff 372100.Sat, Sep 11, 3:57 PM

address review.

This revision is now accepted and ready to land.Sat, Sep 11, 4:00 PM
kuter updated this revision to Diff 372101.Sat, Sep 11, 4:04 PM

Use recordDependence

kuter marked 3 inline comments as done.Sat, Sep 11, 4:05 PM
This revision was landed with ongoing or failed builds.Sun, Sep 12, 3:36 PM
This revision was automatically updated to reflect the committed changes.