[LLVMdev] Finding previous emitted instruction

Tim Northover t.p.northover at gmail.com
Tue Jul 29 01:04:04 PDT 2014


Hi Vadim,

On 29 July 2014 04:02, Vadim Chugunov <vadimcn at gmail.com> wrote:
> I am currently trying to figure out where does LLVM eliminate extraneous
> JMPs, like the one below.  Any hints?

There are quite a few places that could be doing it in lib/CodeGen[1].
They all use the TargetInstrInfo hooks, though, so that's the place to
start looking: AnalyzeBranch, RemoveBranch and InsertBranch.

This particular one might be TailDuplication.cpp, but you should run
"llc -print-after-all" to find out exactly which pass is doing it.

Cheers.

Tim.



More information about the llvm-dev mailing list