开发者

How can I optimize LLVM assembly cross-compiled with gcc?

开发者 https://www.devze.com 2023-03-17 02:47 出处:网络
I am using LLVM to generate Alpha assembly. Their Alpha ISA support is experimental and Icannot find a way to work around a bug. If I use -O0 during LLVM bytecode-to-Alpha assembly creation, the assem

I am using LLVM to generate Alpha assembly. Their Alpha ISA support is experimental and I cannot find a way to work around a bug. If I use -O0 during LLVM bytecode-to-Alpha assembly creation, the assembly generated is fine.

I want optimized assembly, however. Is there some option in gcc (which is my final cross compiler) that would optimize the assembly? I tried -O3 while converting the Alpha assembly to object file, b开发者_运维知识库ut I did not see any optimization happening. Is it even possible to do back-end optimization after assembly creation?


If you want optimized assembly, you obviously should ask LLVM for it. So pass -O3 to llc, not to gcc.

0

精彩评论

暂无评论...
验证码 换一张
取 消