BOLT icon indicating copy to clipboard operation
BOLT copied to clipboard

Fine-grained tests on a single pass

Open MaskRay opened this issue 4 years ago • 1 comments

In llvm-project, the backend code generating generally has worse tooling than middle-end IR optimization.

In the middle-end, we have opt -passes= to run a custom pipeline (usually a specific pass). This separates concerns: the test is more focused and not subject to changes to other passes. The reader can clearly understand the effects instead of deriving its implication from its interaction with other passes. The test generally does not need adjustment if other passes change or the optimization pipeline has adjusted the position of the particular pass.

The backend testing tends to be more "monolithic". llc %s runs numerous intertwined passes. Changing the order of the pipeline can change a number of tests. There are more focused .mir tests but they tend to be long and difficult to maintain by hand.

From a quick glance, the existing tests do not run a single pass.

MaskRay avatar Mar 18 '21 19:03 MaskRay

Currently BOLT doesn't have a way to run passes in isolation as with opt -passes=... But we've discussed it with the community as a potential direction to extend BOLT: to add an ability to dump and read binary intermediate representation, which would allow us to get closer to this isolated pass testing. But for now, there's no facility.

aaupov avatar May 11 '21 06:05 aaupov