LLVM
22.0.0git
lib
MC
MCInstrInfo.cpp
Go to the documentation of this file.
1
//===- lib/MC/MCInstrInfo.cpp - Target Instruction Info -------------------===//
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
#include "
llvm/MC/MCInstrInfo.h
"
10
#include "
llvm/MC/MCInst.h
"
11
#include "
llvm/MC/MCSubtargetInfo.h
"
12
13
using namespace
llvm
;
14
15
bool
MCInstrInfo::getDeprecatedInfo
(
MCInst
&
MI
,
const
MCSubtargetInfo
&STI,
16
std::string &Info)
const
{
17
unsigned
Opcode =
MI
.getOpcode();
18
if
(ComplexDeprecationInfos && ComplexDeprecationInfos[Opcode])
19
return
ComplexDeprecationInfos[Opcode](
MI
, STI, Info);
20
if
(DeprecatedFeatures && DeprecatedFeatures[Opcode] !=
uint8_t
(-1U) &&
21
STI.
getFeatureBits
()[DeprecatedFeatures[Opcode]]) {
22
// FIXME: it would be nice to include the subtarget feature here.
23
Info =
"deprecated"
;
24
return
true
;
25
}
26
return
false
;
27
}
MI
IRTranslator LLVM IR MI
Definition
IRTranslator.cpp:110
MCInst.h
MCInstrInfo.h
MCSubtargetInfo.h
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition
MCInst.h:188
llvm::MCInstrInfo::getDeprecatedInfo
LLVM_ABI bool getDeprecatedInfo(MCInst &MI, const MCSubtargetInfo &STI, std::string &Info) const
Returns true if a certain instruction is deprecated and if so returns the reason in Info.
Definition
MCInstrInfo.cpp:15
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition
MCSubtargetInfo.h:77
llvm::MCSubtargetInfo::getFeatureBits
const FeatureBitset & getFeatureBits() const
Definition
MCSubtargetInfo.h:115
uint8_t
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0