2009-06-02 13:52:33 -04:00
|
|
|
//===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
|
|
|
|
|
//
|
2019-08-20 16:50:12 -04:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2009-06-02 13:52:33 -04:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
//
|
|
|
|
|
// This file implements the TargetIntrinsicInfo class.
|
|
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetIntrinsicInfo.h"
|
2009-10-23 10:19:52 -04:00
|
|
|
#include "llvm/ADT/StringMap.h"
|
2013-04-08 14:41:23 -04:00
|
|
|
#include "llvm/IR/Function.h"
|
2009-06-02 13:52:33 -04:00
|
|
|
using namespace llvm;
|
|
|
|
|
|
2009-10-23 10:19:52 -04:00
|
|
|
TargetIntrinsicInfo::TargetIntrinsicInfo() {
|
2009-06-02 13:52:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TargetIntrinsicInfo::~TargetIntrinsicInfo() {
|
|
|
|
|
}
|
2009-10-23 10:19:52 -04:00
|
|
|
|
2017-01-02 14:17:04 -05:00
|
|
|
unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
|
2009-10-23 10:19:52 -04:00
|
|
|
const ValueName *ValName = F->getValueName();
|
|
|
|
|
if (!ValName)
|
|
|
|
|
return 0;
|
|
|
|
|
return lookupName(ValName->getKeyData(), ValName->getKeyLength());
|
|
|
|
|
}
|