[llvm] [EarlyCSE] Compare GEP instructions based on offset (PR #65875)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 07:23:51 PDT 2023


DianQK wrote:

> > > > Please check the compile-time impact of this change. The impact was high when I tried something like this before, but maybe I made a mistake.
> > > 
> > > 
> > > Could you add https://github.com/DianQK/llvm-project to https://llvm-compile-time-tracker.com/? Thanks.
> > 
> > 
> > I'll do this on Thursday. I'm currently on vacation and don't have the SSH key with me.
> 
> Done, results are here: http://llvm-compile-time-tracker.com/compare.php?from=ac1daad9bb4eb083df6b215c029816d3149e00d8&to=e079f3f9107f55e1595a47aafec5fe4e03277665&stat=instructions:u

Sad result. My initial guess was that in `GEP 1 1 .... 1 1 a` did redundant calculations.
But https://github.com/DianQK/llvm-project/commit/f3fdea44cd6ba0b129337850fecf567c35de6790 got [worse results](https://llvm-compile-time-tracker.com/?config=NewPM-O3&stat=instructions%3Au&remote=DianQK).
My other guess is that iteration itself is expensive. I'll try again. If that still doesn't work, I'd look into valgrind related tools.

https://github.com/llvm/llvm-project/pull/65875


More information about the llvm-commits mailing list