Page MenuHomePhabricator

[MemorySSA] Limit clobber walks.

Authored by asbirlea on Mar 19 2019, 5:04 PM.



This patch limits all getClobberingMemoryAccess() walks to MaxCheckLimit.

Diff Detail


Event Timeline

asbirlea created this revision.Mar 19 2019, 5:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2019, 5:04 PM

Thanks for this!

Would it be straightforward to have a lit test (or similar) that sets memssa-check-limit to something super low and checks that this all does what we want (e.g. walk limit is cumulative across all walks on OptimizePhis, the walker trivially obeys it, ...)

557 ↗(On Diff #191418)

nit: please remove == 0

910 ↗(On Diff #191418)

Was this intended to be unsigned &UpwardWalkLimit? Looks like we're passing it by ref everywhere else

923 ↗(On Diff #191418)

Would it be better to make UpwardWalkLimit a member? This entire class is a container of query-specific state anyway.

asbirlea updated this revision to Diff 192740.Mar 28 2019, 4:46 PM
asbirlea marked 2 inline comments as done.

Address comments.

I updated two existing tests to take a limit of 0. Let me know if this makes sense.

asbirlea marked an inline comment as done.Mar 28 2019, 4:53 PM

Thanks again!

This revision is now accepted and ready to land.Mar 29 2019, 11:31 AM

Thank you for the review!

This revision was automatically updated to reflect the committed changes.