23 class MachineRegisterInfo;
24 class MachineBasicBlock;
40 bool has(
unsigned Reg)
const;
48 bool has(
unsigned Reg)
const;
49 const RegisterCell &
lookup(
unsigned Reg)
const;
50 RegisterCell
get(RegisterRef RR)
const;
51 void put(RegisterRef RR,
const RegisterCell &RC);
52 void subst(RegisterRef OldRR, RegisterRef NewRR);
59 void visitUsesOf(
unsigned Reg);
62 typedef std::pair<int,int> CFGEdge;
63 typedef std::set<CFGEdge> EdgeSetType;
64 typedef std::set<const MachineInstr *> InstrSetType;
65 typedef std::queue<CFGEdge> EdgeQueueType;
68 InstrSetType InstrExec;
72 const MachineEvaluator &ME;
162 bool is(
unsigned T)
const {
163 assert(T == 0 || T == 1);
165 : (T == 1 ?
Type ==
One :
false);
244 BitMask(uint16_t b, uint16_t e) : B(b), E(e) {}
245 uint16_t
first()
const {
return B; }
246 uint16_t
last()
const {
return E; }
260 assert(BitN <
Bits.size());
264 assert(BitN <
Bits.size());
274 uint16_t cl(
bool B)
const;
275 uint16_t ct(
bool B)
const;
299 static const unsigned DefaultBitN = 32;
308 return Map.find(Reg) != Map.end();
314 CellMapType::const_iterator
F = Map.find(Reg);
315 assert(F != Map.end());
323 for (uint16_t i = 0; i < Width; ++i)
332 for (uint16_t i = 0; i < Width; ++i)
340 uint16_t W = C.
width();
342 for (
unsigned i = 0; i < W; ++i)
349 return find(Reg) !=
end();
361 uint16_t getRegBitWidth(
const RegisterRef &RR)
const;
428 virtual BitMask mask(
unsigned Reg,
unsigned Sub)
const;
RegisterRef(unsigned R=0, unsigned S=0)
const_iterator end(StringRef path)
Get end iterator over path.
RegisterCell getRef(const RegisterRef &RR, const CellMapType &M) const
MachineEvaluator(const TargetRegisterInfo &T, MachineRegisterInfo &M)
const TargetRegisterInfo & TRI
BitValue(ValueType T=Top)
void trace(bool On=false)
BitValue(unsigned Reg, uint16_t Pos)
static RegisterCell top(uint16_t Width)
static RegisterCell self(unsigned Reg, uint16_t Width)
const BitValue & operator[](uint16_t BitN) const
const RegisterCell & operator=(const RegisterCell &RC)
Reg
All possible values of the reg field in the ModR/M byte.
BitValue & operator[](uint16_t BitN)
bool is(unsigned T) const
BitRef(unsigned R=0, uint16_t P=0)
BitMask(uint16_t b, uint16_t e)
Control flow instructions. These all have token chains.
The instances of the Type class are immutable: once they are created, they are never changed...
virtual ~MachineEvaluator()
void subst(RegisterRef OldRR, RegisterRef NewRR)
bool has(unsigned Reg) const
bool operator==(const BitRef &BR) const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
SetVector< const MachineBasicBlock * > BranchTargetList
bool operator!=(const BitValue &V) const
BitValue(const BitValue &V)
const RegisterCell & lookup(unsigned Reg) const
This is the shared class of boolean and integer constants.
static BitValue self(const BitRef &Self=BitRef())
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo & MRI
static unsigned getReg(const void *D, unsigned RC, unsigned RegNo)
bool operator==(const BitValue &V) const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
bool has(unsigned Reg) const
bool operator!=(uint64_t V1, const APInt &V2)
Representation of each machine instruction.
virtual bool track(const TargetRegisterClass *RC) const
BitTracker(const MachineEvaluator &E, MachineFunction &F)
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
bool reached(const MachineBasicBlock *B) const
RegisterRef(const MachineOperand &MO)
RegisterCell(uint16_t Width=DefaultBitN)
friend raw_ostream & operator<<(raw_ostream &OS, const BitValue &BV)
A vector that has set insertion semantics.
void put(RegisterRef RR, const RegisterCell &RC)
This class implements an extremely fast bulk output stream that can only output to a stream...
bool isInt(int64_t x)
isInt - Checks if an integer fits into the given bit width.
bool operator==(uint64_t V1, const APInt &V2)
static RegisterCell ref(const RegisterCell &C)
bool meet(const BitValue &V, const BitRef &Self)
static BitValue ref(const BitValue &V)