#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
#include "llvm/CodeGen/GlobalISel/Utils.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Module.h"
#include "llvm/Target/TargetMachine.h"
#define DEBUG_TYPE …
usingnamespacellvm;
char llvm::GISelKnownBitsAnalysis::ID = …;
INITIALIZE_PASS(…)
GISelKnownBits::GISelKnownBits(MachineFunction &MF, unsigned MaxDepth)
: … { … }
Align GISelKnownBits::computeKnownAlignment(Register R, unsigned Depth) { … }
KnownBits GISelKnownBits::getKnownBits(MachineInstr &MI) { … }
KnownBits GISelKnownBits::getKnownBits(Register R) { … }
KnownBits GISelKnownBits::getKnownBits(Register R, const APInt &DemandedElts,
unsigned Depth) { … }
bool GISelKnownBits::signBitIsZero(Register R) { … }
APInt GISelKnownBits::getKnownZeroes(Register R) { … }
APInt GISelKnownBits::getKnownOnes(Register R) { … }
LLVM_ATTRIBUTE_UNUSED static void
dumpResult(const MachineInstr &MI, const KnownBits &Known, unsigned Depth) { … }
void GISelKnownBits::computeKnownBitsMin(Register Src0, Register Src1,
KnownBits &Known,
const APInt &DemandedElts,
unsigned Depth) { … }
static KnownBits extractBits(unsigned BitWidth, const KnownBits &SrcOpKnown,
const KnownBits &OffsetKnown,
const KnownBits &WidthKnown) { … }
void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
const APInt &DemandedElts,
unsigned Depth) { … }
unsigned GISelKnownBits::computeNumSignBitsMin(Register Src0, Register Src1,
const APInt &DemandedElts,
unsigned Depth) { … }
static unsigned computeNumSignBitsFromRangeMetadata(const GAnyLoad *Ld,
unsigned TyBits) { … }
unsigned GISelKnownBits::computeNumSignBits(Register R,
const APInt &DemandedElts,
unsigned Depth) { … }
unsigned GISelKnownBits::computeNumSignBits(Register R, unsigned Depth) { … }
void GISelKnownBitsAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { … }
bool GISelKnownBitsAnalysis::runOnMachineFunction(MachineFunction &MF) { … }
GISelKnownBits &GISelKnownBitsAnalysis::get(MachineFunction &MF) { … }