LLVM  14.0.0git
MCInstrAnalysis.cpp
Go to the documentation of this file.
1 //===- MCInstrAnalysis.cpp - InstrDesc target hooks -----------------------===//
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 
10 
11 #include "llvm/ADT/APInt.h"
12 #include "llvm/MC/MCInst.h"
13 #include "llvm/MC/MCInstrDesc.h"
14 #include "llvm/MC/MCInstrInfo.h"
15 #include <cstdint>
16 
17 using namespace llvm;
18 
20  const MCInst &Inst,
21  APInt &Writes) const {
22  Writes.clearAllBits();
23  return false;
24 }
25 
26 bool MCInstrAnalysis::evaluateBranch(const MCInst & /*Inst*/, uint64_t /*Addr*/,
27  uint64_t /*Size*/,
28  uint64_t & /*Target*/) const {
29  return false;
30 }
31 
33  const MCInst &Inst, const MCSubtargetInfo *STI, uint64_t Addr,
34  uint64_t Size) const {
35  return None;
36 }
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::APInt::clearAllBits
void clearAllBits()
Set every bit to 0.
Definition: APInt.h:1335
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
MCInstrDesc.h
llvm::MCInstrAnalysis::clearsSuperRegisters
virtual bool clearsSuperRegisters(const MCRegisterInfo &MRI, const MCInst &Inst, APInt &Writes) const
Returns true if at least one of the register writes performed by.
Definition: MCInstrAnalysis.cpp:19
APInt.h
llvm::Optional< uint64_t >
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
MCInstrInfo.h
MCInst.h
llvm::MCInstrAnalysis::evaluateMemoryOperandAddress
virtual Optional< uint64_t > evaluateMemoryOperandAddress(const MCInst &Inst, const MCSubtargetInfo *STI, uint64_t Addr, uint64_t Size) const
Given an instruction tries to get the address of a memory operand.
Definition: MCInstrAnalysis.cpp:32
llvm::None
const NoneType None
Definition: None.h:23
llvm::MCInstrAnalysis::evaluateBranch
virtual bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size, uint64_t &Target) const
Given a branch instruction try to get the address the branch targets.
Definition: MCInstrAnalysis.cpp:26
uint64_t
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:80
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
MCInstrAnalysis.h
llvm::MCRegisterInfo
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Definition: MCRegisterInfo.h:135
MRI
unsigned const MachineRegisterInfo * MRI
Definition: AArch64AdvSIMDScalarPass.cpp:105
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:75