#include "HexagonBlockRanges.h"
#include "HexagonInstrInfo.h"
#include "HexagonSubtarget.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
#include <map>
#include <utility>
usingnamespacellvm;
#define DEBUG_TYPE …
bool HexagonBlockRanges::IndexRange::overlaps(const IndexRange &A) const { … }
bool HexagonBlockRanges::IndexRange::contains(const IndexRange &A) const { … }
void HexagonBlockRanges::IndexRange::merge(const IndexRange &A) { … }
void HexagonBlockRanges::RangeList::include(const RangeList &RL) { … }
void HexagonBlockRanges::RangeList::unionize(bool MergeAdjacent) { … }
void HexagonBlockRanges::RangeList::addsub(const IndexRange &A,
const IndexRange &B) { … }
void HexagonBlockRanges::RangeList::subtract(const IndexRange &Range) { … }
HexagonBlockRanges::InstrIndexMap::InstrIndexMap(MachineBasicBlock &B)
: … { … }
MachineInstr *HexagonBlockRanges::InstrIndexMap::getInstr(IndexType Idx) const { … }
HexagonBlockRanges::IndexType HexagonBlockRanges::InstrIndexMap::getIndex(
MachineInstr *MI) const { … }
HexagonBlockRanges::IndexType HexagonBlockRanges::InstrIndexMap::getPrevIndex(
IndexType Idx) const { … }
HexagonBlockRanges::IndexType HexagonBlockRanges::InstrIndexMap::getNextIndex(
IndexType Idx) const { … }
void HexagonBlockRanges::InstrIndexMap::replaceInstr(MachineInstr *OldMI,
MachineInstr *NewMI) { … }
HexagonBlockRanges::HexagonBlockRanges(MachineFunction &mf)
: … { … }
HexagonBlockRanges::RegisterSet HexagonBlockRanges::getLiveIns(
const MachineBasicBlock &B, const MachineRegisterInfo &MRI,
const TargetRegisterInfo &TRI) { … }
HexagonBlockRanges::RegisterSet HexagonBlockRanges::expandToSubRegs(
RegisterRef R, const MachineRegisterInfo &MRI,
const TargetRegisterInfo &TRI) { … }
void HexagonBlockRanges::computeInitialLiveRanges(InstrIndexMap &IndexMap,
RegToRangeMap &LiveMap) { … }
HexagonBlockRanges::RegToRangeMap HexagonBlockRanges::computeLiveMap(
InstrIndexMap &IndexMap) { … }
HexagonBlockRanges::RegToRangeMap HexagonBlockRanges::computeDeadMap(
InstrIndexMap &IndexMap, RegToRangeMap &LiveMap) { … }
raw_ostream &llvm::operator<<(raw_ostream &OS,
HexagonBlockRanges::IndexType Idx) { … }
raw_ostream &llvm::operator<<(raw_ostream &OS,
const HexagonBlockRanges::IndexRange &IR) { … }
raw_ostream &llvm::operator<<(raw_ostream &OS,
const HexagonBlockRanges::RangeList &RL) { … }
raw_ostream &llvm::operator<<(raw_ostream &OS,
const HexagonBlockRanges::InstrIndexMap &M) { … }
raw_ostream &llvm::operator<<(raw_ostream &OS,
const HexagonBlockRanges::PrintRangeMap &P) { … }