This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dump before flag


>
> Your patch doesn't really improve this but adds to the confusion.
>
> + ?/* Override dump TODOs. ?*/
> + ?if (dump_file && (pass->todo_flags_finish & TODO_dump_func)
> + ? ? ?&& (dump_flags & TDF_BEFORE))
> + ? ?{
> + ? ? ?pass->todo_flags_finish &= ~TODO_dump_func;
> + ? ? ?pass->todo_flags_start |= TODO_dump_func;
> + ? ?}
>
> and certainly writing to pass is not ok. ?And the TDF_BEFORE flag
> looks misplaced as it controls TODOs, not dumping behavior.
> Yes, it's a mess right now but the above looks like a hack ontop
> of that mess (maybe because of it, but well ...).
>

How about removing dumping TODO completely -- this can be done easily
-- I don't understand why pass wants extra control on the dumping if
user already asked for dumping -- it is annoying to see empty IR dump
for a pass when I want to see it.

> At least I would have expected to also get the dump after the
> pass, not only the one before it with this dump flag.
>
> Now, why can't you look at the previous pass output for the
> before-dump (as I do usually)?

For one thing, you need to either remember what is the previous pass,
or dump all passes which for large files can take very long time. Even
with all the dumps, you will need to eyeballing to find the previous
pass which may or may not have the IR dumped.

How about removing dump TODO?

Thanks,

David


>
> Richard.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]