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 patch allows targets to keep the CFG around until after final, by skipping pass_free_cfg and CFG-destructive passes like dbr_schedule, and by making insn splitting before 'final' use split_all_insns instead of split_all_insns_noflow if pass_free_cfg was skipped. Most machine reorg passes also are not able to maintain the CFG, so I've split the machine_reorg hook into separate CFG-aware and CFG-unaware versions, renaming the existing hook (to signal that maintaining the CFG is desirable in new ports ;-). For the moment, only ix86 uses the CFG-aware version of the hook, but there are a handful of targets that can be converted to do this also (ia64, bfin, c6x, sparc, probably others). Other ports can change to the CFG-aware machine reorg pass and keep part of the current, non CFG-aware reorg pass for the second hook (mips). Some ports have CFG-aware machine-reorg passes but verify_flow_info fails after the machine-reorg pass because the port emits insns between basic blocks, e.g. for const pools. What's missing is a way for verify_flow_info to be tolerant of such non-insns but I'm not sure yet what the best approach for this will be (possibilities I've considered so far are: allow bare UNSPECV insns between basic blocks after machine-reorg; put a flag on such non-insns; maintain a bitmap of uids for non-insns; ...). I hope that maintainers will over time change their machine reorgs to maintain the CFG, so that passes like pass_dwarf2_frame can use the CFG instead of creating "a facsimile of one on the fly" (see dwarf2cfi.c). Bootstrapped&tested on x86_64-unknown-linux-gnu (unix{,-m32}). OK for trunk? Ciao! Steven
Attachment:
late_cfg.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |