[llvm] r176214 - The FastISEL should be fast. But when we record statistics we use atomic operations to increment the counters.

Eli Bendersky eliben at google.com
Thu Feb 28 09:15:21 PST 2013


On Thu, Feb 28, 2013 at 9:13 AM, Nadav Rotem <nrotem at apple.com> wrote:
> Hi Eric,
>
> This is what I was talking about that Nadav never bothered to respond to.
>
>
> You wrote me less than 24 hours ago, and I did not have time to write back.
>
> Whether or not it made sense to put all of the statistics as only firing
> during
> debug builds and then making the change in the statistics framework rather
> than #if NDEBUG for each set of statistics and the assorted increments.
>
>
> I don't have any preference. Do you prefer one way or the other ?
>
> I kept NumDAGBlocks and NumFastIselBlocks, because they are called once per
> blocks and not once per instructions. I don't mind if we put them behind
> #ifndef NDEBUG as well.
>

The blocks probably have less effect than per-instruction counts. I'll
send a patch for putting the other per-instruction counts behind
NDEBUG, but in parallel discussing the more general approach of having
all stats fire in NDEBUG can be useful as well.

Eli



More information about the llvm-commits mailing list