llvm-project/llvm/lib/Target/AMDGPU
Matthias Braun 733fe3676c 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

llvm-svn: 279602
2016-08-24 01:52:46 +00:00
..
AsmParser AMDGPU: Remove excessive padding from ImmOp and RegOp. 2016-08-16 20:28:06 +00:00
Disassembler AMDGPU: Expand register indexing pseudos in custom inserter 2016-07-19 00:35:03 +00:00
InstPrinter [AMDGPU] fix failure on printing of non-existing instruction operands. 2016-08-15 10:56:48 +00:00
MCTargetDesc AMDGPU: Prune includes 2016-08-11 19:18:50 +00:00
TargetInfo Remove autoconf support 2016-01-26 21:29:08 +00:00
Utils [AMDGPU] Enable absolute expression initializer for amd_kernel_code_t fields. 2016-06-23 14:13:06 +00:00
AMDGPU.h AMDGPU: Split SILowerControlFlow into two pieces 2016-08-22 19:33:16 +00:00
AMDGPU.td AMDGPU: Add feature for unaligned access 2016-07-01 23:03:44 +00:00
AMDGPUAlwaysInlinePass.cpp Cloning: Clean up the interface to the CloneFunction function. 2016-05-10 20:23:24 +00:00
AMDGPUAnnotateKernelFeatures.cpp AMDGPU: Prune includes 2016-08-11 19:18:50 +00:00
AMDGPUAnnotateUniformValues.cpp Add optimization bisect opt-in calls for AMDGPU passes 2016-04-25 22:23:44 +00:00
AMDGPUAsmPrinter.cpp Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
AMDGPUAsmPrinter.h AMDGPU: Delete more dead code 2016-07-22 17:01:25 +00:00
AMDGPUCallLowering.cpp GlobalISel: implement simple function calls on AArch64. 2016-08-10 21:44:01 +00:00
AMDGPUCallLowering.h GlobalISel: implement simple function calls on AArch64. 2016-08-10 21:44:01 +00:00
AMDGPUCallingConv.td AMDGPU: Fix kernel argument alignment impacting stack size 2016-06-18 05:15:53 +00:00
AMDGPUCodeGenPrepare.cpp AMDGPU: Use rcp for fdiv 1, x with fpmath metadata 2016-07-26 23:25:44 +00:00
AMDGPUFrameLowering.cpp MachineFunction: Return reference for getFrameInfo(); NFC 2016-07-28 18:40:00 +00:00
AMDGPUFrameLowering.h AMDGPU: Move R600 only pieces into R600 classes 2016-07-09 18:11:15 +00:00
AMDGPUISelDAGToDAG.cpp MachineFunction: Return reference for getFrameInfo(); NFC 2016-07-28 18:40:00 +00:00
AMDGPUISelLowering.cpp [X86] Heuristic to selectively build Newton-Raphson SQRT estimation 2016-08-04 12:47:28 +00:00
AMDGPUISelLowering.h [X86] Heuristic to selectively build Newton-Raphson SQRT estimation 2016-08-04 12:47:28 +00:00
AMDGPUInstrInfo.cpp AMDGPU: Move R600 only pieces into R600 classes 2016-07-09 18:11:15 +00:00
AMDGPUInstrInfo.h AMDGPU/R600: Remove macros 2016-08-13 01:43:46 +00:00
AMDGPUInstrInfo.td AMDGPU : Add intrinsics for compare with the full wavefront result 2016-07-28 16:42:13 +00:00
AMDGPUInstructions.td AMDGPU: Fix i1 fp_to_int 2016-07-22 17:01:21 +00:00
AMDGPUIntrinsicInfo.cpp AMDGPU: Change fdiv lowering based on !fpmath metadata 2016-07-19 23:16:53 +00:00
AMDGPUIntrinsicInfo.h AMDGPU: Change fdiv lowering based on !fpmath metadata 2016-07-19 23:16:53 +00:00
AMDGPUIntrinsics.td AMDGPU: Remove read_workdim intrinsic 2016-07-25 20:17:02 +00:00
AMDGPUMCInstLower.cpp AMDGPU/SI: Add support for R_AMDGPU_GOTPCREL 2016-07-13 14:23:33 +00:00
AMDGPUMCInstLower.h AMDGPU: Remove empty file comment 2016-08-10 19:11:48 +00:00
AMDGPUMachineFunction.cpp AMDGPU: Make AMDGPUMachineFunction fields private 2016-07-26 16:45:58 +00:00
AMDGPUMachineFunction.h AMDGPU: Make AMDGPUMachineFunction fields private 2016-07-26 16:45:58 +00:00
AMDGPUOpenCLImageTypeLoweringPass.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
AMDGPUPromoteAlloca.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
AMDGPURegisterInfo.cpp AMDGPU: Move R600 only pieces into R600 classes 2016-07-09 18:11:15 +00:00
AMDGPURegisterInfo.h AMDGPU: Move R600 only pieces into R600 classes 2016-07-09 18:11:15 +00:00
AMDGPURegisterInfo.td AMDGPU: Set SubRegIndex size and offset 2015-07-30 17:03:11 +00:00
AMDGPURuntimeMetadata.h AMDGPU: Update AMDGPURuntimeMetadata.h for enums of address space qualifiers 2016-08-15 16:54:25 +00:00
AMDGPUSubtarget.cpp AMDGPU: Fix crashes on memory functions 2016-08-11 17:31:42 +00:00
AMDGPUSubtarget.h AMDGPU: Fix crashes on memory functions 2016-08-11 17:31:42 +00:00
AMDGPUTargetMachine.cpp AMDGPU: Split SILowerControlFlow into two pieces 2016-08-22 19:33:16 +00:00
AMDGPUTargetMachine.h AMDGPU: Delete more dead code 2016-07-22 17:01:25 +00:00
AMDGPUTargetObjectFile.cpp Revert "[AMDGPU] Emit read-only data to .rodata for hsa" 2016-07-22 23:46:40 +00:00
AMDGPUTargetObjectFile.h AMDGPU/SI: Add support for AMD code object version 2. 2016-05-05 17:03:33 +00:00
AMDGPUTargetTransformInfo.cpp AMDGPU: Implement getLoadStoreVecRegBitWidth 2016-07-01 00:56:27 +00:00
AMDGPUTargetTransformInfo.h [TTI] The cost model should not assume vector casts get completely scalarized 2016-07-06 17:30:56 +00:00
AMDILCFGStructurizer.cpp CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses 2016-08-24 01:52:46 +00:00
AMDKernelCodeT.h [AMDGPU] fix amd_kernel_code_t bit field position as per spec (added missing reserved fields) 2016-02-24 10:54:25 +00:00
CIInstructions.td AMDGPU : Fix QSAD and MQSAD instructions' incorrect data type. 2016-08-18 19:51:14 +00:00
CMakeLists.txt AMDGPU: Split SILowerControlFlow into two pieces 2016-08-22 19:33:16 +00:00
CaymanInstructions.td AMDGPU/R600: Convert buffer id to VTX_READ input 2016-08-15 21:38:30 +00:00
DSInstructions.td [AMDGPU] refactor DS instruction definitions. NFC. 2016-08-01 14:21:30 +00:00
EvergreenInstructions.td AMDGPU/R600: Convert buffer id to VTX_READ input 2016-08-15 21:38:30 +00:00
GCNHazardRecognizer.cpp AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
GCNHazardRecognizer.h AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
LLVMBuild.txt AMDGPU: Prune AMDGPUAsmParser in libdeps. 2016-07-09 07:54:27 +00:00
Processors.td AMDGPU: Fix crashes on unknown processor name 2016-06-02 18:37:16 +00:00
R600ClauseMergePass.cpp AMDGPU: Remove implicit iterator conversions, NFC 2016-07-08 19:16:05 +00:00
R600ControlFlowFinalizer.cpp AMDGPU: Avoid looking for the DebugLoc in end() 2016-08-17 00:06:43 +00:00
R600Defines.h AMDGPU: R600 code splitting cleanup 2016-03-11 08:00:27 +00:00
R600EmitClauseMarkers.cpp Fix more dereferenced end() iterators after r278532 2016-08-13 01:12:49 +00:00
R600ExpandSpecialInstrs.cpp AMDGPU: Delete more dead code 2016-07-22 17:01:25 +00:00
R600FrameLowering.cpp AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
R600FrameLowering.h AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
R600ISelLowering.cpp Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
R600ISelLowering.h AMDGPU: Fix i1 fp_to_int 2016-07-22 17:01:21 +00:00
R600InstrFormats.td AMDGPU/R600: Convert buffer id to VTX_READ input 2016-08-15 21:38:30 +00:00
R600InstrInfo.cpp AMDGPU/R600: Remove macros 2016-08-13 01:43:46 +00:00
R600InstrInfo.h [AMDGPU] Give enum an explicit 64-bit type to fix MSVC 2013 failures 2016-08-15 23:54:44 +00:00
R600Instructions.td AMDGPU/R600: Convert buffer id to VTX_READ input 2016-08-15 21:38:30 +00:00
R600Intrinsics.td AMDGPU: Fix TargetPrefix for remaining r600 intrinsics 2016-07-15 21:27:08 +00:00
R600MachineFunctionInfo.cpp AMDGPU: Delete more dead code 2016-07-22 17:01:25 +00:00
R600MachineFunctionInfo.h AMDGPU: Delete more dead code 2016-07-22 17:01:25 +00:00
R600MachineScheduler.cpp CodeGen: Use MachineInstr& in TargetInstrInfo, NFC 2016-06-30 00:01:54 +00:00
R600MachineScheduler.h AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
R600OptimizeVectorRegisters.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
R600Packetizer.cpp CodeGen: Use MachineInstr& in TargetInstrInfo, NFC 2016-06-30 00:01:54 +00:00
R600RegisterInfo.cpp AMDGPU: Move R600 only pieces into R600 classes 2016-07-09 18:11:15 +00:00
R600RegisterInfo.h AMDGPU: Move R600 only pieces into R600 classes 2016-07-09 18:11:15 +00:00
R600RegisterInfo.td
R600Schedule.td AMDGPU: Fix trailing whitespace 2016-06-10 02:18:02 +00:00
R700Instructions.td
SIAnnotateControlFlow.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
SIDebuggerInsertNops.cpp AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
SIDefines.h AMDGPU: Stay in WQM for non-intrinsic stores 2016-08-02 19:31:14 +00:00
SIFixControlFlowLiveIntervals.cpp Revert "AMDGPU: Remove unused control flow intrinsic" 2016-07-09 17:18:39 +00:00
SIFixSGPRCopies.cpp Revert "AMDGPU: Remove unused control flow intrinsic" 2016-07-09 17:18:39 +00:00
SIFoldOperands.cpp AMDGPU: Don't fold subregister extracts into tied operands 2016-08-15 16:18:36 +00:00
SIFrameLowering.cpp AMDGPU: Use CreateStackObject instead of CreateSpillStackObject 2016-08-10 19:11:36 +00:00
SIFrameLowering.h [AMDGPU] Emit debugger prologue and emit the rest of the debugger fields in the kernel code header 2016-06-25 03:11:28 +00:00
SIISelLowering.cpp Untabify. 2016-08-22 00:58:04 +00:00
SIISelLowering.h AMDGPU: Remove analyzeImmediate 2016-07-28 00:32:02 +00:00
SIInsertSkips.cpp AMDGPU: Split SILowerControlFlow into two pieces 2016-08-22 19:33:16 +00:00
SIInsertWaits.cpp AMDGPU: Remove implicit iterator conversions, NFC 2016-07-08 19:16:05 +00:00
SIInstrFormats.td AMDGPU: Stay in WQM for non-intrinsic stores 2016-08-02 19:31:14 +00:00
SIInstrInfo.cpp Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
SIInstrInfo.h AMDGPU: Fix not estimating MBB operand sizes correctly 2016-08-13 01:43:54 +00:00
SIInstrInfo.td AMDGPU : Fix QSAD and MQSAD instructions' incorrect data type. 2016-08-18 19:51:14 +00:00
SIInstructions.td AMDGPU: Split SILowerControlFlow into two pieces 2016-08-22 19:33:16 +00:00
SIIntrinsics.td AMDGPU: Change fdiv lowering based on !fpmath metadata 2016-07-19 23:16:53 +00:00
SILoadStoreOptimizer.cpp MachineFunction: Introduce NoPHIs property 2016-08-23 21:19:49 +00:00
SILowerControlFlow.cpp AMDGPU: Split SILowerControlFlow into two pieces 2016-08-22 19:33:16 +00:00
SILowerI1Copies.cpp AMDGPU: Cleanup subtarget handling. 2016-06-24 06:30:11 +00:00
SIMachineFunctionInfo.cpp AMDGPU: Remove unused tracking of flat instructions 2016-08-11 17:15:28 +00:00
SIMachineFunctionInfo.h AMDGPU: Remove unused tracking of flat instructions 2016-08-11 17:15:28 +00:00
SIMachineScheduler.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
SIMachineScheduler.h AMDGPU: R600 code splitting cleanup 2016-03-11 08:00:27 +00:00
SIRegisterInfo.cpp AMDGPU: Remove custom getSubReg 2016-08-11 17:15:32 +00:00
SIRegisterInfo.h AMDGPU: Remove custom getSubReg 2016-08-11 17:15:32 +00:00
SIRegisterInfo.td [AMDGPU] Some code cleaning in SIRegisterInfo.td 2016-07-21 13:29:57 +00:00
SISchedule.td AMDGPU: Define a schedule class for COPY. 2016-06-24 23:52:11 +00:00
SIShrinkInstructions.cpp AMDGPU: Expand register indexing pseudos in custom inserter 2016-07-19 00:35:03 +00:00
SITypeRewriter.cpp AMDGPU: Add a shader calling convention 2016-04-06 19:40:20 +00:00
SIWholeQuadMode.cpp AMDGPU: Stay in WQM for non-intrinsic stores 2016-08-02 19:31:14 +00:00
VIInstrFormats.td [AMDGPU] refactor DS instruction definitions. NFC. 2016-08-01 14:21:30 +00:00
VIInstructions.td [AMDGPU] refactor DS instruction definitions. NFC. 2016-08-01 14:21:30 +00:00