LLVM
10.0.0
lib
Target
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
13
#include "
llvm/Target/TargetIntrinsicInfo.h
"
14
#include "
llvm/ADT/StringMap.h
"
15
#include "
llvm/IR/Function.h
"
16
using namespace
llvm
;
17
18
TargetIntrinsicInfo::TargetIntrinsicInfo
() {
19
}
20
21
TargetIntrinsicInfo::~TargetIntrinsicInfo
() {
22
}
23
24
unsigned
TargetIntrinsicInfo::getIntrinsicID
(
const
Function
*
F
)
const
{
25
const
ValueName
*ValName = F->
getValueName
();
26
if
(!ValName)
27
return
0;
28
return
lookupName
(ValName->
getKeyData
(), ValName->
getKeyLength
());
29
}
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:23
llvm::StringMapEntry
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition:
StringMap.h:158
F
F(f)
llvm::Function
Definition:
Function.h:59
llvm::TargetIntrinsicInfo::lookupName
virtual unsigned lookupName(const char *Name, unsigned Len) const =0
Look up target intrinsic by name.
llvm::TargetIntrinsicInfo::TargetIntrinsicInfo
TargetIntrinsicInfo()
Definition:
TargetIntrinsicInfo.cpp:18
llvm::TargetIntrinsicInfo::~TargetIntrinsicInfo
virtual ~TargetIntrinsicInfo()
Definition:
TargetIntrinsicInfo.cpp:21
StringMap.h
llvm::Value::getValueName
ValueName * getValueName() const
Definition:
Value.cpp:187
Function.h
llvm::TargetIntrinsicInfo::getIntrinsicID
virtual unsigned getIntrinsicID(const Function *F) const
Return the target intrinsic ID of a function, or 0.
Definition:
TargetIntrinsicInfo.cpp:24
llvm::StringMapEntryBase::getKeyLength
size_t getKeyLength() const
Definition:
StringMap.h:44
llvm::StringMapEntry::getKeyData
const char * getKeyData() const
getKeyData - Return the start of the string data that is the key for this value.
Definition:
StringMap.h:169
TargetIntrinsicInfo.h
Generated on Tue Mar 24 2020 13:12:51 for LLVM by
1.8.13