[all-commits] [llvm/llvm-project] 4e2a00: [Binary] Reserve the correct size for the OffloadB...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Jun 23 07:36:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4e2a0092b97e967f823578295ebdba8f057a77d1
https://github.com/llvm/llvm-project/commit/4e2a0092b97e967f823578295ebdba8f057a77d1
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2022-06-23 (Thu, 23 Jun 2022)
Changed paths:
M llvm/lib/Object/OffloadBinary.cpp
Log Message:
-----------
[Binary] Reserve the correct size for the OffloadBinary
Summary:
When writing the offload binary, we use a SmallVector. We already know
the size that we expect the buffer to take up so we should reserve all
that memory up-front to improve performance. Also this patch adds some
extra sanity checks for the binary format for safety.
More information about the All-commits
mailing list