Can I use assembly code generated with gcc / llvm / clang in Visual Studio?

I am having performance issues with some C code that I compile with Visual Studio 2017 (even after rewriting the code using inline functions, performance is not great as compilation seems to add a move operation before every vector addition or multiplication). I am getting very nice assembly code from clang / llvm using its vectorization functions. Now, if I could use the assembly code from LLVM and add it to my Visual Studio project, that would be great, and save me a lot of time in the long run.

I know I can choose the output syntax with gcc / llvm / clang. The problem, of course, is that the generated .s file has a very different structure from the .asm file that Visual Studio expects (persistent definitions, macros, etc.).

Does anyone know a solution to this problem? Either on the code generation side or in Visual Studio?

+3


source to share





All Articles