This is the mail archive of the gcc@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: Generate annotations for a binary translator


> >> Different targets use the machine reorg pass for all sorts of different
> >> things.  Most of the code in reorg.c is actually not the machine reorg
> >> pass, it is the delay slots pass (pass_delay_slots).  The machine reorg
> >> pass (pass_machine_reorg) simply calls targetm.machine_dependent_reorg,
> >> which is what a backend (in config/*) calls
> >> TARGET_MACHINE_DEPENDENT_REORG.
> >
> >   Which means if config/arch does NOT define TARGET_MACHINE_DEPENDENT_REORG
> > , then pass_machine_reorg does NOTHING for that arch. Am I right?
> 
> Correct.

  I am looking into config/arch which defines TARGET_MACHINE_DEPENDENT_REORG and
trying to figure out what kind of operations might change the CFG.

  Take the function ix86_reorg in config/i386/i386.c as an example.

1. Functions like ix86_pad_short_function, ix86_pad_returns and ix86_avoid_jump_mispredicts
   add padding, i.e., nop instruction.

2. Function move_or_delete_vzeroupper move or delete vzeroupper in different cases.

  I think above operations only modify basic blocks in the CFG but NOT the edges between
basic blocks. And the CFG should be the same in this case, right? Although I am not 100%
sure if they do exactly what the comments say. ;-)

Regards,
chenwj

-- 
Wei-Ren Chen (ééä)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667


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