[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]

Nemanja:
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?

CY:
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:

  BB1:
    def r (last def) <= can we rename this? No, because its alias 'R' is group 0
    def R (last def, group = 0)
  
  BB2:
    live-ins: R
    use R

So, current AADB guards for us that incorrect scenario is not going to happen.


http://reviews.llvm.org/D20949





More information about the llvm-commits mailing list