Joan Lluch via llvm-dev
2019-May-03 17:50 UTC
[llvm-dev] LLVM Virtual registers after RA pass?
I need to use ‘createVirtualRegister’ for a specific case in my ‘eliminateFrameIndex’ function implementation. However, whenever that code is executed, I get the assertion "MachineCopyPropagation should be run after register allocation!” at a later stage. I have seen that at least a couple of backend implementations (including ARM Thumb) create virtual registers in ‘eliminatedFrameIndex’. What am I missing?, is there something that I need to set for virtual registers to be allowed after the RA pass, and specifically in the ‘eliminateFrameIndex’ function? Thanks, Joan Lluch Puigsacalm, 7 17458 - Fornells de la Selva Girona Tel: 620 28 45 13 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190503/bfb0c6e9/attachment.html>
Arsenault, Matthew via llvm-dev
2019-May-03 17:55 UTC
[llvm-dev] LLVM Virtual registers after RA pass?
There are a number of hooks to control this in PrologEpilogInserter spread between TargetFrameLowering and TargetRegisterInfo. The one you most want to look at is probably TargetRegisterInfo::requiresFrameIndexScavenging. -Matt From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of llvm-dev <llvm-dev at lists.llvm.org> Reply-To: Joan Lluch <joan.lluch at icloud.com> Date: Friday, May 3, 2019 at 7:50 PM To: llvm-dev <llvm-dev at lists.llvm.org> Subject: [llvm-dev] LLVM Virtual registers after RA pass? I need to use ‘createVirtualRegister’ for a specific case in my ‘eliminateFrameIndex’ function implementation. However, whenever that code is executed, I get the assertion "MachineCopyPropagation should be run after register allocation!” at a later stage. I have seen that at least a couple of backend implementations (including ARM Thumb) create virtual registers in ‘eliminatedFrameIndex’. What am I missing?, is there something that I need to set for virtual registers to be allowed after the RA pass, and specifically in the ‘eliminateFrameIndex’ function? Thanks, Joan Lluch Puigsacalm, 7 17458 - Fornells de la Selva Girona Tel: 620 28 45 13 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190503/36fd01bb/attachment.html>
Joan Lluch via llvm-dev
2019-May-03 20:31 UTC
[llvm-dev] LLVM Virtual registers after RA pass?
Hi Matt, Overriding both “requiresFrameIndexScavenging” and “requiresRegisterScavenging” to return true did the trick. Thanks !! Joan Lluch Tel: 620 28 45 13> On 3 May 2019, at 19:55, Arsenault, Matthew <Matthew.Arsenault at amd.com> wrote: > > There are a number of hooks to control this in PrologEpilogInserter spread between TargetFrameLowering and TargetRegisterInfo. The one you most want to look at is probably TargetRegisterInfo::requiresFrameIndexScavenging. > > -Matt > > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of llvm-dev <llvm-dev at lists.llvm.org> > Reply-To: Joan Lluch <joan.lluch at icloud.com> > Date: Friday, May 3, 2019 at 7:50 PM > To: llvm-dev <llvm-dev at lists.llvm.org> > Subject: [llvm-dev] LLVM Virtual registers after RA pass? > > I need to use ‘createVirtualRegister’ for a specific case in my ‘eliminateFrameIndex’ function implementation. > > However, whenever that code is executed, I get the assertion "MachineCopyPropagation should be run after register allocation!” at a later stage. > > I have seen that at least a couple of backend implementations (including ARM Thumb) create virtual registers in ‘eliminatedFrameIndex’. > > What am I missing?, is there something that I need to set for virtual registers to be allowed after the RA pass, and specifically in the ‘eliminateFrameIndex’ function? > > Thanks, > > Joan Lluch-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190503/dcfbde1e/attachment.html>