My name is Isaac. I emailed this mailing list a couple years ago because I was working on an ARM specific target optimization for my thesis, and had questions about moving instructions and properly migrating kill flags. I have managed to get that working properly, and I now have a complete optimization that I wish to test. <div>
<br></div><div>My question is simply this: Is there any established way to inject ARM assembly code into LLVM such that the ASM you inject has the target-specific optimizations performed on it? In other words, I'm looking for a way to do "ARM ASM test case" -> "LLVM target optimization" -> "optimized ARM ASM." </div>
<div><br></div><div>The reason I'm trying to do this is because the specific case I'm optimizing against is proving difficult to generate using C code source files. The optimization requires a particular combination of memory instructions to be present in order to work. I've also tried using asm() C calls to force a specific assembly pattern, but LLVM appears to treat the asm() call like a single atomic block that does not have the optimizer run on its member instructions.</div>
<div><br></div><div>I am sure that development on some of the target optimizations for LLVM required some very specific sequences of instructions to be present that might be difficult to generate using C code or even LLVM bitcode. What tools exist to make this testing process easier for developers? Is there some way to run target ASM optimizations using ASM input?</div>
<div><br></div><div>Thanks for your time,</div><div><br></div><div>Isaac Asay</div><div><br></div><div>P.S.: In case you want more details, I asked a Stack Overflow question on this issue and was referred back to this mail list: <a href="http://stackoverflow.com/questions/6084052/testing-a-code-generator-optimization">http://stackoverflow.com/questions/6084052/testing-a-code-generator-optimization</a></div>