Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions llvm/include/llvm/ADT/BitVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,7 @@ class BitVector {
set_unused_bits(false);
}

void init_words(bool t) {
std::fill(Bits.begin(), Bits.end(), 0 - (BitWord)t);
}
void init_words(bool t) { llvm::fill(Bits, 0 - (BitWord)t); }

template<bool AddBits, bool InvertMask>
void applyMask(const uint32_t *Mask, unsigned MaskWords) {
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/MachineLICM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ bool MachineLICMImpl::run(MachineFunction &MF) {
// Estimate register pressure during pre-regalloc pass.
unsigned NumRPS = TRI->getNumRegPressureSets();
RegPressure.resize(NumRPS);
std::fill(RegPressure.begin(), RegPressure.end(), 0);
llvm::fill(RegPressure, 0);
RegLimit.resize(NumRPS);
for (unsigned i = 0, e = NumRPS; i != e; ++i)
RegLimit[i] = TRI->getRegPressureSetLimit(MF, i);
Expand Down Expand Up @@ -941,7 +941,7 @@ static bool isOperandKill(const MachineOperand &MO, MachineRegisterInfo *MRI) {
/// initialize the starting "register pressure". Note this does not count live
/// through (livein but not used) registers.
void MachineLICMImpl::InitRegPressure(MachineBasicBlock *BB) {
std::fill(RegPressure.begin(), RegPressure.end(), 0);
llvm::fill(RegPressure, 0);

// If the preheader has only a single predecessor and it ends with a
// fallthrough or an unconditional branch, then scan its predecessor for live
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ ResourcePriorityQueue::ResourcePriorityQueue(SelectionDAGISel *IS)
unsigned NumRC = TRI->getNumRegClasses();
RegLimit.resize(NumRC);
RegPressure.resize(NumRC);
std::fill(RegLimit.begin(), RegLimit.end(), 0);
std::fill(RegPressure.begin(), RegPressure.end(), 0);
llvm::fill(RegLimit, 0);
llvm::fill(RegPressure, 0);
for (const TargetRegisterClass *RC : TRI->regclasses())
RegLimit[RC->getID()] = TRI->getRegPressureLimit(RC, *IS->MF);

Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1769,8 +1769,8 @@ class RegReductionPQBase : public SchedulingPriorityQueue {
unsigned NumRC = TRI->getNumRegClasses();
RegLimit.resize(NumRC);
RegPressure.resize(NumRC);
std::fill(RegLimit.begin(), RegLimit.end(), 0);
std::fill(RegPressure.begin(), RegPressure.end(), 0);
llvm::fill(RegLimit, 0);
llvm::fill(RegPressure, 0);
for (const TargetRegisterClass *RC : TRI->regclasses())
RegLimit[RC->getID()] = tri->getRegPressureLimit(RC, MF);
}
Expand All @@ -1793,7 +1793,7 @@ class RegReductionPQBase : public SchedulingPriorityQueue {
void releaseState() override {
SUnits = nullptr;
SethiUllmanNumbers.clear();
std::fill(RegPressure.begin(), RegPressure.end(), 0);
llvm::fill(RegPressure, 0);
}

unsigned getNodePriority(const SUnit *SU) const;
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1457,8 +1457,8 @@ void SelectionDAG::clear() {
TargetExternalSymbols.clear();
MCSymbols.clear();
SDEI.clear();
std::fill(CondCodeNodes.begin(), CondCodeNodes.end(), nullptr);
std::fill(ValueTypeNodes.begin(), ValueTypeNodes.end(), nullptr);
llvm::fill(CondCodeNodes, nullptr);
llvm::fill(ValueTypeNodes, nullptr);

EntryNode.UseList = nullptr;
InsertNode(&EntryNode);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,7 @@ class LowerMatrixIntrinsics {
llvm::copy(C.vectors(), std::back_inserter(CondV));
} else {
CondV.resize(A.getNumVectors());
std::fill(CondV.begin(), CondV.end(), Cond);
llvm::fill(CondV, Cond);
}

for (auto [CV, AV, BV] : llvm::zip_equal(CondV, A.vectors(), B.vectors()))
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/LoopUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ Value *llvm::getShuffleReduction(IRBuilderBase &Builder, Value *Src,
SmallVector<int, 32> ShuffleMask(VF);
for (unsigned stride = 1; stride < VF; stride <<= 1) {
// Initialise the mask with undef.
std::fill(ShuffleMask.begin(), ShuffleMask.end(), -1);
llvm::fill(ShuffleMask, -1);
for (unsigned j = 0; j < VF; j += stride << 1) {
ShuffleMask[j] = j + stride;
}
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5443,7 +5443,7 @@ BoUpSLP::findReusedOrderedScalars(const BoUpSLP::TreeEntry &TE,
MutableArrayRef<unsigned> Slice = CurrentOrder.slice(I * PartSz, Limit);
// Shuffle of at least 2 vectors - ignore.
if (any_of(Slice, [&](unsigned I) { return I != NumScalars; })) {
std::fill(Slice.begin(), Slice.end(), NumScalars);
llvm::fill(Slice, NumScalars);
ShuffledSubMasks.set(I);
continue;
}
Expand Down Expand Up @@ -5471,7 +5471,7 @@ BoUpSLP::findReusedOrderedScalars(const BoUpSLP::TreeEntry &TE,
FirstMin = (FirstMin / PartSz) * PartSz;
// Shuffle of at least 2 vectors - ignore.
if (SecondVecFound) {
std::fill(Slice.begin(), Slice.end(), NumScalars);
llvm::fill(Slice, NumScalars);
ShuffledSubMasks.set(I);
continue;
}
Expand All @@ -5492,7 +5492,7 @@ BoUpSLP::findReusedOrderedScalars(const BoUpSLP::TreeEntry &TE,
}
// Shuffle of at least 2 vectors - ignore.
if (SecondVecFound) {
std::fill(Slice.begin(), Slice.end(), NumScalars);
llvm::fill(Slice, NumScalars);
ShuffledSubMasks.set(I);
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-mca/Views/RegisterFileStatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ RegisterFileStatistics::RegisterFileStatistics(const MCSubtargetInfo &sti)
unsigned NumRegFiles = std::max(PI.NumRegisterFiles, 1U);

PRFUsage.resize(NumRegFiles);
std::fill(PRFUsage.begin(), PRFUsage.end(), RFUEmpty);
llvm::fill(PRFUsage, RFUEmpty);

MoveElimInfo.resize(NumRegFiles);
std::fill(MoveElimInfo.begin(), MoveElimInfo.end(), MEIEmpty);
llvm::fill(MoveElimInfo, MEIEmpty);
}

void RegisterFileStatistics::updateRegisterFileUsage(
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/llvm-mca/Views/TimelineView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ TimelineView::TimelineView(const MCSubtargetInfo &sti, MCInstPrinter &Printer,
NumInstructions *= Iterations;
Timeline.resize(NumInstructions);
TimelineViewEntry InvalidTVEntry = {-1, 0, 0, 0, 0};
std::fill(Timeline.begin(), Timeline.end(), InvalidTVEntry);
llvm::fill(Timeline, InvalidTVEntry);

WaitTimeEntry NullWTEntry = {0, 0, 0};
std::fill(WaitTime.begin(), WaitTime.end(), NullWTEntry);
llvm::fill(WaitTime, NullWTEntry);

std::pair<unsigned, int> NullUsedBufferEntry = {/* Invalid resource ID*/ 0,
/* unknown buffer size */ -1};
std::fill(UsedBuffer.begin(), UsedBuffer.end(), NullUsedBufferEntry);
llvm::fill(UsedBuffer, NullUsedBufferEntry);
}

void TimelineView::onReservedBuffers(const InstRef &IR,
Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ TreePatternNodePtr TreePatternNode::clone() const {
/// RemoveAllTypes - Recursively strip all the types of this tree.
void TreePatternNode::RemoveAllTypes() {
// Reset to unknown type.
std::fill(Types.begin(), Types.end(), TypeSetByHwMode());
llvm::fill(Types, TypeSetByHwMode());
if (isLeaf())
return;
for (TreePatternNode &Child : children())
Expand Down
Loading