Matthias Braun via llvm-dev
2016-Apr-27 21:31 UTC
[llvm-dev] phys reg liveness during foldMemoryOperandImpl()
I would expect that it shouldn't be too hard to pass around a reference to LiveIntervalAnalysis*. Patches welcome :) - Matthias> On Apr 27, 2016, at 11:38 AM, Jonas Paulsson via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > ping. > > Either this can be implemented easily, or the current SystemZ optimization LAY -> AGSI in foldMemoryOperandImpl() should be removed, since this is actually illegal. > > /Jonas > > On 2016-04-15 12:53, Jonas Paulsson wrote: >> Hi, >> >> I wonder if it would be possible to extend foldMemoryOperandImp() so that targets can check for liveness of a particular phys reg? >> >> The case I am thinking of is when the new instruction clobbers the CC reg, while the old one did not. In this case the new instruction can only become a replacement if the CC reg is known to be dead. >> >> The idea is that liveness of phys regs should be available somehow when this functionis called during regalloc. Part of the issue is the fact that CC reg is not an allocatable register. >> >> /Jonas Paulsson >> > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Jonas Paulsson via llvm-dev
2016-Apr-28 08:52 UTC
[llvm-dev] phys reg liveness during foldMemoryOperandImpl()
Does that mean that there is a LiveInterval created for all def-uses of physical registers? While looking quickly, I only saw a method for preg-arguments constructing such LIs. Not sure if it is done for e.g. a compare - branch sequence, for the CC reg? /Jonas On 2016-04-27 23:31, Matthias Braun wrote:> I would expect that it shouldn't be too hard to pass around a reference to LiveIntervalAnalysis*. Patches welcome :) > > - Matthias > >> On Apr 27, 2016, at 11:38 AM, Jonas Paulsson via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> ping. >> >> Either this can be implemented easily, or the current SystemZ optimization LAY -> AGSI in foldMemoryOperandImpl() should be removed, since this is actually illegal. >> >> /Jonas >> >> On 2016-04-15 12:53, Jonas Paulsson wrote: >>> Hi, >>> >>> I wonder if it would be possible to extend foldMemoryOperandImp() so that targets can check for liveness of a particular phys reg? >>> >>> The case I am thinking of is when the new instruction clobbers the CC reg, while the old one did not. In this case the new instruction can only become a replacement if the CC reg is known to be dead. >>> >>> The idea is that liveness of phys regs should be available somehow when this functionis called during regalloc. Part of the issue is the fact that CC reg is not an allocatable register. >>> >>> /Jonas Paulsson >>> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Matthias Braun via llvm-dev
2016-Apr-28 15:37 UTC
[llvm-dev] phys reg liveness during foldMemoryOperandImpl()
If it is not a reserved register, then you should have a live interval. Registers can be non-allocatable but also not reserved, this is true for the flag registers on most targets (I have no idea about System Z though) - Matthias> On Apr 28, 2016, at 1:52 AM, Jonas Paulsson via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Does that mean that there is a LiveInterval created for all def-uses of physical registers? While looking quickly, I only saw a method for preg-arguments constructing such LIs. Not sure if it is done for e.g. a compare - branch sequence, for the CC reg? > > /Jonas > > >> On 2016-04-27 23:31, Matthias Braun wrote: >> I would expect that it shouldn't be too hard to pass around a reference to LiveIntervalAnalysis*. Patches welcome :) >> >> - Matthias >> >>> On Apr 27, 2016, at 11:38 AM, Jonas Paulsson via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> >>> ping. >>> >>> Either this can be implemented easily, or the current SystemZ optimization LAY -> AGSI in foldMemoryOperandImpl() should be removed, since this is actually illegal. >>> >>> /Jonas >>> >>>> On 2016-04-15 12:53, Jonas Paulsson wrote: >>>> Hi, >>>> >>>> I wonder if it would be possible to extend foldMemoryOperandImp() so that targets can check for liveness of a particular phys reg? >>>> >>>> The case I am thinking of is when the new instruction clobbers the CC reg, while the old one did not. In this case the new instruction can only become a replacement if the CC reg is known to be dead. >>>> >>>> The idea is that liveness of phys regs should be available somehow when this functionis called during regalloc. Part of the issue is the fact that CC reg is not an allocatable register. >>>> >>>> /Jonas Paulsson >>>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> llvm-dev at lists.llvm.org >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev