Skip to content

[Target] Use llvm::append_range (NFC) #135568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3980,7 +3980,7 @@ bool AArch64FrameLowering::assignCalleeSavedSpillSlots(
}

if (!InsertBeforeLR)
CSI.insert(CSI.end(), VGSaves.begin(), VGSaves.end());
llvm::append_range(CSI, VGSaves);
}

Register LastReg = 0;
Expand Down
7 changes: 3 additions & 4 deletions llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4055,8 +4055,7 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI,
}

if (IsChainCallConv)
Ops.insert(Ops.end(), ChainCallSpecialArgs.begin(),
ChainCallSpecialArgs.end());
llvm::append_range(Ops, ChainCallSpecialArgs);

// Add argument registers to the end of the list so that they are known live
// into the call.
Expand Down Expand Up @@ -15526,9 +15525,9 @@ SDNode *SITargetLowering::adjustWritemask(MachineSDNode *&Node,

// Adjust the writemask in the node
SmallVector<SDValue, 12> Ops;
Ops.insert(Ops.end(), Node->op_begin(), Node->op_begin() + DmaskIdx);
llvm::append_range(Ops, Node->ops().take_front(DmaskIdx));
Ops.push_back(DAG.getTargetConstant(NewDmask, SDLoc(Node), MVT::i32));
Ops.insert(Ops.end(), Node->op_begin() + DmaskIdx + 1, Node->op_end());
llvm::append_range(Ops, Node->ops().drop_front(DmaskIdx + 1));

MVT SVT = Node->getValueType(0).getVectorElementType().getSimpleVT();

Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifndef LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMUNWINDOPASM_H
#define LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMUNWINDOPASM_H

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include <cstddef>
#include <cstdint>
Expand Down Expand Up @@ -60,7 +61,7 @@ class UnwindOpcodeAssembler {

/// Emit unwind raw opcodes
void EmitRaw(const SmallVectorImpl<uint8_t> &Opcodes) {
Ops.insert(Ops.end(), Opcodes.begin(), Opcodes.end());
llvm::append_range(Ops, Opcodes);
OpBegins.push_back(OpBegins.back() + Opcodes.size());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void WebAssemblyAsmTypeCheck::funcDecl(const wasm::WasmSignature &Sig) {

void WebAssemblyAsmTypeCheck::localDecl(
const SmallVectorImpl<wasm::ValType> &Locals) {
LocalTypes.insert(LocalTypes.end(), Locals.begin(), Locals.end());
llvm::append_range(LocalTypes, Locals);
}

void WebAssemblyAsmTypeCheck::dumpTypeStack(Twine Msg) {
Expand Down Expand Up @@ -357,8 +357,7 @@ bool WebAssemblyAsmTypeCheck::checkTryTable(SMLoc ErrorLoc,
Opcode == wasm::WASM_OPCODE_CATCH_REF) {
if (!getSignature(ErrorLoc, Inst.getOperand(OpIdx++),
wasm::WASM_SYMBOL_TYPE_TAG, Sig))
SentTypes.insert(SentTypes.end(), Sig->Params.begin(),
Sig->Params.end());
llvm::append_range(SentTypes, Sig->Params);
else
Error = true;
}
Expand Down
Loading