OSDN Git Service

Move most EH from MachineModuleInfo to MachineFunction
authorMatthias Braun <matze@braunis.de>
Thu, 1 Dec 2016 19:32:15 +0000 (19:32 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 1 Dec 2016 19:32:15 +0000 (19:32 +0000)
commit347847bcdc38f6c5dc5f73872ba29586832376f6
treec82ec1b652027edc79198cf51d2c724fb94e068e
parenteafdc6f2a2a9a137926db4e1c83728b5fdd9a9a7
Move most EH from MachineModuleInfo to MachineFunction

Recommitting r288293 with some extra fixes for GlobalISel code.

Most of the exception handling members in MachineModuleInfo is actually
per function data (talks about the "current function") so it is better
to keep it at the function instead of the module.

This is a necessary step to have machine module passes work properly.

Also:
- Rename TidyLandingPads() to tidyLandingPads()
- Use doxygen member groups instead of "//===- EH ---"... so it is clear
  where a group ends.
- I had to add an ugly const_cast at two places in the AsmPrinter
  because the available MachineFunction pointers are const, but the code
  wants to call tidyLandingPads() in between
  (markFunctionEnd()/endFunction()).

Differential Revision: https://reviews.llvm.org/D27227

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288405 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineModuleInfo.h
lib/CodeGen/Analysis.cpp
lib/CodeGen/AsmPrinter/ARMException.cpp
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
lib/CodeGen/AsmPrinter/EHStreamer.cpp
lib/CodeGen/AsmPrinter/WinException.cpp
lib/CodeGen/GlobalISel/IRTranslator.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/MachineModuleInfo.cpp
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/TargetFrameLoweringImpl.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/SystemZ/SystemZFrameLowering.cpp
lib/Target/X86/X86CallFrameOptimization.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86RegisterInfo.cpp
lib/Target/XCore/XCoreFrameLowering.cpp