diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-02-12 15:54:49 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-02-12 15:54:49 +0000 |
commit | adfee3c4c03dd70a06f6283178d7943b09652206 (patch) | |
tree | 118f5db5b89936f7df4843b871c6d65cefece8c6 /gcc | |
parent | f60226fd72331398dd5fd239e9d1b4feccc91988 (diff) | |
download | gcc-adfee3c4c03dd70a06f6283178d7943b09652206.zip gcc-adfee3c4c03dd70a06f6283178d7943b09652206.tar.gz gcc-adfee3c4c03dd70a06f6283178d7943b09652206.tar.bz2 |
rtl-ssa: Use right obstack for temporary allocation
I noticed while working on PR98863 that we were using the main
obstack to allocate temporary uses. That was safe, but represents
a kind of local memory leak.
gcc/
* rtl-ssa/accesses.cc (function_info::make_use_available): Use
m_temp_obstack rather than m_obstack to allocate the temporary use.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rtl-ssa/accesses.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rtl-ssa/accesses.cc b/gcc/rtl-ssa/accesses.cc index 992a54c..5023d55 100644 --- a/gcc/rtl-ssa/accesses.cc +++ b/gcc/rtl-ssa/accesses.cc @@ -1290,7 +1290,7 @@ function_info::make_use_available (use_info *use, bb_info *bb) // Create a temporary placeholder phi. This will become // permanent if the change is later committed. phi = allocate_temp<phi_info> (phi_insn, resource, 0); - auto *input = allocate<use_info> (phi, resource, ultimate_def); + auto *input = allocate_temp<use_info> (phi, resource, ultimate_def); input->m_is_temp = true; phi->m_is_temp = true; phi->make_degenerate (input); |