[PATCH] D89371: [NPM] Port -loop-versioning-licm to NPM

Ta-Wei Tu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 10:04:33 PDT 2020


TaWeiTu added a comment.

In D89371#2332614 <https://reviews.llvm.org/D89371#2332614>, @aeubanks wrote:

> To test the NPM, don't add `-enable-new-pm`, but use the proper NPM flag `-passes`. So e.g. `-passes=default<O1>,loop-versioning-licm,licm` in place of `-enable-new-pm -O1 -loop-versioning-licm -licm`.

OK. Will update the tests.

> The failing tests seem fairly brittle and likely fail because the O1 <https://reviews.llvm.org/owners/package/1/> pipeline is slightly different. Especially the names. Maybe the test should instead contain the output IR of running the existing test under -O1, then as the test itself run that IR through the proper passes.

>From what I've seen the tests have already been passed through the O1 <https://reviews.llvm.org/owners/package/1/> pipeline.
Since by specifying `-O1 -loop-versioning-licm -licm` the O1 <https://reviews.llvm.org/owners/package/1/> pipeline runs after the two passes, even though NPM and LPM produce (almost) the same IR, the difference between the O1 <https://reviews.llvm.org/owners/package/1/> pipelines that run afterward results in the failures.
So, one quick fix would be to run the IR through the two passes in NPM and then pipe it into the LPM O1 <https://reviews.llvm.org/owners/package/1/> pipeline, but I found it quite inelegant.
What's your opinion? Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89371/new/

https://reviews.llvm.org/D89371



More information about the llvm-commits mailing list