> -----Original Message----- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On > Behalf Of Bin Cheng > Sent: Monday, October 29, 2012 2:59 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH GCC]Improving register pressure directed hoist > > Hi, > This patch improves register pressure directed hoist by accurately monitoring > the change of register pressure during code hoisting and use this information > to feedback further code hoisting. To know how register pressure is affected > when hoisting an expression(x+y) through a basic block, the patch checks: > 1. whether x/y is live at the end of the basic block, the live range can't be > shrunk if yes. The live information at the IN/OUT of basic blocks have to be > updated manually by the patch, since these information won't be updated until > next call to function df_analyze. > 2. whether x/y is referred by any other instructions in the basic block, the > live range can't be shrunk if yes. This is done by iterating all references of > x/y by using DF cached information and checking whether any reference is made > in this basic block. > > Since GCC calls should_hoist_expr_to_dom to determine whether an expression > should be hoisted, this patch saves/restores/updates LIVE and register > pressure information before/after the call by introducing back-trace utility. > > Though additional computation is introduced by this patch, I bootstrapped > x86 with patch enabled and see no obvious slow down in compilation time. > > With this patch, the effect on CSiBE of option "-fira-hoist-pressure" is > improved as below: > improvement > Thumb1 0.22%(0.13% before this patch) > ARM 0.16%(0.12% before) > MIPS 0.25%(0.24% before) > PowerPC 0.62% > Thumb2 X > x86 X > x86_64 X > Note: Though X means no obvious effect on code size, this patch does improve > it a little bit on these targets. > > I bootstrapped this patch on x86/x86_64, and tested it on x86/x86_64/arm-none- > eabi. Is it OK? >
Sorry I have to withdraw this patch because I made a mistake in update_bb_reg_pressure function. I also have another patch to improve hoist pass and will send these two patch for further review. Thanks.