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: Flagging rtx instructions


If you wanted an attribute that was associated with each instruction pattern, you could use
the insn attributes. But that doesn't associate a flag with a specific instruction, but instead with ALL
instructions that exactly match the pattern.

For what I think you are trying to do, you could grab an unused bit from the struct rtx_def. There appears to be one unused right now. This of course will prevent your port from being accepted by the FSF unless you can make an awfully convincing case that this is generally useful...

But I suspect that the better thing to do would be to add a new NOTES enumeration in the enum insn_note (see rtl.h). Then you could tag the last instruction with the NOTE and use the notes querying routines to see if the instruction is tagged. [They'll also get printed out by the RTL debugging code for free....]


At 5:51 PM +0100 6/20/02, Dan Towner wrote:

Hi all,

I am writing a port to a VLIW processor. I've got the compiler to
schedule the instructions using the new DFA scheduler, but now I want to
output the assembly for the instructions. To do this, I want to flag
whether a particular instruction is the last in its VLIW group. What is
the easiest way to `tag' an instruction with a true/false value in one
part of the compiler, and check that tag in another part? For example:

in the scheduler

  tagInstruction(insn, true);

in the assembler output (e.g., final_prescan).

  if (hasTag(insn)) doSomething;
  else doOtherTHing;



Thanks,

 Dan.

=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589

--
		    Quality Software Management
		http://home.earthlink.net/~qsmgmt
		          apl@alum.mit.edu
		          (978)287-0435 Voice
		          (978)808-6836 Cell

	Software Process Improvement / Management Consulting
	     Language Design / Compiler Implementation


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