[PATCH] D67687: [NewPM][CodeGen] Introduce machine pass and machine pass manager

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 18:48:49 PDT 2020


ychen planned changes to this revision.
ychen added a comment.

Based on the feedbacks from @aeubanks @arsenm @craig.topper , I'll

- add tests for doing the initialization/finalization. (@aeubanks if you're ok with keeping this, if not, please let me know.)
- move the testing of target IR passes from driven by `llc` to `opt`. This is also in line with what legacy PM does.
- the pipeline runs all passes on each function / machine function at a time and then the machine function is deleted. This is also what legacy PM does but I missed in the patch.

Suppose we're codegening a TU containing two functions: foo, bar. And the pipeline has two machine passes: pass1, pass2. The order of execution is pass1(on foo), pass2(on foo), <delete>(foo), pass1(on bar), pass2(on bar), <delete>(bar).

If machine module passes like MachineOutiner pass is added into the two-pass pipeline in the middle: pass1, mo_pass, pass2. The order of execution is pass1(on foo), pass1(on bar), mo(on TU), pass2(on foo), <delete>(foo), pass2(on bar), <delete>(bar).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67687





More information about the llvm-commits mailing list