[llvm-dev] [SCEV] getMulExpr could be extremely slow when creating SCEVs for a long chain of add/mul instructions

Huang, Li1 via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 3 13:00:42 PDT 2016


Hi Sanjoy,

Thank you for your suggestion. Looks like someone is already working on a solution in this direction, as Mehdi pointed out: https://reviews.llvm.org/D3127. But this patch is old and was not reviewed until recently. 

- Li Huang

-----Original Message-----
From: Sanjoy Das [mailto:sanjoy at playingwithpointers.com] 
Sent: Wednesday, August 3, 2016 12:23 PM
To: Huang, Li1 <li1.huang at intel.com>
Cc: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] [SCEV] getMulExpr could be extremely slow when creating SCEVs for a long chain of add/mul instructions

Hi,

I generally don't like cutoffs / "max depths", but I can't think of a better solution here (other than perhaps not doing this simplification at all, but that will affect things that depend on this simplification).  I'd be okay with adding a "SimplificationDepth" type cl::opt to SCEV that controls the point where we bail out of simplifying further.

-- Sanjoy


More information about the llvm-dev mailing list