[all-commits] [llvm/llvm-project] 459472: [LRE] Adjust order of cases in eliminateDeadDefs (...
Philip Reames via All-commits
all-commits at lists.llvm.org
Tue Oct 7 07:21:53 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 459472eef056ba5119a5da37a5cbb789fac531ae
https://github.com/llvm/llvm-project/commit/459472eef056ba5119a5da37a5cbb789fac531ae
Author: Philip Reames <preames at rivosinc.com>
Date: 2025-10-07 (Tue, 07 Oct 2025)
Changed paths:
M llvm/lib/CodeGen/LiveRangeEdit.cpp
Log Message:
-----------
[LRE] Adjust order of cases in eliminateDeadDefs (#162108)
If we have a rematerializable instruction without live virtual register
uses (that we didn't heuristically decide to shrink), but with a physreg
use, we were creating a kill to keep the physreg operand liveness
unchanged. This meant we *weren't* keeping around the remat instruction,
and thus inhibiting future remat within the original live interval. If
we keep the remat instruction, that *also* keeps the physreg use, and
thus we can achieve both objectives at once.
Noticed this via inspection, and we don't currently seem to have any
rematerializable instructions which could observe the difference. This
could in theory happen for both trivial and non-trivial remat, but
requires the rematerialization of an instruction with a physreg use.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list