[llvm-dev] Request for comments on optimizing assembler

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Tue May 30 09:28:08 PDT 2017


On 5/30/2017 11:00 AM, Quentin Colombet via llvm-dev wrote:
> The way I was seeing this happening is by changing incrementally the 
> parser of the MIR format. Basically, I’d like the parser to get smarter 
> and smarter to a point where it could understand assembly mnemonics and 
> build the MachineFunction. The rest of the infrastructure would stay the 
> same.

I'm not sure that this is possible. The MIR format was meant to 
represent the program on the MachineInstr level and is more or less the 
same for all targets. The "optimizing assembler" would take the .s file 
as its input, the structure of which will differ from one architecture 
to the next. Not only that, but the format of an individual assembly 
instruction may be nontrivial to parse. For example, Hexagon 
instructions don't follow the typical "mnenomic op, op, ..." format, 
even though the MIR representation for Hexagon does.

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-dev mailing list