Changes in directory llvm/include/llvm:
InstrTypes.h updated: 1.46 -> 1.47 Instructions.h updated: 1.38 -> 1.39 --- Log message: Add ShiftInst::isLogical/ArithmeticShift methods. --- Diffs of the changes: (+17 -7) InstrTypes.h | 12 ++++++------ Instructions.h | 12 +++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) Index: llvm/include/llvm/InstrTypes.h diff -u llvm/include/llvm/InstrTypes.h:1.46 llvm/include/llvm/InstrTypes.h:1.47 --- llvm/include/llvm/InstrTypes.h:1.46 Wed Jun 21 11:53:47 2006 +++ llvm/include/llvm/InstrTypes.h Sun Sep 17 14:29:56 2006 @@ -207,16 +207,16 @@ /// isNeg, isNot - Check if the given Value is a NEG or NOT instruction. /// - static bool isNeg(const Value *V); - static bool isNot(const Value *V); + static bool isNeg(const Value *V); + static bool isNot(const Value *V); /// getNegArgument, getNotArgument - Helper functions to extract the /// unary argument of a NEG or NOT operation implemented via Sub or Xor. /// - static const Value* getNegArgument(const Value *BinOp); - static Value* getNegArgument( Value *BinOp); - static const Value* getNotArgument(const Value *BinOp); - static Value* getNotArgument( Value *BinOp); + static const Value *getNegArgument(const Value *BinOp); + static Value *getNegArgument( Value *BinOp); + static const Value *getNotArgument(const Value *BinOp); + static Value *getNotArgument( Value *BinOp); BinaryOps getOpcode() const { return static_cast<BinaryOps>(Instruction::getOpcode()); Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.38 llvm/include/llvm/Instructions.h:1.39 --- llvm/include/llvm/Instructions.h:1.38 Sun Sep 17 14:14:47 2006 +++ llvm/include/llvm/Instructions.h Sun Sep 17 14:29:56 2006 @@ -16,7 +16,6 @@ #ifndef LLVM_INSTRUCTIONS_H #define LLVM_INSTRUCTIONS_H -#include "llvm/Instruction.h" #include "llvm/InstrTypes.h" namespace llvm { @@ -633,6 +632,17 @@ } unsigned getNumOperands() const { return 2; } + /// isLogicalShift - Return true if this is a logical shift left or a logical + /// shift right. + bool isLogicalShift() const; + + /// isArithmeticShift - Return true if this is a sign-extending shift right + /// operation. + bool isArithmeticShift() const { + return !isLogicalShift(); + } + + virtual ShiftInst *clone() const; // Methods for support type inquiry through isa, cast, and dyn_cast: _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits