[llvm-dev] RegisterCoalescer, multple defs of different subregisters, some are dead

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 17 10:45:33 PDT 2018


On 9/17/2018 12:07 PM, Björn Pettersson A via llvm-dev wrote:
> # We are not tracking subregister liveness for our target. So should it be 
> allowed to have “%23.loAcc40:an40pairs, dead %23.hiAcc40:an40pairs = …”? 
> (What is the semantics for that?)

It should be allowed, because it can still useful to know that this 
particular def operand is dead. The semantics (in general) is that as 
long as a part of a register is live, then the register is live.

> # Is the semantics of a “dead” subregister def different for “tracks 
> subregister liveness” enable and disabled?

Tracking subregister liveness means that each subregister has its own 
live range. The containing register still has its own range (which 
should be in agreement with the live ranges of its subregisters). In 
that sense, tracking subregister liveness can reflect this situation in 
live ranges and potentially allow optimizations to take advantage of it. 
If there is a bug in treating such cases for the main register range, 
however, it may still apply with the subregister liveness tracking.

> # Would it be correct to remove the “dead” marking for 
> %23.hiAcc40:an40pairs in my problem above (at least with subregister 
> liveness disabled)? Or is the verifier that is too restrictive here?

Correct, yes, but not necessarily right. This seems like a bug in the 
verifier, actually.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


More information about the llvm-dev mailing list