[Mlir-commits] [mlir] [mlir] [dataflow] : Improve the time and space footprint of data flow. (PR #135325)
donald chen
llvmlistbot at llvm.org
Tue Apr 15 01:19:57 PDT 2025
cxy-1993 wrote:
> > > This seems useful, but do you have some benchmarks showing how this improves things?
> >
> >
> > There is no such benchmark on the current MLIR. On our downstream LLVM, we implemented reaching definition analysis based on dataflow. I simply tested it on a softmax example (with only one loop, the program is about 300 lines), and the solver's initialization time for reaching definitions was reduced by half (from 0.1211s to 0.0640s). This optimization will become more significant as the program size increases and the control flow becomes more complex.
>
> Thanks for sharing these results. Yes there are no benchmarks in upstream MLIR, but knowing that this improved something downstream is valuable as well. 2x faster is a big improvement! Do you also know how memory footprint is affected?
In a typical test case(~800 lines), we still only run the solver to obtain reaching definitions analysis, and then the program exits directly. Here is the peak heap measured using valgrind massif:
before:
mem_heap_B=614554909
mem_heap_extra_B=8959571
after:
mem_heap_B=245228157
mem_heap_extra_B=3684731
The heap size directly requested by the program dropped by 60%.
https://github.com/llvm/llvm-project/pull/135325
More information about the Mlir-commits
mailing list