16 #ifndef LLVM_MCA_SOURCEMGR_H 17 #define LLVM_MCA_SOURCEMGR_H 26 typedef std::pair<unsigned, const Instruction &>
SourceRef;
29 using UniqueInst = std::unique_ptr<Instruction>;
32 const unsigned Iterations;
33 static const unsigned DefaultIterations = 100;
37 : Sequence(S), Current(0), Iterations(Iter ? Iter : DefaultIterations) {}
40 unsigned size()
const {
return Sequence.
size(); }
41 bool hasNext()
const {
return Current < (Iterations * Sequence.
size()); }
46 return SourceRef(Current, *Sequence[Current % Sequence.
size()]);
57 #endif // LLVM_MCA_SOURCEMGR_H An instruction propagated through the simulated instruction pipeline.
This class represents lattice values for constants.
const_iterator end() const
size_t size() const
size - Get the array size.
SourceRef peekNext() const
ArrayRef< UniqueInst >::const_iterator const_iterator
std::pair< unsigned, const Instruction & > SourceRef
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getNumIterations() const
SourceMgr(ArrayRef< UniqueInst > S, unsigned Iter)
const_iterator begin() const