This is an archive of the discontinued LLVM Phabricator instance.

[LoopInfo] Make LoopBase and Loop destructors non-public
ClosedPublic

Authored by sanjoy on Sep 18 2017, 2:12 PM.

Details

Summary

See comment for why I think this is a good idea.

This change also:

  • Removes an SCEV test case. The SCEV test was not testing anything useful (most of it was #if 0 ed out) and it would need to be updated to deal with a private ~Loop::Loop.
  • Updates the loop pass manager test case to deal with a private ~Loop::Loop.
  • Renames markAsRemoved to markAsErased to contrast with removeLoop, via the usual remove vs. erase idiom we already have for instructions and basic blocks.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy created this revision.Sep 18 2017, 2:12 PM
chandlerc accepted this revision.Sep 19 2017, 2:49 PM

LGTM, nits below.

include/llvm/Analysis/LoopInfo.h
343–349 ↗(On Diff #115718)

Rather than using llvm:: prefixes, I'd just use markdown around the name, for example: `Loop` and `LoopInfo`.

lib/Analysis/LoopInfo.cpp
625 ↗(On Diff #115718)

This should really be erase rather than markAsErased... But happy for that to be a later change.

This revision is now accepted and ready to land.Sep 19 2017, 2:49 PM
This revision was automatically updated to reflect the committed changes.
sanjoy marked an inline comment as done.
sanjoy added inline comments.Sep 19 2017, 4:22 PM
lib/Analysis/LoopInfo.cpp
625 ↗(On Diff #115718)

I'll do that renaming once the bump ptr allocator change has landed.