LEA code size optimization pass (Part 2): Remove redundant LEA instructions.
authorAndrey Turetskiy <andrey.turetskiy@gmail.com>
Wed, 13 Jan 2016 11:30:44 +0000 (11:30 +0000)
committerAndrey Turetskiy <andrey.turetskiy@gmail.com>
Wed, 13 Jan 2016 11:30:44 +0000 (11:30 +0000)
commit1f54774327fd8b0c2db2f33cdf09e96ef554cadd
tree189d7f246ddb204a64ca02946b9b932076e49297
parentb3379c35bd74d4aab2dde703d4068c197608ecb5
LEA code size optimization pass (Part 2): Remove redundant LEA instructions.

Make x86 OptimizeLEAs pass remove LEA instruction if there is another LEA
(in the same basic block) which calculates address differing only be a
displacement. Works only for -Oz.

Differential Revision: http://reviews.llvm.org/D13295

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257589 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86.h
lib/Target/X86/X86OptimizeLEAs.cpp
test/CodeGen/X86/lea-opt.ll