Hello, Any feedback for this ? I'd like to commit only when OK for Epiphany.
many thanks, Christian On 05/26/2014 05:32 PM, Christian Bruel wrote: >> On 04/28/2014 10:08 AM, Christian Bruel wrote: >>>>>> Hello, >>>>>> >>>>>> I'd like to ping the following patches >>>>>> >>>>>> [Hookize mode-switching] >>>>>> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01003.html >>>>>> >>>>>> [Add new hooks to support toggle and SH4A fpchg instruction] >>>>>> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01005.html >>> Sorry, I only saw the first part and thought I' d need to wait till I >>> see the second part - and I somehow missed that. >>> >>> I think the previous known mode should be passed to the >>> TARGET_MODE_EMIT hook - no need to have extra hooks >>> for toggling, and, as I mentioned earlier, fixating on the toggle is >>> actually an SH artifact - other ports have multi-way >>> modes settings that can benefit from knowing the previous mode. >> OK I'll change the bool toggle parameter by the previous mode in >> TARGET_MODE_EMIT and remove the bool XOR hooks in the SH description. >> > Hello, > > This is the interface for targets that could use the previous mode for > switching. TARGET_MODE_EMIT now takes a new prev_mode parameter. If the > previous mode cannot be determined, MODE_NONE (value depends on the > entity) is used. > > The implementation is less trivial than just supporting a boolean toggle > bit, as the previous modes information have to be carried along the > edges. For this I recycle the auxiliary edge field that is made > unnecessary by the removal of make_pred_opaque and a change in the > implementation to call LCM for every modes from every identity > simultaneously. This idea was suggested by Joern in PR29349. Another > speed improvement is that we process the modes to no_mode instead of > max_num_modes for each entity. > Thanks to all this, the only additional data to support prev_mode is > that for each BB, the avin/avout lcm computation are cached inside the > bb_info mode_in/mode_out fields, the xor toggle bit handling could > have been removed. > > bootstrapped/regtested for x86 and sh4, sh4a, sh4a-single, > epiphany build is OK. testsuite not ran. > > Joern, is this new target macro interface OK with you ? Jeff, (or other > RTL maintainer) since this is a new implementation for > optimize_mode_switching I suppose your previous approval doesn't held > anymore... is this new one OK for trunk as well ? > No change for x86/sh4/2a interfaces. > > Many thanks > > Christian > >