]> git.ipfire.org Git - thirdparty/gcc.git/commit
ira: Add comments and fix move_spill_restore calculation
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 10 Jan 2022 14:47:07 +0000 (14:47 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 10 Jan 2022 14:47:07 +0000 (14:47 +0000)
commit909a4b4764c4f270f09ccb2a950c91b21ed7b33a
treea0905da8f76ee15f99e16dbe341d83f601c43e15
parentbf37fd35a37985a0e19817f843d0bdd5ad504aa9
ira: Add comments and fix move_spill_restore calculation

This patch adds comments to describe each use of ira_loop_border_costs.
I think this highlights that move_spill_restore was using the wrong cost
in one case, which came from tranposing [0] and [1] in the original
(pre-ira_loop_border_costs) ira_memory_move_cost expressions.  The
difference would only be noticeable on targets that distinguish between
load and store costs.

gcc/
PR rtl-optimization/98782
* ira-color.c (color_pass): Add comments to describe the spill costs.
(move_spill_restore): Likewise.  Fix reversed calculation.
gcc/ira-color.c