Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 1 | //===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file implements the TargetIntrinsicInfo class. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #include "llvm/Target/TargetIntrinsicInfo.h" |
Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 14 | #include "llvm/ADT/StringMap.h" |
Chandler Carruth | 9fb823b | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 15 | #include "llvm/IR/Function.h" |
Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 16 | using namespace llvm; |
| 17 | |
Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 18 | TargetIntrinsicInfo::TargetIntrinsicInfo() { |
Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | TargetIntrinsicInfo::~TargetIntrinsicInfo() { |
| 22 | } |
Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 23 | |
Tim Northover | 5fb414d | 2016-07-29 22:32:36 +0000 | [diff] [blame] | 24 | unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const { |
Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 25 | const ValueName *ValName = F->getValueName(); |
| 26 | if (!ValName) |
| 27 | return 0; |
| 28 | return lookupName(ValName->getKeyData(), ValName->getKeyLength()); |
| 29 | } |