[llvm-dev] How to write LLVM backend pass after every LLVM's internal pass?

Nicholas Krause via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 27 22:02:11 PST 2019



On 11/28/19 12:16 AM, Casper Sun via llvm-dev wrote:
> Currently I’m writing a X86 backend pass for my research project. I inserted a few instructions in MachineBasicBlocks, but then llc optimized my code, and deleted some of it. So how to so backend pass after all machine level optimizations?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
I don't have enough details to really help out here but my first 
assumption is that costs of selections are being merged in the llc.
You should note that's normal and generally a good thing or other forms 
of combining or merging instructions in the llc.

So based on that I'm curious as to why your concerned about the llc 
deleted parts of it,

Nick


More information about the llvm-dev mailing list