Page MenuHomePhabricator

[mlir][Inliner] Use llvm::parallelForEach instead of llvm::parallelTransformReduce
ClosedPublic

Authored by rriddle on Feb 4 2021, 3:46 PM.

Details

Summary

llvm::parallelTransformReduce does not schedule work on the caller thread, which becomes very costly for
the inliner where a majority of SCCs are small, often ~1 element. The switch to llvm::parallelForEach solves this,
and also aligns the implementation with the PassManager (which realistically should share the same implementation).

This change dropped compile time on an internal benchmark by ~1(25%) second.

Depends On D96085

Diff Detail

Event Timeline

rriddle created this revision.Feb 4 2021, 3:46 PM
rriddle requested review of this revision.Feb 4 2021, 3:46 PM
Jing accepted this revision.Feb 23 2021, 10:47 AM
Jing added a subscriber: Jing.

Nice improvement!

This revision is now accepted and ready to land.Feb 23 2021, 10:47 AM