This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Optimization Diary
>>>>> "Devang" == Devang Patel <dpatel@apple.com> writes:
Devang> This version removes internal radar numbers and replaces s/
Devang> DW_AT_APPLE.../DW_AT_GNU...
I read this. I'm not anywhere near an expert in dwarf or anything
related to this proposal, so please bear with me if I say something
dumb :-).
I do have a few questions and concerns.
* Why put the optimization diary into the object file?
Why not just have -Wdiary and print it along with all the warnings?
(I'm sure there's an answer to this, it would just be nice if it
were in the document...)
* DW_AT_GNU_OD_cmd - it seems strange for this to be defined in terms
of text highlighting. Why have a separate code here for "dead
code" instead of just marking a text region and having a new _msg
value meaning "dead code"?
* DW_AT_GNU_OD_category
The last value is 0x0000 0016. That seems wrong, I think it should
end in 0010.
What are "action trails"?
Why is the action bit needed? The example in the text seems wrong,
since there is an explicit _msg value for "function is inlined",
and multiple values for why a function might not be inlined.
How would the user find out what parameter is referred to by a
parameter manipulation hint? I don't see where this is recorded.
* DW_AT_GNU_OD_msg
I presume that GCC will somehow maintain the canonical values here.
It seems important that there be a central process for registering
these so that weird divergences don't crop up over time. Also
perhaps a "vendor extension" range should be specified? In any
case, the mechanisms here ought to be documented.
A nit:
* The first example is oddly formatted. The blue region encompasses
an entire comment, but the salmon (? nice color choice :) region
stops before the '*/'. And... surely the diary won't be marking
text regions corresponding to comments anyway? I feel like I'm
probably misunderstanding the point of this highlighting.
Tom