LEA code size optimization pass (Part 1): Remove redundant address recalculations...
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 4 Dec 2015 10:53:15 +0000 (10:53 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 4 Dec 2015 10:53:15 +0000 (10:53 +0000)
commita18156c3b8d92d5eb1af043947d1b1461c84e40f
tree75583756fbc48b47f44fe0019c8c6ccfa49de3a5
parente471c45c92d58dc28cb3cab00d24b6bba5f1b3fe
LEA code size optimization pass (Part 1): Remove redundant address recalculations, by Andrey Turetsky

Add new x86 pass which replaces address calculations in load or store instructions with def register of existing LEA (must be in the same basic block), if the LEA calculates address that differs only by a displacement. Works only with -Os or -Oz.
Differential Revision: http://reviews.llvm.org/D13294

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254712 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86OptimizeLEAs.cpp [new file with mode: 0644]
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/lea-opt.ll [new file with mode: 0644]