LLVM  15.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 <cstdint>
13 
14 namespace llvm {
15 class MCSubtargetInfo;
16 }
17 
18 using namespace llvm;
19 
21  const MCInst &Inst,
22  APInt &Writes) const {
23  Writes.clearAllBits();
24  return false;
25 }
26 
27 bool MCInstrAnalysis::evaluateBranch(const MCInst & /*Inst*/, uint64_t /*Addr*/,
28  uint64_t /*Size*/,
29  uint64_t & /*Target*/) const {
30  return false;
31 }
32 
34  const MCInst &Inst, const MCSubtargetInfo *STI, uint64_t Addr,
35  uint64_t Size) const {
36  return None;
37 }
38 
41  uint64_t Size) const {
42  return None;
43 }
llvm::Check::Size
@ Size
Definition: FileCheck.h:76
llvm::APInt::clearAllBits
void clearAllBits()
Set every bit to 0.
Definition: APInt.h:1359
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCInstrAnalysis::getMemoryOperandRelocationOffset
virtual Optional< uint64_t > getMemoryOperandRelocationOffset(const MCInst &Inst, uint64_t Size) const
Given an instruction with a memory operand that could require relocation, returns the offset within t...
Definition: MCInstrAnalysis.cpp:40
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:20
APInt.h
llvm::Optional< uint64_t >
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
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:33
llvm::None
const NoneType None
Definition: None.h:24
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:27
uint64_t
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:78
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:76