[all-commits] [llvm/llvm-project] 51bda3: [Libomptarget] Replace std::vector with llvm::Smal...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Aug 1 12:59:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51bda3a0e7ac0285cf116b5cfd1393a3340974b5
      https://github.com/llvm/llvm-project/commit/51bda3a0e7ac0285cf116b5cfd1393a3340974b5
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M openmp/libomptarget/include/device.h
    M openmp/libomptarget/include/rtl.h
    M openmp/libomptarget/src/LegacyAPI.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/private.h

  Log Message:
  -----------
  [Libomptarget] Replace std::vector with llvm::SmallVector

The runtime makes some use of `std::vector` data structures. We should
be able to replace these trivially with `llvm::SmallVector` instead.
This should allow us to avoid heap allocations in the majority of cases
now.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D130927




More information about the All-commits mailing list