Rearrange handling of jump tables. Highlights:
authorChris Lattner <sabre@nondot.org>
Mon, 25 Jan 2010 23:26:13 +0000 (23:26 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Jan 2010 23:26:13 +0000 (23:26 +0000)
commit071c62fad0b25ad4131e7f984173a796c1e63f61
treec77e476ec267d26cf4f93ad52dfb5b07fc78b6c5
parentb1e803985d3378538ae9cff7eed4102c002d1e22
Rearrange handling of jump tables.  Highlights:
1. MachineJumpTableInfo is now created lazily for a function the first time
   it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
   MachineJumpTableInfo::JTEntryKind enum.  This enum is determined by the
   TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
   throughout the compiler that "knows" that jump table entries are always
   32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
   their kind, instead of at machinefunction creation time.

Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94470 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineJumpTableInfo.h
include/llvm/Target/TargetLowering.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/ExecutionEngine/JIT/JITEmitter.cpp
lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp