Skip to content

Commit

Permalink
Fix one or two clang-format things
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorse committed Jan 27, 2025
1 parent 8bafca7 commit a589eb1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ SplitBlockAndInsertSimpleForLoop(Value *End, BasicBlock::iterator SplitBefore);
/// IRBuilder whose insert point is correctly set for instantiating the
/// given index, and a value which is (at runtime) the index to access.
/// This index *may* be a constant.
void SplitBlockAndInsertForEachLane(ElementCount EC, Type *IndexTy,
BasicBlock::iterator InsertBefore,
std::function<void(IRBuilderBase&, Value*)> Func);
void SplitBlockAndInsertForEachLane(
ElementCount EC, Type *IndexTy, BasicBlock::iterator InsertBefore,
std::function<void(IRBuilderBase &, Value *)> Func);

/// Utility function for performing a given action on each lane of a vector
/// with \p EVL effective length. EVL is assumed > 0. To simplify porting legacy
Expand Down
6 changes: 4 additions & 2 deletions llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ class AlignVectors {
MoveList createLoadGroups(const AddrList &Group) const;
MoveList createStoreGroups(const AddrList &Group) const;
bool moveTogether(MoveGroup &Move) const;
template <typename T> InstMap cloneBefore(BasicBlock::iterator To, T &&Insts) const;
template <typename T>
InstMap cloneBefore(BasicBlock::iterator To, T &&Insts) const;

void realignLoadGroup(IRBuilderBase &Builder, const ByteSpan &VSpan,
int ScLen, Value *AlignVal, Value *AlignAddr) const;
Expand Down Expand Up @@ -1076,7 +1077,8 @@ auto AlignVectors::moveTogether(MoveGroup &Move) const -> bool {
}

template <typename T>
auto AlignVectors::cloneBefore(BasicBlock::iterator To, T &&Insts) const -> InstMap {
auto AlignVectors::cloneBefore(BasicBlock::iterator To, T &&Insts) const
-> InstMap {
InstMap Map;

for (Instruction *I : Insts) {
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Coroutines/CoroSplit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,8 @@ static bool hasCallsBetween(Instruction *Save, Instruction *ResumeOrDestroy) {
return true;

// Any calls from begging of the block up to ResumeOrDestroy?
if (hasCallsInBlockBetween({ResumeOrDestroyBB->getFirstNonPHIIt(),
ResumeOrDestroyIt}))
if (hasCallsInBlockBetween(
{ResumeOrDestroyBB->getFirstNonPHIIt(), ResumeOrDestroyIt}))
return true;

// Any calls in all of the blocks between SaveBB and ResumeOrDestroyBB?
Expand Down
11 changes: 6 additions & 5 deletions llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1728,8 +1728,9 @@ void llvm::SplitBlockAndInsertIfThenElse(
}
}

std::pair<Instruction*, Value*>
llvm::SplitBlockAndInsertSimpleForLoop(Value *End, BasicBlock::iterator SplitBefore) {
std::pair<Instruction *, Value *>
llvm::SplitBlockAndInsertSimpleForLoop(Value *End,
BasicBlock::iterator SplitBefore) {
BasicBlock *LoopPred = SplitBefore->getParent();
BasicBlock *LoopBody = SplitBlock(SplitBefore->getParent(), SplitBefore);
BasicBlock *LoopExit = SplitBlock(SplitBefore->getParent(), SplitBefore);
Expand All @@ -1755,9 +1756,9 @@ llvm::SplitBlockAndInsertSimpleForLoop(Value *End, BasicBlock::iterator SplitBef
return std::make_pair(&*LoopBody->getFirstNonPHIIt(), IV);
}

void llvm::SplitBlockAndInsertForEachLane(ElementCount EC,
Type *IndexTy, BasicBlock::iterator InsertBefore,
std::function<void(IRBuilderBase&, Value*)> Func) {
void llvm::SplitBlockAndInsertForEachLane(
ElementCount EC, Type *IndexTy, BasicBlock::iterator InsertBefore,
std::function<void(IRBuilderBase &, Value *)> Func) {

IRBuilder<> IRB(InsertBefore->getParent(), InsertBefore);

Expand Down

0 comments on commit a589eb1

Please sign in to comment.