[llvm] [CodeGen] Treat Reg uses which are partially defined within bundle as internal read (PR #201004)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 07:03:32 PDT 2026
================
@@ -115,16 +117,23 @@ static DebugLoc getDebugLoc(MachineBasicBlock::instr_iterator FirstMI,
}
/// Check if target reg is contained in given lists, which are:
-/// LocalDefsV as given list for virtual regs
-/// LocalDefsP as given list for physical regs, in BitVector[RegUnit] form
+/// LocalDefsV as given list for virtual regs.
+/// LocalDefsP as given list for physical regs, in BitVector[RegUnit] form.
+/// This uses the ExternDefs to see if the reg is "partially defined"
+/// within the bundle. i.e a subreg of Reg is defined within the bundle
+/// while the remianing part is undef.
static bool containsReg(SmallSetVector<Register, 32> LocalDefsV,
- const BitVector &LocalDefsP, Register Reg,
- const TargetRegisterInfo *TRI) {
+ const BitVector &LocalDefsP,
+ const BitVector &ExternDefs,
+ const TargetRegisterInfo *TRI, Register Reg,
+ bool TracksLiveness, bool IsUndefUse) {
----------------
jayfoad wrote:
For an undef use, we probably should not call into this code in the first place. We can probably skip them in the loop over all_uses below. Can you doing that first, as a separate PR?
https://github.com/llvm/llvm-project/pull/201004
More information about the llvm-commits
mailing list