On Feb 16, 2013, at 1:31 PM, Cameron Zwarich <zwarich at apple.com> wrote:> That's exactly the right place.Really? You don't want the expansion to be optimized? You want to specify a machine model for the pseudo's as if they're real instructions? You don't want to schedule or register allocate the real instructions? -Andy> On Feb 16, 2013, at 1:08 PM, Reed Kotler <rkotler at mips.com> wrote: > >> I have a bunch of pseudos that I want to lower right after instruction selection. >> >> Where is the best place to do that? >> >> I was planning to use expandPostRAPseudo. >> >> Is there a better place? >> >> TIA. >> >> Reed >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On 02/17/2013 12:48 PM, Andrew Trick wrote:> On Feb 16, 2013, at 1:31 PM, Cameron Zwarich <zwarich at apple.com> wrote: > >> That's exactly the right place. > Really? You don't want the expansion to be optimized? You want to specify a machine model for the pseudo's as if they're real instructions? You don't want to schedule or register allocate the real instructions? > > -AndySo then maybe my code should be called during instruction selection? The very original MIPs port was for Mips I and Mips I has a need for lots of psuedos because it's primitive. That code has mostly been removed now because we don't support Mips I which is just an historical processor at this time. I approach level one implementations of things from the point of view of correctness and then make things better as I understand the problem better. So my base scheme for all of this was to create multi line assembler expansion in pseudos. Now that I'm passing mostly all of test-suite, I'm starting improve things. At this time, I'm starting to place expansion in expandPostRAPseudo Would it be possible to call this same code during instruction selection? When I emitting the code for certain formats, I would need to call some emitter which basically the same kind of I'm calling from expandPostRAPseudo now.>> On Feb 16, 2013, at 1:08 PM, Reed Kotler <rkotler at mips.com> wrote: >> >>> I have a bunch of pseudos that I want to lower right after instruction selection. >>> >>> Where is the best place to do that? >>> >>> I was planning to use expandPostRAPseudo. >>> >>> Is there a better place? >>> >>> TIA. >>> >>> Reed >>> >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130217/d650d359/attachment.html>
On Feb 17, 2013, at 1:01 PM, Reed Kotler <rkotler at mips.com> wrote:> On 02/17/2013 12:48 PM, Andrew Trick wrote: >> On Feb 16, 2013, at 1:31 PM, Cameron Zwarich <zwarich at apple.com> wrote: >> >>> That's exactly the right place. >> Really? You don't want the expansion to be optimized? You want to specify a machine model for the pseudo's as if they're real instructions? You don't want to schedule or register allocate the real instructions? >> >> -Andy > > So then maybe my code should be called during instruction selection? > > The very original MIPs port was for Mips I and Mips I has a need for lots of psuedos because it's primitive. > That code has mostly been removed now because we don't support Mips I which is just an historical processor at this time. > > I approach level one implementations of things from the point of view of correctness and then make things better as I understand the problem better. > > So my base scheme for all of this was to create multi line assembler expansion in pseudos. > > Now that I'm passing mostly all of test-suite, I'm starting improve things. > > At this time, I'm starting to place expansion in > expandPostRAPseudo > > Would it be possible to call this same code during instruction selection? > > When I emitting the code for certain formats, I would need to call some emitter which basically the same kind of I'm calling from expandPostRAPseudo now.expandISelPseudos is the place to cleanup after ISEL hacks, and can create BBs. But, as Cameron explained well in the other thread, if you want a macro assembler for some sequences, do it late in expandPostRAPseudos. -Andy>>> On Feb 16, 2013, at 1:08 PM, Reed Kotler <rkotler at mips.com> wrote: >>> >>>> I have a bunch of pseudos that I want to lower right after instruction selection. >>>> >>>> Where is the best place to do that? >>>> >>>> I was planning to use expandPostRAPseudo. >>>> >>>> Is there a better place? >>>> >>>> TIA. >>>> >>>> Reed >>>> >>>> >>>> >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130217/76bae8a6/attachment.html>
On Feb 17, 2013, at 12:48 PM, Andrew Trick <atrick at apple.com> wrote:> On Feb 16, 2013, at 1:31 PM, Cameron Zwarich <zwarich at apple.com> wrote: > >> That's exactly the right place. > > Really? You don't want the expansion to be optimized? You want to specify a machine model for the pseudo's as if they're real instructions? You don't want to schedule or register allocate the real instructions?I somehow dyslexically read that as post-isel not post-RA. That's what I get for sending emails from my phone. Thanks for the correction. Cameron
Thanks for all the help. This is saving me lots of time and making better code and helping me to avoid possible bugs. I think that I can solve half of this now by just adding Defs and Uses to the instructions I am generate during the pseudo lowering. I need to move this transformation to a different place as you guys are suggesting. Now I have to either intelligently split the pseudos that have jmp instructions or else use machine bundles. I've posted a separate topic on expanding the pseudos with branches since it has different issues. All this will be reviewed internally by Akira at Mips on post commit. Reed On 02/17/2013 02:16 PM, Cameron Zwarich wrote:> On Feb 17, 2013, at 12:48 PM, Andrew Trick <atrick at apple.com> wrote: > >> On Feb 16, 2013, at 1:31 PM, Cameron Zwarich <zwarich at apple.com> wrote: >> >>> That's exactly the right place. >> Really? You don't want the expansion to be optimized? You want to specify a machine model for the pseudo's as if they're real instructions? You don't want to schedule or register allocate the real instructions? > I somehow dyslexically read that as post-isel not post-RA. That's what I get for sending emails from my phone. Thanks for the correction. > > Cameron