1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/tools/opt
Francis Visoiu Mistrih 5f6c901f02 [LegacyPassManager] Remove TargetMachine constructors
This provides a new way to access the TargetMachine through
TargetPassConfig, as a dependency.

The patterns replaced here are:

* Passes handling a null TargetMachine call
  `getAnalysisIfAvailable<TargetPassConfig>`.

* Passes not handling a null TargetMachine
  `addRequired<TargetPassConfig>` and call
  `getAnalysis<TargetPassConfig>`.

* MachineFunctionPasses now use MF.getTarget().

* Remove all the TargetMachine constructors.
* Remove INITIALIZE_TM_PASS.

This fixes a crash when running `llc -start-before prologepilog`.

PEI needs StackProtector, which gets constructed without a TargetMachine
by the pass manager. The StackProtector pass doesn't handle the case
where there is no TargetMachine, so it segfaults.

Related to PR30324.

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

llvm-svn: 303360
2017-05-18 17:21:13 +00:00
..
AnalysisWrappers.cpp
BreakpointPrinter.cpp Turn DISubprogram into a variable-length node. 2017-04-26 23:59:52 +00:00
BreakpointPrinter.h
CMakeLists.txt [CMake] opt depends on intrinsics_gen 2016-11-19 03:18:50 +00:00
GraphPrinters.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
LLVMBuild.txt
NewPMDriver.cpp [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
NewPMDriver.h
opt.cpp [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
PassPrinters.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 16:43:50 +00:00
PassPrinters.h
PrintSCC.cpp