X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FIR%2FIntrinsicInst.h;h=169bcc021984f57cba154f85f67a633f202397d7;hb=a5be9e3cfba9cc841f37881a60bf5337aac5a704;hp=102cbef3b680a8d4677b9d77c99f55862bca003f;hpb=cf0db29df20d9c665da7e82bb261bdd7cf7f1b2b;p=oota-llvm.git diff --git a/include/llvm/IR/IntrinsicInst.h b/include/llvm/IR/IntrinsicInst.h index 102cbef3b68..169bcc02198 100644 --- a/include/llvm/IR/IntrinsicInst.h +++ b/include/llvm/IR/IntrinsicInst.h @@ -372,6 +372,39 @@ namespace llvm { return cast(const_cast(getArgOperand(3))); } }; + + /// This represents the llvm.instrprof_value_profile intrinsic. + class InstrProfValueProfileInst : public IntrinsicInst { + public: + static inline bool classof(const IntrinsicInst *I) { + return I->getIntrinsicID() == Intrinsic::instrprof_value_profile; + } + static inline bool classof(const Value *V) { + return isa(V) && classof(cast(V)); + } + + GlobalVariable *getName() const { + return cast( + const_cast(getArgOperand(0))->stripPointerCasts()); + } + + ConstantInt *getHash() const { + return cast(const_cast(getArgOperand(1))); + } + + Value *getTargetValue() const { + return cast(const_cast(getArgOperand(2))); + } + + ConstantInt *getValueKind() const { + return cast(const_cast(getArgOperand(3))); + } + + // Returns the value site index. + ConstantInt *getIndex() const { + return cast(const_cast(getArgOperand(4))); + } + }; } // namespace llvm #endif