]> git.ipfire.org Git - thirdparty/gcc.git/commit
mode-switching: Avoid quadractic list operation
authorRichard Sandiford <richard.sandiford@arm.com>
Sat, 11 Nov 2023 17:28:55 +0000 (17:28 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Sat, 11 Nov 2023 17:28:55 +0000 (17:28 +0000)
commit174ee5115a3004d3664165e9d619535b579111d4
treee023c4bd67aada3cd0160b0f5609c3aa87488925
parent3cd3a09b3f91a1d023cb180763d40598d6bb274b
mode-switching: Avoid quadractic list operation

add_seginfo chained insn information to the end of a list
by starting at the head of the list.  This patch avoids the
quadraticness by keeping track of the tail pointer.

gcc/
* mode-switching.cc (add_seginfo): Replace head pointer with
a pointer to the tail pointer.
(optimize_mode_switching): Update calls accordingly.
gcc/mode-switching.cc