asm parser functionality

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.

A more concrete proposal would be good. I have no idea what you think
you mean by this.

-eric

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).

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).

By a concrete proposal I'm curious how you see this working? Right now
we don't intermix machine instructions and llvm IR.

-eric