OSDN Git Service

CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
authorMatthias Braun <matze@braunis.de>
Wed, 24 Aug 2016 01:52:46 +0000 (01:52 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 24 Aug 2016 01:52:46 +0000 (01:52 +0000)
commitfa5c5c7db35204b300c05e4bed636521dd5935f3
tree4246f2b454754ee6aff02f27d80014163bc6a53a
parent0c7940eaf1fbddc9e9d10650b51dff84a9b68e8d
CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses

Re-apply this patch, hopefully I will get away without any warnings
in the constructor now.

This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.

This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.

Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.

Differential Revision: http://reviews.llvm.org/D23736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279602 91177308-0d34-0410-b5e6-96231b3b80d8
24 files changed:
include/llvm/CodeGen/MachineFunctionAnalysis.h [deleted file]
include/llvm/CodeGen/MachineModuleInfo.h
include/llvm/CodeGen/Passes.h
include/llvm/Target/TargetMachine.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/LLVMTargetMachine.cpp
lib/CodeGen/MachineFunctionAnalysis.cpp [deleted file]
lib/CodeGen/MachineFunctionPass.cpp
lib/CodeGen/MachineModuleInfo.cpp
lib/CodeGen/StackMapLivenessAnalysis.cpp
lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
lib/Target/Hexagon/HexagonCommonGEP.cpp
lib/Target/Hexagon/HexagonGenExtract.cpp
lib/Target/Hexagon/HexagonNewValueJump.cpp
lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
lib/Target/NVPTX/NVPTXAllocaHoisting.cpp
lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
lib/Target/NVPTX/NVPTXTargetMachine.cpp
test/CodeGen/Generic/stop-after.ll
test/CodeGen/X86/hidden-vis-pic.ll
tools/llc/llc.cpp
unittests/MI/LiveIntervalTest.cpp