class GISelKnownBits

Declaration

class GISelKnownBits : public GISelChangeObserver { /* full declaration omitted */ };

Description

Abstract class that contains various methods for clients to notify about changes. This should be the preferred way for APIs to notify changes. Typically calling erasingInstr/createdInstr multiple times should not affect the result. The observer would likely need to check if it was already notified earlier (consider using GISelWorkList).

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:29

Inherits from: GISelChangeObserver

Method Overview

Inherited from GISelChangeObserver:

Methods

GISelKnownBits(llvm::MachineFunction& MF)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:36

Parameters

llvm::MachineFunction& MF

void changedInstr(llvm::MachineInstr& MI)

Description

This instruction was mutated in some way.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:82

Parameters

llvm::MachineInstr& MI

void changingInstr(llvm::MachineInstr& MI)

Description

This instruction is about to be mutated in some way.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:81

Parameters

llvm::MachineInstr& MI

static void computeKnownBitsForAlignment(
    llvm::KnownBits& Known,
    llvm::MaybeAlign Alignment)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:72

Parameters

llvm::KnownBits& Known
llvm::MaybeAlign Alignment

void computeKnownBitsForFrameIndex(
    llvm::Register R,
    llvm::KnownBits& Known,
    const llvm::APInt& DemandedElts,
    unsigned int Depth = 0)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:67

Parameters

llvm::Register R
llvm::KnownBits& Known
const llvm::APInt& DemandedElts
unsigned int Depth = 0

virtual void computeKnownBitsImpl(
    llvm::Register R,
    llvm::KnownBits& Known,
    const llvm::APInt& DemandedElts,
    unsigned int Depth = 0)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:39

Parameters

llvm::Register R
llvm::KnownBits& Known
const llvm::APInt& DemandedElts
unsigned int Depth = 0

unsigned int computeNumSignBits(
    llvm::Register R,
    const llvm::APInt& DemandedElts,
    unsigned int Depth = 0)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:43

Parameters

llvm::Register R
const llvm::APInt& DemandedElts
unsigned int Depth = 0

unsigned int computeNumSignBits(
    llvm::Register R,
    unsigned int Depth = 0)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:45

Parameters

llvm::Register R
unsigned int Depth = 0

void createdInstr(llvm::MachineInstr& MI)

Description

An instruction has been created and inserted into the function. Note that the instruction might not be a fully fledged instruction at this point and won't be if the MachineFunction::Delegate is calling it. This is because the delegate only sees the construction of the MachineInstr before operands have been added.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:80

Parameters

llvm::MachineInstr& MI

void erasingInstr(llvm::MachineInstr& MI)

Description

An instruction is about to be erased.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:79

Parameters

llvm::MachineInstr& MI

llvm::KnownBits getKnownBits(llvm::Register R)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:48

Parameters

llvm::Register R

llvm::KnownBits getKnownBits(
    llvm::MachineInstr& MI)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:50

Parameters

llvm::MachineInstr& MI

llvm::APInt getKnownOnes(llvm::Register R)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:52

Parameters

llvm::Register R

llvm::APInt getKnownZeroes(llvm::Register R)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:51

Parameters

llvm::Register R

unsigned int getMaxDepth() const

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:85

static llvm::Align inferAlignmentForFrameIdx(
    int FrameIdx,
    int Offset,
    const llvm::MachineFunction& MF)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:70

Parameters

int FrameIdx
int Offset
const llvm::MachineFunction& MF

static llvm::MaybeAlign inferPtrAlignment(
    const llvm::MachineInstr& MI)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:76

Parameters

const llvm::MachineInstr& MI

bool maskedValueIsZero(llvm::Register Val,
                       const llvm::APInt& Mask)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:57

Parameters

llvm::Register Val
const llvm::APInt& Mask

Returns

true if 'V & Mask' is known to be zero in DemandedElts. We use this predicate to simplify operations downstream. Mask is known to be zero for bits that V cannot have.

void setMF(llvm::MachineFunction& MF)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:38

Parameters

llvm::MachineFunction& MF

bool signBitIsZero(llvm::Register Op)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:63

Parameters

llvm::Register Op

Returns

true if the sign bit of Op is known to be zero. We use this predicate to simplify operations downstream.

virtual ~GISelKnownBits()

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h:37