This is the mail archive of the gcc-patches@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] |
Hi,
1. Splits. m68k backend is the eldest in gcc. It employs several techniques that are now considered obsolete, one of such things, that makes scheduling impossible, is using C code to emit best asm statement for a given rtl insn. This patch converts the most frequently used (on CFv2) patterns to use constraints and alternatives instead of falling back to C.
m68k should really use even more splits, e.g. output_move_double in its current form should go away completely. Most of these moves should already splitted before reload, reload might generate a few more, but these are relatively simple to split later, so that at the point of assembly output none of them are left. IMO this change could be done independently of the attribute changes.
2. Attributes. In order to facilitate pipeline model with information about instructions, several instruction attributes were added. Due to genattrtab limitations not all attributes are written in lisp-like language, but rather in C. Attributes can be optimized later, when the whole set of them is stable (that is after adding scheduling support for other processors).
Could you please explain the op_type attributes a little? It looks a little more complex then necessary to me. In general m68k instructions are rather simple in this regard. Most instructions have only a single memory operand, which is either a read-only or read-write operand. The only really relevant exception is the move instruction, which can have two memory operands, which are read-only or write-only. (There are other exceptions like "subx.l -(%a0),-(%a1)", but I couldn't find any which gcc really uses right now.) This means in many cases you duplicate information, which is already part of the instruction pattern.
annotate the exceptions and I'd try as much possible by analyzing the instruction patterns first (this way the whole annotation also hasn't to be repeated for other cpu's).
I think that names like OP_TYPE_MEM1 are not a good a choice, after a month I had to look these up again to know what they mean.
type classification should be done by m68k_decompose_address, as it's useful for other things too (e.g. instruction cost),
little more detail (e.g. brief or full extension word for mode 6).
What are your long term plans with the split attribute? IMO at some point it should become superfluous, but then we may have to remove a lot of "done" attributes. Here I'd also think it would be better to only annotate the exceptions, it might be possible to do a basic classifiction already be looking at the output pattern, e.g. if calls a C function or uses ";" it may need more splitting.
-- Maxim
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |