blob: 256514c8c22d6ec9df23127be6d70eba24b766e7 [file] [log] [blame]
Dale Johannesenb842d522009-02-05 01:49:45 +00001//===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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 Johannesenb842d522009-02-05 01:49:45 +00006//
7//===----------------------------------------------------------------------===//
8//
9// This file implements the TargetIntrinsicInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#include "llvm/Target/TargetIntrinsicInfo.h"
Jakob Stoklund Olesen923b5aa2009-10-15 18:49:26 +000014#include "llvm/ADT/StringMap.h"
Chandler Carruth9fb823b2013-01-02 11:36:10 +000015#include "llvm/IR/Function.h"
Dale Johannesenb842d522009-02-05 01:49:45 +000016using namespace llvm;
17
Jakob Stoklund Olesen923b5aa2009-10-15 18:49:26 +000018TargetIntrinsicInfo::TargetIntrinsicInfo() {
Dale Johannesenb842d522009-02-05 01:49:45 +000019}
20
21TargetIntrinsicInfo::~TargetIntrinsicInfo() {
22}
Jakob Stoklund Olesen923b5aa2009-10-15 18:49:26 +000023
Tim Northover5fb414d2016-07-29 22:32:36 +000024unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
Jakob Stoklund Olesen923b5aa2009-10-15 18:49:26 +000025 const ValueName *ValName = F->getValueName();
26 if (!ValName)
27 return 0;
28 return lookupName(ValName->getKeyData(), ValName->getKeyLength());
29}