[PATCH] D32206: X86RegisterInfo: eliminateFrameIndex: Avoid code duplication; NFC

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 17:31:08 PDT 2017


MatzeB created this revision.
Herald added a subscriber: mcrosier.

X86RegisterInfo::eliminateFrameIndex() and
X86FrameLowering::getFrameIndexReference() both had logic to compute the
base register. This consolidates the code.

Also use MachineInstr::isReturn instead of manually enumerating tail
call instructions (return instructions were not included in the previous
list because they never reference frame indexes).


Repository:
  rL LLVM

https://reviews.llvm.org/D32206

Files:
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86FrameLowering.h
  lib/Target/X86/X86RegisterInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32206.95663.patch
Type: text/x-patch
Size: 4802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170419/9fd301ef/attachment.bin>


More information about the llvm-commits mailing list