llvm-6502/lib/Target/AArch64
Ahmed Bougacha ef99356dfe MC: Disassembled CFG reconstruction.
This patch builds on some existing code to do CFG reconstruction from
a disassembled binary:
- MCModule represents the binary, and has a list of MCAtoms.
- MCAtom represents either disassembled instructions (MCTextAtom), or
  contiguous data (MCDataAtom), and covers a specific range of addresses.
- MCBasicBlock and MCFunction form the reconstructed CFG. An MCBB is
  backed by an MCTextAtom, and has the usual successors/predecessors.
- MCObjectDisassembler creates a module from an ObjectFile using a
  disassembler. It first builds an atom for each section. It can also
  construct the CFG, and this splits the text atoms into basic blocks.

MCModule and MCAtom were only sketched out; MCFunction and MCBB were
implemented under the experimental "-cfg" llvm-objdump -macho option.
This cleans them up for further use; llvm-objdump -d -cfg now generates
graphviz files for each function found in the binary.

In the future, MCObjectDisassembler may be the right place to do
"intelligent" disassembly: for example, handling constant islands is just
a matter of splitting the atom, using information that may be available
in the ObjectFile. Also, better initial atom formation than just using
sections is possible using symbols (and things like Mach-O's
function_starts load command).

This brings two minor regressions in llvm-objdump -macho -cfg:
- The printing of a relocation's referenced symbol.
- An annotation on loop BBs, i.e., which are their own successor.

Relocation printing is replaced by the MCSymbolizer; the basic CFG
annotation will be superseded by more related functionality.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-24 01:07:04 +00:00
..
AsmParser Silence anonymous type in anonymous union warnings. 2013-03-15 00:42:55 +00:00
Disassembler AArch64: remove post-encoder method from FCMP (immediate) instructions. 2013-02-28 14:46:14 +00:00
InstPrinter Fix formatting in AArch64 backend. 2013-02-05 13:24:56 +00:00
MCTargetDesc MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
TargetInfo AArch64: enable MCJIT and tests now that everything passes. 2013-05-04 20:14:22 +00:00
Utils AArch64: add CMake dependency to fix very parallel builds 2013-05-18 08:17:47 +00:00
AArch64.h AArch64: add branch fixup pass. 2013-02-15 14:32:20 +00:00
AArch64.td AArch64: add block comments where missing 2013-02-14 16:17:01 +00:00
AArch64AsmPrinter.cpp AArch64: remove ConstantIsland pass & put literals in separate section. 2013-02-15 09:33:43 +00:00
AArch64AsmPrinter.h AArch64: remove ConstantIsland pass & put literals in separate section. 2013-02-15 09:33:43 +00:00
AArch64BranchFixupPass.cpp AArch64: add branch fixup pass. 2013-02-15 14:32:20 +00:00
AArch64CallingConv.td
AArch64FrameLowering.cpp Remove addFrameMove. 2013-05-16 21:02:15 +00:00
AArch64FrameLowering.h Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo 2013-02-21 20:05:00 +00:00
AArch64InstrFormats.td AArch64 InstrFormats: 2013-04-28 01:45:11 +00:00
AArch64InstrInfo.cpp Switch to LLVM support function abs64 to keep VS2008 happy. 2013-03-27 13:15:08 +00:00
AArch64InstrInfo.h AArch64: add branch fixup pass. 2013-02-15 14:32:20 +00:00
AArch64InstrInfo.td AArch64: implement large code model access to global variables. 2013-05-04 16:53:46 +00:00
AArch64ISelDAGToDAG.cpp AArch64: support literal pool access in large memory model. 2013-05-04 16:54:07 +00:00
AArch64ISelLowering.cpp Add LLVMContext argument to getSetCCResultType 2013-05-18 00:21:46 +00:00
AArch64ISelLowering.h Add LLVMContext argument to getSetCCResultType 2013-05-18 00:21:46 +00:00
AArch64MachineFunctionInfo.cpp AArch64: add block comments where missing 2013-02-14 16:17:01 +00:00
AArch64MachineFunctionInfo.h AArch64: remove ConstantIsland pass & put literals in separate section. 2013-02-15 09:33:43 +00:00
AArch64MCInstLower.cpp AArch64: implement large code model access to global variables. 2013-05-04 16:53:46 +00:00
AArch64RegisterInfo.cpp Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo 2013-02-21 20:05:00 +00:00
AArch64RegisterInfo.h Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo 2013-02-21 20:05:00 +00:00
AArch64RegisterInfo.td AArch64: add block comments where missing 2013-02-14 16:17:01 +00:00
AArch64Schedule.td
AArch64SelectionDAGInfo.cpp
AArch64SelectionDAGInfo.h Fix formatting in AArch64 backend. 2013-02-05 13:24:56 +00:00
AArch64Subtarget.cpp
AArch64Subtarget.h
AArch64TargetMachine.cpp Remove the MachineMove class. 2013-05-13 01:16:13 +00:00
AArch64TargetMachine.h
AArch64TargetObjectFile.cpp AArch64: add block comments where missing 2013-02-14 16:17:01 +00:00
AArch64TargetObjectFile.h AArch64: add block comments where missing 2013-02-14 16:17:01 +00:00
CMakeLists.txt AArch64: add branch fixup pass. 2013-02-15 14:32:20 +00:00
LLVMBuild.txt Build system changes to enable MCJIT on AArch64 2013-05-04 20:13:52 +00:00
Makefile Remove cyclic dependency in AArch64 libraries 2013-02-05 13:24:47 +00:00
README.txt

This file will contain changes that need to be made before AArch64 can become an
officially supported target. Currently a placeholder.