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]

Re: PATCH: Properly check the end of basic block


> On Thu, Nov 18, 2010 at 8:43 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> > On Thu, Nov 18, 2010 at 8:37 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> >>>> ix86_pad_returns forgot to update BB_END when it
> >>>> replaces it with a new one. OK for trunk?
> >>>
> >>> IMO, ?you should just move the call to vzeroupper optimization to be
> >>> the first thing in ix86_reorg. This way, ix86_pad_short_function,
> >>> ix86_pad_returns and ix86_avoid_jump_mispredict will also count
> >>> emitted vzeroupper.
> >>
> >> But it will leave bad BB_END in place. ?Any uses of BB_END later
> >> will still be screwed.
> >
> > I think that Jan or Richard (CC'd) can provide better answer on this issue.
> 
> Got it.
> 
> It is a pass ordering problem, we free CFG before machine reorg pass,
> so BLOCK_FOR_INSN in machine reorg pass does not work anymore (it
> returns 0).

If the question was why machine reorg runs after cfg freeing, the reason is
that all the machine reorgs except for Itanium one (at least last time I looked)
were not aware of CFG.  I never felt like getting all of them updated as it is bit
tricky (they do ugly stuff like inserting constant pool right into code that has CFG
representation issues)

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]