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] |
Hello, This is a first stab at making the core CFG code independent of the expression intermediate representation datatypes. This patch deals with cfg.c and cfganal.c but it shouldn't be a surprise that the patch touches a lot of other files. I removed all IR headers (tree.h and rtl.h) from function.h and basic-block.h, and that caused some fall-out left and right. Who would have expected that ira-conflicts.c depends on tree.h?! Or that cfg.c did not include basic-block.h directly, but only inherited from cfgloop.h? There were also a couple of places where an RTL pass was ported to GIMPLE but still used RTL CFG dump functions. The only bit I'm not very happy with, is the set_loop_copy/get_loop_copy change. I did not want cfg.c to be dependent on cfgloop.h ony for struct loop, but I also did not want to duplicate the original_table machinery from cfg.c, or export it from there. This was the least ugly solution I could come up with. Looking back at the change now, I wonder whether I can use a pointer-set instead and move set_loop_copy and get_loop_copy to cfgloopmanip.c. Otherwise, I think this shows the direction I'm trying to take things. My plan for the CFG code is to end up with one common CFG header and a cfgrtl.h and tree-cfg.h. It is unfortunate that this involves moving a lot of functions from one file to another, but that is IMHO an inevitable cost of trying for a more towards a more modular build-up of the compiler. Bootstrapped and tested on powerpc64-unknown-linux-gnu. I have a bug somewhere in the profiling code that gives a bunch of test suite failures, but I'm looking for comments/suggestions/... already, so that I don't do too much useless work :-) (Without IBM's gcc110 donation, I would not have been able to do all this work!) Ciao! Steven
Attachment:
modularize_cfg.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |