[MLIR][Bufferization] Improve performance of DropEquivalentBufferResults Pass

When I optimize my code using DropEquivalentBufferResultsPass, I found that it took a long time, almost an hour and a half. To be honest, this module is really big. The main function forward has 4400 call sites, and there are 2500 sub-functions. I wonder if there’s any way to optimize it.

@matthias-springer

I can’t spot any obvious implementation issues with this pass. I’d try profiling it to see where we are spending time. 1.5 hours is way too slow.

1 Like

Thank you so much for your help.