diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-10-15 18:49:26 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-10-15 18:49:26 +0000 |
commit | 0383606b657aa9770e6aee126b358afe9328ac4a (patch) | |
tree | 3125c0200a2c8e9c1015355851cd6d7615167502 /include/llvm/Target/TargetIntrinsicInfo.h | |
parent | 20312d0bb8e06c6881010d54f857b6d482994470 (diff) | |
download | llvm-0383606b657aa9770e6aee126b358afe9328ac4a.tar.gz llvm-0383606b657aa9770e6aee126b358afe9328ac4a.tar.bz2 llvm-0383606b657aa9770e6aee126b358afe9328ac4a.tar.xz |
Clean up TargetIntrinsicInfo API. Add pure virtual methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetIntrinsicInfo.h')
-rw-r--r-- | include/llvm/Target/TargetIntrinsicInfo.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/include/llvm/Target/TargetIntrinsicInfo.h b/include/llvm/Target/TargetIntrinsicInfo.h index c14275f52a..d70aa7e9fd 100644 --- a/include/llvm/Target/TargetIntrinsicInfo.h +++ b/include/llvm/Target/TargetIntrinsicInfo.h @@ -25,35 +25,21 @@ class Type; /// TargetIntrinsicInfo - Interface to description of machine instruction set /// class TargetIntrinsicInfo { - - const char **Intrinsics; // Raw array to allow static init'n - unsigned NumIntrinsics; // Number of entries in the desc array - - TargetIntrinsicInfo(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT - void operator=(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT + TargetIntrinsicInfo(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT + void operator=(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT public: - TargetIntrinsicInfo(const char **desc, unsigned num); + TargetIntrinsicInfo(); virtual ~TargetIntrinsicInfo(); - unsigned getNumIntrinsics() const { return NumIntrinsics; } - - virtual Function *getDeclaration(Module *M, const char *BuiltinName) const { - return 0; - } - - // Returns the Function declaration for intrinsic BuiltinName. If the - // intrinsic can be overloaded, uses Tys to return the correct function. - virtual Function *getDeclaration(Module *M, const char *BuiltinName, - const Type **Tys, unsigned numTys) const { - return 0; - } + /// Return the name of a target intrinsic, e.g. "llvm.bfin.ssync". + virtual const char *getName(unsigned IntrID) const =0; - // Returns true if the Builtin can be overloaded. - virtual bool isOverloaded(Module *M, const char *BuiltinName) const { - return false; - } + /// Look up target intrinsic by name. Return intrinsic ID or 0 for unknown + /// names. + virtual unsigned lookupName(const char *Name, unsigned Len) const =0; - virtual unsigned getIntrinsicID(Function *F) const { return 0; } + /// Return the target intrinsic ID of a function, or 0. + virtual unsigned getIntrinsicID(Function *F) const; }; } // End llvm namespace |