This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/70023] [4.9/5/6 Regression] ICE: in assign_by_spills, at lra-assigns.c:1417 with -fno-sched-critical-path-heuristic -fschedule-insns -m8bit-idiv


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70023

UroÅ Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ysrumyan at gmail dot com

--- Comment #4 from UroÅ Bizjak <ubizjak at gmail dot com> ---
(In reply to Jeffrey A. Law from comment #3)
> In the past we've not supported the first instruction scheduling pass on the
> x86 because of the problems with extension of hard register lifetimes.
> 
> Is that still the case?  If so, what's the mechanism by which that happens
> these days (I didn't see if with some quick scanning).

The target-dependent scheduling fixups are based on work by Yuri Rumyantsev
(CCd) from 2012, e.g.:

2012-10-04  Yuri Rumyantsev  <ysrumyan@gmail.com>

        * config/i386/i386.c (ix86_dep_by_shift_count_body) : Add
        check on reload_completed since it can be invoked before
        register allocation phase in pre-reload schedule.
        (ia32_multipass_dfa_lookahead) : Do not use dfa_lookahead for
        pre-reload schedule to save compile time.
        (ix86_sched_reorder) : Do not perform ready list reordering for
        pre-reload schedule to save compile time.
        (insn_is_function_arg) : New function. Returns true if lhs of insn is
        HW function argument register.
        (add_parameter_dependencies) : New function. Add output dependencies
        for chain of function adjacent arguments if only there is a move to
        likely spilled HW registers. Return first argument if at least one
        dependence was added or NULL otherwise.
        (avoid_func_arg_motion) : New function. Add output or anti dependency
        from insn to first_arg to restrict code motion.
        (add_dependee_for_func_arg) : New function. Avoid cross block motion of
        function argument through adding dependency from the first non-jump
        insn in bb.
        (ix86_dependencies_evaluation_hook) : New function. Hook for
        pre-reload schedule: avoid motion of function arguments passed in
        likely spilled HW registers.
        (ix86_adjust_priority) : New function. Hook for pre-reload schedule:
        set priority of moves from likely spilled HW registers to maximum to
        schedule them as soon as possible.
        (ix86_sched_init_global): Do not perform multipass scheduling for
        pre-reload schedule to save compile time.

which introduced several scheduling helpers that try to rearrange insns to
decrease probability of running into spill failures. While these fixups and
some later RA significantly reduced spill failures, there are still some cases
(like the one in this PR), where allocation fails with severely constrainted
instructions.

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