OSDN Git Service

[X86] Cache variables that only depend on the subtarget
authorReid Kleckner <reid@kleckner.net>
Wed, 17 Jun 2015 21:31:17 +0000 (21:31 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 17 Jun 2015 21:31:17 +0000 (21:31 +0000)
commitbbb75718b2704c81b16bce95f6b6596ec7ede197
tree90b4151d56fe687682889e855179a046e7b0a420
parentdfe93a50b510ebb4632330412e6330e099fa4610
[X86] Cache variables that only depend on the subtarget

There is a one-to-one relationship between X86Subtarget and
X86FrameLowering, but every frame lowering method would previously pull
the subtarget off the MachineFunction and query some subtarget
properties.

Over time, these locals began to grow in complexity and it became
important to keep their names and meaning in sync across all of the
frame lowering methods, leading to duplication. We can eliminate that
duplication by computing them once in the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239948 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ExpandPseudo.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86Subtarget.cpp