scale.backend.sparc
Class AnnulMarker

java.lang.Object
  extended by scale.backend.Instruction
      extended by scale.backend.Marker
          extended by scale.backend.sparc.AnnulMarker
All Implemented Interfaces:
java.lang.Cloneable

public class AnnulMarker
extends Marker

This class marks the effective position of an annulled instruction.

$Id: AnnulMarker.java,v 1.9 2005-03-24 13:56:52 burrill Exp $

Copyright 2005 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

An annulled instruction acts as if it is part of the true edge of a branch instruction. For analysis purposes, it must seem to exist on that edge. For example,

   sdivcc %l0,%l1,%l2
   bvs,a  .l1
   sethi  %hi(0x80000000),%l2
 .l1:
 
is equivalent to
   sdivcc %l0,%l1,%l2
   bvs,a  .l1
   nop
   ba  .l0
 .l1:
   sethi  %hi(0x80000000),%l2
 .l0:
 
In this example, the definition of register %l2 by the sethi must occur on one edge only or the definition of %l2 by the sdivcc instruction is not seen as needed and the sdivcc instruction will be removed by the register allocation pass.


Constructor Summary
AnnulMarker(SparcInstruction annulled)
           
 
Method Summary
 void assembler(Assembler asm, Emit emit)
          Insert the assembler representation of the instruction into the output stream.
 void specifyRegisterUsage(RegisterAllocator rs, int index, int strength)
          Specify the registers used by this instruction.
 java.lang.String toString()
           
 
Methods inherited from class scale.backend.Marker
getExecutionCycles, getOpcode, independent, instructionSize, isMarker, nullify, remapDestRegister, remapRegisters, remapSrcRegister
 
Methods inherited from class scale.backend.Instruction
canBeDeleted, clone, copy, defs, ehash, getBBID, getCopyDest, getCopySrc, getDestRegister, getFunctionalUnit, getLoopNumber, getNext, getPredicate, getPredicates, getSrcRegisters, getTag, isBranch, isCopy, isLabel, isLoad, isMandatory, isPhi, isPredicated, isPredicatedOnTrue, isPrefetch, isSpillInstruction, isSpillLoadPoint, isSpillStorePoint, isStore, markSpillInstruction, mods, nullified, numPredicates, removePredicates, setBBID, setLoopNumber, setMandatory, setNext, setPredicate, setPredicate, setPredicatedOnTrue, setPredicates, setsSpecialReg, setTag, specifyNotSpillLoadPoint, specifySpillStorePoint, uses
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnulMarker

public AnnulMarker(SparcInstruction annulled)
Method Detail

specifyRegisterUsage

public void specifyRegisterUsage(RegisterAllocator rs,
                                 int index,
                                 int strength)
Specify the registers used by this instruction.

Overrides:
specifyRegisterUsage in class Marker
Parameters:
rs - is the register set in use
index - is an index associated with the instruction
strength - is the importance of the instruction
See Also:
RegisterAllocator.useRegister(int,int,int), RegisterAllocator.defRegister(int,int)

assembler

public void assembler(Assembler asm,
                      Emit emit)
Description copied from class: Marker
Insert the assembler representation of the instruction into the output stream.

Overrides:
assembler in class Marker

toString

public java.lang.String toString()
Overrides:
toString in class Marker