aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2024-07-05 04:48:15 +0200
committerChristoph Müllner <christoph.muellner@vrull.eu>2024-07-15 19:03:07 +0200
commit5040c273484d7123a40a99cdeb434cecbd17a2e9 (patch)
treed82b87e165454c8bd1d35c7131327e5b4984cf4b /gcc/tree-vect-loop.cc
parentbf8e80f9d164f8778d86a3dc50e501cf19a9eff1 (diff)
downloadgcc-5040c273484d7123a40a99cdeb434cecbd17a2e9.zip
gcc-5040c273484d7123a40a99cdeb434cecbd17a2e9.tar.gz
gcc-5040c273484d7123a40a99cdeb434cecbd17a2e9.tar.bz2
RISC-V: Attribute parser: Use alloca() instead of new + std::unique_ptr
Allocating an object on the heap with new, wrapping it in a std::unique_ptr and finally getting the buffer via buf.get() is a correct way to allocate a buffer that is automatically freed on return. However, a simple invocation of alloca() does the same with less overhead. gcc/ChangeLog: * config/riscv/riscv-target-attr.cc (riscv_target_attr_parser::parse_arch): Replace new + std::unique_ptr by alloca(). (riscv_process_one_target_attr): Likewise. (riscv_process_target_attr): Likewise. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions