[PATCH] D64179: [CodeGen] Define an interface for the new pass manager.

Charles Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 10:52:22 PDT 2019


czhang added a comment.

By the way, the reason why I've had a hard time with the unit tests is that MIR modules are not so easily serialized and read as IR modules are, because the representation isn't as static. Any suggestions on how to achieve something similar to parseIR cleanly without resorting to the mess in llc would be highly appreciated. For now, testing is done by checking bitwise identical outputs from both pass managers, leveraging the parsing/machine function extraction boilerplate in llc.

If there is in fact a need to use the same machine function extraction functions from MachineModuleInfoAnalysis that are only present in the next patch, we start to have coupling issues with the child dependencies of this pass, since properly handling the MIR parsing, serializing, and machine function extraction is done in the next few patches. So then there are two ways to go forward:

1. Add unit tests at the end of this patch series.
2. Leverage the legacy pass manager to do parsing and readout of machine functions from the yaml format for the unit tests.

Any particular opinions? I would be in favor of 1. so we can start to land some of these patches in the series (2/7 with lgtm) that have already been approved and depend on this one so that they don't fall prey to more rebase issues later. It is rather hard to maintain a seven patch series.

Otherwise the unit tests would mostly be a straight copy of the tests for the Module info ones in PassManagerTest.cpp, with the proper renaming done, modulo the differences in parsing and matching of serialized MIR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64179





More information about the llvm-commits mailing list