[llvm] [llvm][CodeGen] Update checking method of loop-carried phi in window scheduler (PR #96288)
Hua Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 04:49:03 PDT 2024
=?utf-8?b?4oCcYWtpcmF0aWFu4oCd?= <akiratian at tencent.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/96288 at github.com>
================
@@ -192,22 +192,36 @@ bool WindowScheduler::initialize() {
return false;
}
// Check each MI in MBB.
- SmallVector<Register, 8> PhiDefs;
+ SmallSet<Register, 8> PrevDefs;
+ SmallSet<Register, 8> PrevUses;
----------------
huaatian wrote:
These sets are used to record the defs and uses of phis that have already been checked in the current MBB.
They need to be initialized and retain register information across multiple calls to the lambda.
Therefore, wouldn't it be better to place these sets outside the lambda?
https://github.com/llvm/llvm-project/pull/96288
More information about the llvm-commits
mailing list