Stephen Rogers via llvm-dev
2016-May-09 15:37 UTC
[llvm-dev] Missing kill flag on Machine Instruction operands
Hi all, I'm writing a MachineFunction pass that relies on the kill flag to be appropriately set on operands of Machine Instructions, but it isn't. My pass runs before register allocation. What I'm seeing when I print an instruction is something like: %vreg218<def> = FOO %vreg217, %vreg369 but what I need is: %vreg218<def> = FOO %vreg217<kill>, %vreg369<kill> On this same instruction, the kill flag is being set on vreg217 and vreg369 in preceding and succeeding passes, but not in my pass. Is there some analysis pass that I need to add as required in my pass's "getAnalysisUsage" to get this flag to be set? Thanks, Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160509/65e4eccd/attachment.html>
Quentin Colombet via llvm-dev
2016-May-09 16:05 UTC
[llvm-dev] Missing kill flag on Machine Instruction operands
Hi Stephen, The kill flags are conservatively correct and not mandatory; if they are set, they are correct, if they are not, you cannot say anything.> On May 9, 2016, at 8:37 AM, Stephen Rogers via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all, > > I'm writing a MachineFunction pass that relies on the kill flag to be appropriately set on operands of Machine Instructions, but it isn't. My pass runs before register allocation. What I'm seeing when I print an instruction is something like: > > %vreg218<def> = FOO %vreg217, %vreg369 > > but what I need is: > > %vreg218<def> = FOO %vreg217<kill>, %vreg369<kill> > > On this same instruction, the kill flag is being set on vreg217 and vreg369 in preceding and succeeding passes, but not in my pass. Is there some analysis pass that I need to add as required in my pass's "getAnalysisUsage" to get this flag to be set?I would recommend to rely on the LiveInterval analysis. Cheers, -Quentin> > Thanks, > Stephen > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160509/6bdc67ad/attachment-0001.html>
Stephen Rogers via llvm-dev
2016-May-09 16:08 UTC
[llvm-dev] Missing kill flag on Machine Instruction operands
Hi Quentin, That's unfortunate to hear. I'll take a look into using the LiveInterval analysis for this. Thanks for the advice, Stephen On 9 May 2016 at 17:05, Quentin Colombet <qcolombet at apple.com> wrote:> Hi Stephen, > > The kill flags are conservatively correct and not mandatory; if they are > set, they are correct, if they are not, you cannot say anything. > > On May 9, 2016, at 8:37 AM, Stephen Rogers via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hi all, > > I'm writing a MachineFunction pass that relies on the kill flag to be > appropriately set on operands of Machine Instructions, but it isn't. My > pass runs before register allocation. What I'm seeing when I print an > instruction is something like: > > %vreg218<def> = FOO %vreg217, %vreg369 > > but what I need is: > > %vreg218<def> = FOO %vreg217<kill>, %vreg369<kill> > > On this same instruction, the kill flag is being set on vreg217 and > vreg369 in preceding and succeeding passes, but not in my pass. Is there > some analysis pass that I need to add as required in my pass's > "getAnalysisUsage" to get this flag to be set? > > > I would recommend to rely on the LiveInterval analysis. > > Cheers, > -Quentin > > > Thanks, > Stephen > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160509/bf8f0082/attachment.html>