Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 1 | //===-- CodeGen.cpp -------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements the common initialization routines for the |
| 11 | // CodeGen library. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 15 | #include "llvm-c/Initialization.h" |
Chandler Carruth | 6bda14b | 2017-06-06 11:49:48 +0000 | [diff] [blame] | 16 | #include "llvm/InitializePasses.h" |
Chandler Carruth | 8a8cd2b | 2014-01-07 11:48:04 +0000 | [diff] [blame] | 17 | #include "llvm/PassRegistry.h" |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 18 | |
| 19 | using namespace llvm; |
| 20 | |
| 21 | /// initializeCodeGen - Initialize all passes linked into the CodeGen library. |
| 22 | void llvm::initializeCodeGen(PassRegistry &Registry) { |
Robin Morisset | 59c23cd | 2014-08-21 21:50:01 +0000 | [diff] [blame] | 23 | initializeAtomicExpandPass(Registry); |
Andrew Trick | 58648e4 | 2012-02-08 21:22:48 +0000 | [diff] [blame] | 24 | initializeBranchFolderPassPass(Registry); |
Matt Arsenault | 36919a4 | 2016-10-06 15:38:53 +0000 | [diff] [blame] | 25 | initializeBranchRelaxationPass(Registry); |
Petar Jovanovic | e2bfcd6 | 2018-04-24 10:32:08 +0000 | [diff] [blame] | 26 | initializeCFIInstrInserterPass(Registry); |
Quentin Colombet | a349084 | 2014-02-22 00:07:45 +0000 | [diff] [blame] | 27 | initializeCodeGenPreparePass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 28 | initializeDeadMachineInstructionElimPass(Registry); |
Matthias Braun | fbe85ae | 2016-04-28 03:07:16 +0000 | [diff] [blame] | 29 | initializeDetectDeadLanesPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 30 | initializeDwarfEHPreparePass(Registry); |
Jakob Stoklund Olesen | f8a63a1 | 2012-07-04 00:09:54 +0000 | [diff] [blame] | 31 | initializeEarlyIfConverterPass(Registry); |
Matthias Braun | 4a7c8e7 | 2018-01-19 06:46:10 +0000 | [diff] [blame] | 32 | initializeEarlyMachineLICMPass(Registry); |
Matthias Braun | 3ab9fcb | 2018-01-19 06:08:17 +0000 | [diff] [blame] | 33 | initializeEarlyTailDuplicatePass(Registry); |
Chandler Carruth | 301ed0c | 2015-02-20 02:15:36 +0000 | [diff] [blame] | 34 | initializeExpandISelPseudosPass(Registry); |
Clement Courbet | 063bed9 | 2017-11-03 12:12:27 +0000 | [diff] [blame] | 35 | initializeExpandMemCmpPassPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 36 | initializeExpandPostRAPass(Registry); |
Nirav Dave | a7c041d | 2017-01-31 17:00:27 +0000 | [diff] [blame] | 37 | initializeFEntryInserterPass(Registry); |
Matthias Braun | 6e67052 | 2017-03-18 05:05:32 +0000 | [diff] [blame] | 38 | initializeFinalizeMachineBundlesPass(Registry); |
David Majnemer | 9789023 | 2015-09-17 20:45:18 +0000 | [diff] [blame] | 39 | initializeFuncletLayoutPass(Registry); |
Andrew Trick | 1fa5bcb | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 40 | initializeGCMachineCodeAnalysisPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 41 | initializeGCModuleInfoPass(Registry); |
| 42 | initializeIfConverterPass(Registry); |
Matthias Braun | 6e67052 | 2017-03-18 05:05:32 +0000 | [diff] [blame] | 43 | initializeImplicitNullChecksPass(Registry); |
Chandler Carruth | c58f216 | 2018-01-22 22:05:25 +0000 | [diff] [blame] | 44 | initializeIndirectBrExpandPassPass(Registry); |
Martin Elshuber | fef3036 | 2018-11-19 14:26:10 +0000 | [diff] [blame] | 45 | initializeInterleavedLoadCombinePass(Registry); |
Matthew Simpson | 330a125 | 2016-05-19 20:08:32 +0000 | [diff] [blame] | 46 | initializeInterleavedAccessPass(Registry); |
Matthias Braun | 6e67052 | 2017-03-18 05:05:32 +0000 | [diff] [blame] | 47 | initializeLiveDebugValuesPass(Registry); |
Jakob Stoklund Olesen | d4900a6 | 2010-11-30 02:17:10 +0000 | [diff] [blame] | 48 | initializeLiveDebugVariablesPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 49 | initializeLiveIntervalsPass(Registry); |
Dehao Chen | 6b737dd | 2017-05-31 23:25:25 +0000 | [diff] [blame] | 50 | initializeLiveRangeShrinkPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 51 | initializeLiveStacksPass(Registry); |
| 52 | initializeLiveVariablesPass(Registry); |
Andrew Trick | 1fa5bcb | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 53 | initializeLocalStackSlotPassPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 54 | initializeLowerIntrinsicsPass(Registry); |
Matthias Braun | bde0806 | 2018-07-26 00:27:49 +0000 | [diff] [blame] | 55 | initializeMIRCanonicalizerPass(Registry); |
Jakub Staszak | 875ebd5 | 2011-07-25 19:25:40 +0000 | [diff] [blame] | 56 | initializeMachineBlockFrequencyInfoPass(Registry); |
Chandler Carruth | 1028142 | 2011-10-21 06:46:38 +0000 | [diff] [blame] | 57 | initializeMachineBlockPlacementPass(Registry); |
Chandler Carruth | ae4e800 | 2011-11-02 07:17:12 +0000 | [diff] [blame] | 58 | initializeMachineBlockPlacementStatsPass(Registry); |
Chandler Carruth | 301ed0c | 2015-02-20 02:15:36 +0000 | [diff] [blame] | 59 | initializeMachineCSEPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 60 | initializeMachineCombinerPass(Registry); |
| 61 | initializeMachineCopyPropagationPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 62 | initializeMachineDominatorTreePass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 63 | initializeMachineFunctionPrinterPassPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 64 | initializeMachineLICMPass(Registry); |
| 65 | initializeMachineLoopInfoPass(Registry); |
| 66 | initializeMachineModuleInfoPass(Registry); |
Justin Bogner | 259a0cf | 2017-02-24 07:42:35 +0000 | [diff] [blame] | 67 | initializeMachineOptimizationRemarkEmitterPassPass(Registry); |
Jessica Paquette | 596f483 | 2017-03-06 21:31:18 +0000 | [diff] [blame] | 68 | initializeMachineOutlinerPass(Registry); |
Brendon Cahoon | 254f889 | 2016-07-29 16:44:44 +0000 | [diff] [blame] | 69 | initializeMachinePipelinerPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 70 | initializeMachinePostDominatorTreePass(Registry); |
Matthias Braun | 4313059 | 2017-02-18 00:41:16 +0000 | [diff] [blame] | 71 | initializeMachineRegionInfoPassPass(Registry); |
Andrew Trick | 1fa5bcb | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 72 | initializeMachineSchedulerPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 73 | initializeMachineSinkingPass(Registry); |
| 74 | initializeMachineVerifierPassPass(Registry); |
| 75 | initializeOptimizePHIsPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 76 | initializePEIPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 77 | initializePHIEliminationPass(Registry); |
Matthias Braun | 6e67052 | 2017-03-18 05:05:32 +0000 | [diff] [blame] | 78 | initializePatchableFunctionPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 79 | initializePeepholeOptimizerPass(Registry); |
Andrew Trick | 17080b9 | 2013-12-28 21:56:51 +0000 | [diff] [blame] | 80 | initializePostMachineSchedulerPass(Registry); |
Tom Stellard | ee34680 | 2016-04-22 14:43:50 +0000 | [diff] [blame] | 81 | initializePostRAHazardRecognizerPass(Registry); |
Jun Bum Lim | 2ecb7ba | 2018-03-22 20:06:47 +0000 | [diff] [blame] | 82 | initializePostRAMachineSinkingPass(Registry); |
Andrew Trick | 1fa5bcb | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 83 | initializePostRASchedulerPass(Registry); |
Michael Kuperstein | 82d5da5 | 2016-06-24 20:13:42 +0000 | [diff] [blame] | 84 | initializePreISelIntrinsicLoweringLegacyPassPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 85 | initializeProcessImplicitDefsPass(Registry); |
Quentin Colombet | ebbaed6 | 2017-06-02 22:46:26 +0000 | [diff] [blame] | 86 | initializeRABasicPass(Registry); |
Tom Stellard | 11e60ff | 2016-11-14 21:50:13 +0000 | [diff] [blame] | 87 | initializeRAGreedyPass(Registry); |
Matthias Braun | bde0806 | 2018-07-26 00:27:49 +0000 | [diff] [blame] | 88 | initializeRegAllocFastPass(Registry); |
Matthias Braun | 5c1e23b | 2018-07-26 00:27:51 +0000 | [diff] [blame] | 89 | initializeRegUsageInfoCollectorPass(Registry); |
| 90 | initializeRegUsageInfoPropagationPass(Registry); |
Rafael Espindola | 676c405 | 2011-06-26 22:34:10 +0000 | [diff] [blame] | 91 | initializeRegisterCoalescerPass(Registry); |
Matthias Braun | f9acaca | 2016-05-31 22:38:06 +0000 | [diff] [blame] | 92 | initializeRenameIndependentSubregsPass(Registry); |
Ahmed Bougacha | 00d6822 | 2017-05-10 00:39:22 +0000 | [diff] [blame] | 93 | initializeSafeStackLegacyPassPass(Registry); |
Ayman Musa | c5490e5 | 2017-05-15 11:30:54 +0000 | [diff] [blame] | 94 | initializeScalarizeMaskedMemIntrinPass(Registry); |
Quentin Colombet | 61b305e | 2015-05-05 17:38:16 +0000 | [diff] [blame] | 95 | initializeShrinkWrapPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 96 | initializeSlotIndexesPass(Registry); |
Chandler Carruth | 301ed0c | 2015-02-20 02:15:36 +0000 | [diff] [blame] | 97 | initializeStackColoringPass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 98 | initializeStackMapLivenessPass(Registry); |
| 99 | initializeStackProtectorPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 100 | initializeStackSlotColoringPass(Registry); |
Matthias Braun | 3ab9fcb | 2018-01-19 06:08:17 +0000 | [diff] [blame] | 101 | initializeTailDuplicatePass(Registry); |
Andrew Trick | b755133 | 2012-02-04 02:56:45 +0000 | [diff] [blame] | 102 | initializeTargetPassConfigPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 103 | initializeTwoAddressInstructionPassPass(Registry); |
Andrew Trick | 1fa5bcb | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 104 | initializeUnpackMachineBundlesPass(Registry); |
Wei Mi | 90d195a | 2016-07-08 03:32:49 +0000 | [diff] [blame] | 105 | initializeUnreachableBlockElimLegacyPassPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 106 | initializeUnreachableMachineBlockElimPass(Registry); |
| 107 | initializeVirtRegMapPass(Registry); |
Jakob Stoklund Olesen | 1224312 | 2012-06-08 23:44:45 +0000 | [diff] [blame] | 108 | initializeVirtRegRewriterPass(Registry); |
Heejin Ahn | 99d60e0 | 2018-05-31 22:02:34 +0000 | [diff] [blame] | 109 | initializeWasmEHPreparePass(Registry); |
Reid Kleckner | be0a050 | 2015-03-09 22:45:16 +0000 | [diff] [blame] | 110 | initializeWinEHPreparePass(Registry); |
Matthias Braun | 6e67052 | 2017-03-18 05:05:32 +0000 | [diff] [blame] | 111 | initializeXRayInstrumentationPass(Registry); |
Owen Anderson | 80fc076 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | void LLVMInitializeCodeGen(LLVMPassRegistryRef R) { |
| 115 | initializeCodeGen(*unwrap(R)); |
| 116 | } |