[LLVMdev] Support for bundles of MCInst?

Mario Guerra mariog at codeaurora.org
Thu Nov 29 16:36:52 PST 2012


Owen,

> > One is that the lifespan of an MCInst seems to be limited to the scope
> > of AsmPrinter, and we need them to be persistent in order to do a
> > traversal for branch relaxation and fetch boundary alignment
optimizations.
> 
> This is no different than any other MCInst in the course of object
emission.  Normal
> MCInst's are allocated on the stack in the AsmPrinter.

That's the crux of our problem. The short lifespan of an MCInst prevents us
from being able to perform some of the optimizations we need at the MC level
that require the ability to traverse previous packets. We could do these
optimizations at the MI level before lowering, but then they would be missed
by the assembly parser since it goes directly to MC. 

Speaking of the assembly parser, we also need to be able build packets in
the parser. It currently operates on a single instruction at a time, so
building composite instructions in the parser would require some changes. I
don't know what those changes would look like yet, but it's worth mentioning
in this context. 


- --
Mario Guerra
mariog at codeaurora.org
Qualcomm Innovation Center Inc is a member of Code Aurora Forum, hosted by
The Linux Foundation




More information about the llvm-dev mailing list