2009-02-05 09:49:45 +08:00
|
|
|
//===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08: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-02-05 09:49:45 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the TargetIntrinsicInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetIntrinsicInfo.h"
|
2009-10-16 02:49:26 +08:00
|
|
|
#include "llvm/ADT/StringMap.h"
|
2013-01-02 19:36:10 +08:00
|
|
|
#include "llvm/IR/Function.h"
|
2009-02-05 09:49:45 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2009-10-16 02:49:26 +08:00
|
|
|
TargetIntrinsicInfo::TargetIntrinsicInfo() {
|
2009-02-05 09:49:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
TargetIntrinsicInfo::~TargetIntrinsicInfo() {
|
|
|
|
}
|
2009-10-16 02:49:26 +08:00
|
|
|
|
2016-07-30 06:32:36 +08:00
|
|
|
unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
|
2009-10-16 02:49:26 +08:00
|
|
|
const ValueName *ValName = F->getValueName();
|
|
|
|
if (!ValName)
|
|
|
|
return 0;
|
|
|
|
return lookupName(ValName->getKeyData(), ValName->getKeyLength());
|
|
|
|
}
|