[RFC] Track discriminators by instruction instead of by basic block

Cary Coutant ccoutant@google.com
Fri Nov 13 07:28:00 GMT 2009


> How much more memory do we need when keeping discriminators
> with LTO (which you don't - patches to lto-streamer-{in,out} are missing).

I'm thinking of leaving build_cfg the way it is currently (where it
assigns discriminators to basic blocks as necessary), but move the
mechanics of assigning the discriminators to individual instructions
down to the fixup_cfg pass. The earliest we actually use the
discriminators is in tree_profile, so that gets the discriminators
assigned just before we use them, and it means that the assignment
happens after lto-streamer-in, so I don't need to stream out the
per-instruction discriminator information. I'll still need to stream
the per-basic-block discriminator info out in output_cfg(), but that's
fairly easy, and adds only one byte (discriminators are small and
usually 0) per basic block.

Does that sound reasonable?

-cary



More information about the Gcc-patches mailing list