Skip to content

Commit f1ba4bb

Browse files
[Target] Use llvm::append_range (NFC) (llvm#135568)
1 parent dc5178c commit f1ba4bb

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3980,7 +3980,7 @@ bool AArch64FrameLowering::assignCalleeSavedSpillSlots(
39803980
}
39813981

39823982
if (!InsertBeforeLR)
3983-
CSI.insert(CSI.end(), VGSaves.begin(), VGSaves.end());
3983+
llvm::append_range(CSI, VGSaves);
39843984
}
39853985

39863986
Register LastReg = 0;

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4055,8 +4055,7 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI,
40554055
}
40564056

40574057
if (IsChainCallConv)
4058-
Ops.insert(Ops.end(), ChainCallSpecialArgs.begin(),
4059-
ChainCallSpecialArgs.end());
4058+
llvm::append_range(Ops, ChainCallSpecialArgs);
40604059

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

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

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

llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMUNWINDOPASM_H
1515
#define LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMUNWINDOPASM_H
1616

17+
#include "llvm/ADT/STLExtras.h"
1718
#include "llvm/ADT/SmallVector.h"
1819
#include <cstddef>
1920
#include <cstdint>
@@ -60,7 +61,7 @@ class UnwindOpcodeAssembler {
6061

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

llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void WebAssemblyAsmTypeCheck::funcDecl(const wasm::WasmSignature &Sig) {
5555

5656
void WebAssemblyAsmTypeCheck::localDecl(
5757
const SmallVectorImpl<wasm::ValType> &Locals) {
58-
LocalTypes.insert(LocalTypes.end(), Locals.begin(), Locals.end());
58+
llvm::append_range(LocalTypes, Locals);
5959
}
6060

6161
void WebAssemblyAsmTypeCheck::dumpTypeStack(Twine Msg) {
@@ -357,8 +357,7 @@ bool WebAssemblyAsmTypeCheck::checkTryTable(SMLoc ErrorLoc,
357357
Opcode == wasm::WASM_OPCODE_CATCH_REF) {
358358
if (!getSignature(ErrorLoc, Inst.getOperand(OpIdx++),
359359
wasm::WASM_SYMBOL_TYPE_TAG, Sig))
360-
SentTypes.insert(SentTypes.end(), Sig->Params.begin(),
361-
Sig->Params.end());
360+
llvm::append_range(SentTypes, Sig->Params);
362361
else
363362
Error = true;
364363
}

0 commit comments

Comments
 (0)