This is an archive of the discontinued LLVM Phabricator instance.

[PM] Convert LoopInstSimplify Pass to new PM
ClosedPublic

Authored by danielcdh on Jul 12 2016, 3:01 PM.

Details

Summary

Convert LoopInstSimplify to new PM. Unfortunately there is no exisiting unittest for this pass.

Diff Detail

Event Timeline

danielcdh updated this revision to Diff 63732.Jul 12 2016, 3:01 PM
danielcdh retitled this revision from to [PM] Convert LoopInstSimplify Pass to new PM.
danielcdh updated this object.
danielcdh added a reviewer: davidxl.
danielcdh added a subscriber: llvm-commits.
silvas added a subscriber: silvas.Jul 12 2016, 3:15 PM

LGTM.

One tip is that usually you don't need to rename to "LegacyPass" unless the existing name conflicts.
I.e. usually the old PM class will be called e.g. LoopInstSimplify, the new one will be called LoopInstSimplifyPass, and so there is no conflict. This avoids a little bit of work when porting passes.

Also, for the record, the current remaining passes needed for the per-TU O3 pipeline are:

  • Loop Distribution
  • Loop Load Elimination
  • Loop Unswitch (this one may be harder since it needs "addLoop" API on loop pass manager; it may be possible to make addLoop a no-op in the new PM with a FIXME; for example, Loop Distribution does not call addLoop (probably a bug... but it is the current state))
  • Loop Unroll (I have a patch locally that I'll commit soon once I finish debugging some issues with the new PM)

(After Loop Unroll together with D21483 I can now run LLD's entire LTO pipeline with the new PM! (and start to debug the issues :) ) )

Thanks for the information!

Dehao

ping... This still needs an approval.

Thanks,
Dehao

silvas accepted this revision.Jul 14 2016, 6:21 PM
silvas edited edge metadata.

You can consider an explicit LGTM (like I did above) as an approval (e.g. as it would mean in an email response). Feel free to commit this.

This revision is now accepted and ready to land.Jul 14 2016, 6:21 PM

And btw thanks for all the help porting passes!

danielcdh closed this revision.Jul 15 2016, 9:49 AM