TargetIntrinsicInfo.h revision 198396
1//===-- llvm/Target/TargetIntrinsicInfo.h - Instruction Info ----*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the target intrinsic instructions to the code generator.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGET_TARGETINTRINSICINFO_H
15#define LLVM_TARGET_TARGETINTRINSICINFO_H
16
17namespace llvm {
18
19class Function;
20class Module;
21class Type;
22
23//---------------------------------------------------------------------------
24///
25/// TargetIntrinsicInfo - Interface to description of machine instruction set
26///
27class TargetIntrinsicInfo {
28  TargetIntrinsicInfo(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT
29  void operator=(const TargetIntrinsicInfo &);      // DO NOT IMPLEMENT
30public:
31  TargetIntrinsicInfo();
32  virtual ~TargetIntrinsicInfo();
33
34  /// Return the name of a target intrinsic, e.g. "llvm.bfin.ssync".
35  virtual const char *getName(unsigned IntrID) const =0;
36
37  /// Look up target intrinsic by name. Return intrinsic ID or 0 for unknown
38  /// names.
39  virtual unsigned lookupName(const char *Name, unsigned Len) const =0;
40
41  /// Return the target intrinsic ID of a function, or 0.
42  virtual unsigned getIntrinsicID(Function *F) const;
43};
44
45} // End llvm namespace
46
47#endif
48