[PATCH] Factor check for the assume intrinsic out of checks in computeKnownBitsFromAssume

Philip Reames listmail at philipreames.com
Mon Nov 24 12:32:01 PST 2014


ping.

On 11/18/2014 11:48 AM, Philip Reames wrote:
> Hi hfinkel,
>
> We were matching against the assume intrinsic in every check.  Since we know that it must be an assume, this is just wasted work.  Somewhat surprisingly, matching an intrinsic id is actually relatively expensive.  It devolves to a string construction and comparison in Function::isIntrinsic.
>
> I originally spotted this because it showed up in a performance profile of my compiler.  I've since discovered a separate issue which seems to be the actual root cause, but this is minor perf goodness regardless.
>
> I'm likely to follow up with another change to factor out the comparison matching.  There's no need to match the compare instruction in every single one of the tests.
>
> http://reviews.llvm.org/D6312
>
> Files:
>    lib/Analysis/ValueTracking.cpp




More information about the llvm-commits mailing list