[LLVMdev] The live interval of write-only registers

Andrew Lenharth alenhar2 at uiuc.edu
Tue Dec 13 07:31:24 PST 2005


On Mon, 2005-12-12 at 23:24, Tzu-Chien Chiu wrote:
> 2005/12/13, Chris Lattner <sabre at nondot.org>:
> > > For example, this a code snippet for the file generated by the TableGen tool:
> > ...
> > > Somewhere in my code, I have to write:
> > >  unsigned opcode = MI->getOpcode(); // MachineInstr*
> > >  if (CMPfaaaa == opcode ||
> > >      CMPfaaar == opcode ||
> > >      CMPfaara == opcode ||
> > >      ...
> >
> > Where do you have to write this code?
> >
> > -Chris
> 
> Some machine idioms and instruction combining passes.

You might consider a target specific flag on those instructions:

let isSpecial = 1 in {
instr defs
...
}

Andrew




More information about the llvm-dev mailing list