Skip to content

Commit 736f4d4

Browse files
committed
Use SmallVector
1 parent c4af915 commit 736f4d4

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
20672067
uint64_t getStreamBusyWaitMicroseconds() const { return OMPX_StreamBusyWait; }
20682068

20692069
Expected<std::unique_ptr<MemoryBuffer>> doJITPostProcessing(
2070-
std::vector<std::unique_ptr<MemoryBuffer>> &&MB) const override {
2070+
llvm::SmallVector<std::unique_ptr<MemoryBuffer>> &&MB) const override {
20712071

20722072
// TODO: We should try to avoid materialization but there seems to be no
20732073
// good linker interface w/o file i/o.

offload/plugins-nextgen/common/include/JIT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct JITEngine {
4444
/// called.
4545
using PostProcessingFn =
4646
std::function<Expected<std::unique_ptr<MemoryBuffer>>(
47-
std::vector<std::unique_ptr<MemoryBuffer>> &&)>;
47+
llvm::SmallVector<std::unique_ptr<MemoryBuffer>> &&)>;
4848

4949
JITEngine(Triple::ArchType TA);
5050

offload/plugins-nextgen/common/include/PluginInterface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,8 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
934934
virtual std::string getComputeUnitKind() const { return "unknown"; }
935935

936936
/// Post processing after jit backend. The ownership of \p MB will be taken.
937-
virtual Expected<std::unique_ptr<MemoryBuffer>>
938-
doJITPostProcessing(std::vector<std::unique_ptr<MemoryBuffer>> &&MB) const {
937+
virtual Expected<std::unique_ptr<MemoryBuffer>> doJITPostProcessing(
938+
llvm::SmallVector<std::unique_ptr<MemoryBuffer>> &&MB) const {
939939
if (MB.size() > 1)
940940
return make_error<error::OffloadError>(
941941
error::ErrorCode::UNSUPPORTED,

offload/plugins-nextgen/common/src/JIT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ JITEngine::process(const __tgt_device_image &Image,
317317
const std::string &ComputeUnitKind = Device.getComputeUnitKind();
318318

319319
PostProcessingFn PostProcessing =
320-
[&Device](std::vector<std::unique_ptr<MemoryBuffer>> &&MB)
320+
[&Device](llvm::SmallVector<std::unique_ptr<MemoryBuffer>> &&MB)
321321
-> Expected<std::unique_ptr<MemoryBuffer>> {
322322
return Device.doJITPostProcessing(std::move(MB));
323323
};

offload/plugins-nextgen/cuda/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ struct CUDADeviceTy : public GenericDeviceTy {
421421
}
422422

423423
Expected<std::unique_ptr<MemoryBuffer>> doJITPostProcessing(
424-
std::vector<std::unique_ptr<MemoryBuffer>> &&MB) const override {
424+
llvm::SmallVector<std::unique_ptr<MemoryBuffer>> &&MB) const override {
425425
// TODO: This should be possible, just needs to be implemented
426426
if (MB.size() > 1)
427427
return make_error<error::OffloadError>(

0 commit comments

Comments
 (0)