[llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h

Chris Lattner clattner at apple.com
Thu May 24 12:20:16 PDT 2007


> Add a couple of target hooks for predication.
>
> +  /// isPredicable - Returns true if the instruction is already  
> predicated.
> +  ///
> +  virtual bool isPredicated(MachineInstr *MI) const {

Should take const MachineInstr*

> +    return false;
> +  }
> +
>    /// PredicateInstruction - Convert the instruction into a  
> predicated
>    /// instruction. It returns true if the operation was successful.
>    virtual bool PredicateInstruction(MachineInstr *MI,
> +                                    std::vector<MachineOperand>  
> &Pred) const;

Pred should be const.

> +
> +  /// SubsumesPredicate - Returns true if the first specified  
> predicated
> +  /// subsumes the second, e.g. GE subsumes GT.
> +  virtual bool SubsumesPredicate(std::vector<MachineOperand> &Pred1,
> +                                 std::vector<MachineOperand>  
> &Pred2) const {
> +    return false;
> +  }

Pred1/Pred2 should be const.

-Chris



More information about the llvm-commits mailing list