This is the mail archive of the 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] support to flip modes in sh mode-switching

In, you wrote:
> Reminder: This patch adds support in the mode-switching pass to switch modes
instead of setting them. That implies that we need to track for every basic
blocks that need a mode setting (see EMIT_MODE_SET) the mode values of the
incoming edges when 'avin' is set. When 'avin' is not set a regular mode
setting sequence must be emitted.

No, please read the PR more carefully.
The normal case is that for every edge that needs a mode setting, we track
if avout of the source block is set.
avin is only interesting for exception handler blocks.

> The improvements for this new patch came after I realized that I didn't have
to carry any mode information on edges.

That is nonsense.  multiple incoming edges can have different available modes.
That can actually be expected to happen relatively frequently for the edges
going into the first BB of a loop.
If you use the avout from the edge sources, you can optimize these loops;
if you ignore modes on edges, you can't.

> LCL guaranties that a mode will never been reset to the same value it was in
avin (why would it do that if the value is available ?). Furthermore, mode
values are exclusives. I've added a assertion to check this.

exception handlers have to hide their anticipatable mode to LCM, thus you have
to expect this to happen.

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