LLVM  9.0.0svn
TargetIntrinsicInfo.cpp
Go to the documentation of this file.
1 //===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements the TargetIntrinsicInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "llvm/ADT/StringMap.h"
15 #include "llvm/IR/Function.h"
16 using namespace llvm;
17 
19 }
20 
22 }
23 
25  const ValueName *ValName = F->getValueName();
26  if (!ValName)
27  return 0;
28  return lookupName(ValName->getKeyData(), ValName->getKeyLength());
29 }
This class represents lattice values for constants.
Definition: AllocatorList.h:23
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition: StringMap.h:125
F(f)
virtual unsigned lookupName(const char *Name, unsigned Len) const =0
Look up target intrinsic by name.
ValueName * getValueName() const
Definition: Value.cpp:186
virtual unsigned getIntrinsicID(const Function *F) const
Return the target intrinsic ID of a function, or 0.
size_t getKeyLength() const
Definition: StringMap.h:44
const char * getKeyData() const
getKeyData - Return the start of the string data that is the key for this value.
Definition: StringMap.h:148