[patch] Remove cfglayout.h, and distribute cfglayout.c code to users

Steven Bosscher stevenb.gcc@gmail.com
Thu Jun 7 20:29:00 GMT 2012


Hello,

The attached patch removes cfglayout.h. It was included in a lot of
places that didn't need it, and it didn't define much anyway.

While checking the users of cfglayout.h, I noticed that a lot of code
in cfglayout.c can be made local to users (reemit_insn_block_notes ->
final.c) or doesn't have to do much with cfglayout mode per se (all
insn locator code -> emit-rtl.c). This of course uncovered a buglet:
function.h's x_last_location wasn't used, but emit-rtl.c had a define
that interfered with the last_location for the insn locators.

And it seemed rather strange that emit-rtl.c should include
tree-flow.h, so I moved some non-GIMPLE tree-EH related function
prototypes from tree-flow.h to tree.h (in retrospect, I should
probably have made that a separate patch, but these patches tend to
evolve, rather than be designed... ;-)

Bootstrapped on x86_64-unknown-linux-gnu. OK?

Ciao!
Steven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disband_cfglayout_and_insn_locators.diff
Type: application/octet-stream
Size: 122977 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120607/1777452f/attachment.obj>


More information about the Gcc-patches mailing list