[PATCH] D20949: [AggressiveAntiDepBreaker] Don't change aliased registers of liveins to alive in StartBlock
Chuang-Yu Cheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 02:57:57 PDT 2016
cycheng added a comment.
[Discussion in mail]
Take basic block BB1 and its successor BB2. If there is a definition of register R in BB1 and R is live-in for BB2, then it's OK to rename definitions/uses of R's aliases in BB1. Of course, it is not OK to rename R (the physical register) in BB1. Or am I misreading this?
Yes, we can rename R's aliases in BB1, my point is: in StartBlock, we only need to set R to live, but not its aliases, so, the question becomes: is my point correct?
Using your case, the incorrect scenario will be:
R's aliases are defined in BB1, and
these define are implicit used in BB2 through R, and
these define are renamed in BB1
So, assume r is an alias of R, then:
def r (last def) <= can we rename this? No, because its alias 'R' is group 0
def R (last def, group = 0)
So, current AADB guards for us that incorrect scenario is not going to happen.
More information about the llvm-commits