[LLVMdev] pseudo lowering
Andrew Trick
atrick at apple.com
Sun Feb 17 13:20:22 PST 2013
On Feb 17, 2013, at 1:11 PM, Reed Kotler <rkotler at mips.com> wrote:
> On 02/17/2013 01:08 PM, Andrew Trick wrote:
>>
>> 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
>>
> I feel like I should expand things as soon as I have all the information because then other passes can help make things better.
>
> So maybe I do this earlier in expandIselPseudos.
>
> Are there any cons ?
If the instructions must be adjacent for correctness or cannot be spilled within the sequence, then you have a problem. Sorry to be vague, but I'll again refer you to Cameron's detailed response.
-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/3ec9c34f/attachment.html>
More information about the llvm-dev
mailing list