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]

in/out operands and auto-inc-dec


The internals manual in its description of the "matching constraint" says that it works for cases where the in and out operands are somewhat different, such as *p++ vs. *p.  Obviously that is meant to cover post_inc side effects.

The curious thing is that auto-inc-dec.c specifically avoids doing this: if it finds what looks like a suitable candidate for auto-inc or auto-dec optimization but that operand occurs more than once in the insn, it doesn't make the change.  The result is code that's both larger and slower for machines that have post_inc etc. addressing modes.  The gccint documentation suggests that it was the intent to optimize this case, so I wonder why it is avoided.

	paul


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