28#ifndef LLVM_CODEGEN_DETECTDEADLANES_H
29#define LLVM_CODEGEN_DETECTDEADLANES_H
60 return VRegInfos[RegIdx];
64 return DefinedByCopy.test(RegIdx);
105 void PutInWorklist(
unsigned RegIdx) {
106 if (WorklistMembers.
test(RegIdx))
108 WorklistMembers.
set(RegIdx);
109 Worklist.push_back(RegIdx);
112 std::unique_ptr<VRegInfo[]> VRegInfos;
114 std::deque<unsigned> Worklist;
115 BitVector WorklistMembers;
118 BitVector DefinedByCopy;
This file implements the BitVector class.
A common definition of LaneBitmask for use in TableGen and CodeGen.
Register const TargetRegisterInfo * TRI
bool test(unsigned Idx) const
Returns true if bit Idx is set.
BitVector & set()
Set all bits in the bitvector.
LLVM_ABI LaneBitmask transferUsedLanes(const MachineInstr &MI, LaneBitmask UsedLanes, const MachineOperand &MO) const
Given a mask UsedLanes used from the output of instruction MI determine which lanes are used from ope...
LLVM_ABI DeadLaneDetector(const MachineRegisterInfo *MRI, const TargetRegisterInfo *TRI)
bool isDefinedByCopy(unsigned RegIdx) const
LLVM_ABI LaneBitmask transferDefinedLanes(const MachineOperand &Def, unsigned OpNum, LaneBitmask DefinedLanes) const
Given a mask DefinedLanes of lanes defined at operand OpNum of COPY-like instruction,...
LLVM_ABI void computeSubRegisterLaneBitInfo()
Update the DefinedLanes and the UsedLanes for all virtual registers.
const VRegInfo & getVRegInfo(unsigned RegIdx) const
LLVM_ABI PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
A set of analyses that are preserved following a run of a transformation pass.
Wrapper class representing virtual and physical registers.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
A Use represents the edge between a Value definition and its users.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
Contains a bitmask of which lanes of a given virtual register are defined and which ones are actually...
A CRTP mix-in for passes that should not be skipped.