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: regclass.c: scan_one_insn special casing


> For those very few cases that are machine-specific.
> 

There are tons of things that go through define_split now. You should
look at a few ports as examples:

[echristo@dzur sh]$ grep define_insn sh.md | wc -l
    413
[echristo@dzur sh]$ grep define_split sh.md | wc -l
     56

[echristo@dzur mips]$ grep define_split mips.md | wc -l
     60
[echristo@dzur mips]$ grep define_insn mips.md | wc -l
    366

>     There's just something wrong with special casing all over the compiler
>     just for a small case that could/should be handled somewhere else.
> 
> But I feel that this case should be handled right where ti is and that's
> the best place to put it.
> 

I know, you put it in there in 92. I won't ask why - I don't even want
to try to think of things I did 11 years ago :)

> How is it better to put this in a define_split in each port?

So that you aren't penalizing every call to scan_one_insn with this code
that is almost never called. (I'll say almost never even though I've not
tripped it with 4 ports and all of check-gcc). It also hurts
maintainability - scatter 100 or so of these cases through the compiler
and it looks like spaghetti.

-eric

-- 
Eric Christopher <echristo@redhat.com>


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