[LLVMdev] jump threading and the stack

Chris Lattner sabre at nondot.org
Wed Jun 25 09:44:02 PDT 2008

On Wed, 25 Jun 2008, Jay Foad wrote:
> When jump threading duplicates a basic block, it can demote register
> values defined in that block to the stack. This seems a bit
> inefficient - is the idea that you should run mem2reg afterwards to
> clean this up?
> "llvm-ld -O" runs jump threading but doesn't run any mem2reg pass
> afterwards, and I've seen several cases where variables end up left on
> the stack in the output of the linker.

Wow, this sounds like a serious bug.  jump threading definitely needs 
mem2reg to be run after it.



More information about the llvm-dev mailing list