On 01/09/2017 07:38 PM, David Malcolm wrote:
The backend is full of singleton state, so we have to compile
__RTL-functions as soon as we parse them. This means that the
C frontend needs to invoke the backed.
This patch adds the support needed.
Normally this would be a no-no, and including rtl headers is
blocked by this within system.h:
/* Front ends should never have to include middle-end headers. Enforce
this by poisoning the header double-include protection defines. */
#ifdef IN_GCC_FRONTEND
#pragma GCC poison GCC_RTL_H GCC_EXCEPT_H GCC_EXPR_H
#endif
Hence the patch puts the decl into a new header (run-rtl-passes.h)
that's accessible to the C frontend without exposing any RTL
internals. (If adding a header for just this decl is overkill, is
there a better place to put the decl?)
gcc/ChangeLog:
* Makefile.in (OBJS): Add run-rtl-passes.o.
* pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
accessor.
(gcc::pass_manager::get_clean_slate): New accessor.
* run-rtl-passes.c: New file.
* run-rtl-passes.h: New file.
It feels like this is dependent upon something that I haven't seen?!?
Where is get_rest_of_compilation used? Where is pass_clean_state_1?
jeff