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

Viewed 401

I'm having performance problems with some C code that I compile with Visual Studio 2017 (even after rewriting the code using intrinsics, the performance is not great because the compile seems to add a move operation before every vector addition or multiplication). However, I get very good assembly code from clang/llvm using its vectorization features. Now, if I could actually use the assembly code from LLVM and add it to my Visual Studio project, that would be great, and would save me a lot of time in the long run.

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

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

0 Answers
Related