Right now inline assembler just passes through to the assembler if there
is no direct object emitter.
If there is a direct object emitter, it gets processed in Asm parser and
MC instructions are produced.
I propose that the initial parsing happen very early and the inline
assembly code be replaced with a sequence of MachineInstructions in the
basic block where it occurs.
Then code like constant islands, branch optimization and other things
can operate better. Right now they have to make lots of pessimistic
assumptions (or else be plain wrong).
On 11/12/2013 01:04 PM, Eric Christopher wrote:> A more concrete proposal would be good. I have no idea what you think
> you mean by this.
>
> -eric
>
> On Tue, Nov 12, 2013 at 12:48 PM, reed kotler <rkotler at mips.com>
wrote:
>> It seems that some parts of asm parser should be moved earlier into
llvm.
>>
>> It should be possible to parse inline assembler and produce a list of
>> machine instructions that can be merged into the normal instructions of
a
>> basic block.
>>
>> This would make many other things be simple to do later.
>>
>> This guessing about and adjusting for uncertainty in later code when
inline
>> assembler is present is for the birds.
>>
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev