Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- HexagonTargetMachine.cpp - Define TargetMachine for Hexagon -------===// |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 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 | // |
Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 10 | // Implements the info about Hexagon target spec. |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 14 | #include "HexagonTargetMachine.h" |
| 15 | #include "Hexagon.h" |
| 16 | #include "HexagonISelLowering.h" |
Sergei Larin | 4d8986a | 2012-09-04 14:49:56 +0000 | [diff] [blame] | 17 | #include "HexagonMachineScheduler.h" |
Jyotsna Verma | 5eb5980 | 2013-05-07 19:53:00 +0000 | [diff] [blame] | 18 | #include "HexagonTargetObjectFile.h" |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 19 | #include "HexagonTargetTransformInfo.h" |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 20 | #include "llvm/CodeGen/Passes.h" |
Matthias Braun | 31d19d4 | 2016-05-10 03:21:59 +0000 | [diff] [blame] | 21 | #include "llvm/CodeGen/TargetPassConfig.h" |
Chandler Carruth | 30d69c2 | 2015-02-13 10:01:29 +0000 | [diff] [blame] | 22 | #include "llvm/IR/LegacyPassManager.h" |
Chandler Carruth | 9fb823b | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 23 | #include "llvm/IR/Module.h" |
Benjamin Kramer | ae87d7b | 2012-02-06 10:19:29 +0000 | [diff] [blame] | 24 | #include "llvm/Support/CommandLine.h" |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 25 | #include "llvm/Support/TargetRegistry.h" |
Krzysztof Parzyszek | c8b9438 | 2017-01-26 21:41:10 +0000 | [diff] [blame] | 26 | #include "llvm/Transforms/IPO/PassManagerBuilder.h" |
Chandler Carruth | 6bda14b | 2017-06-06 11:49:48 +0000 | [diff] [blame] | 27 | #include "llvm/Transforms/Scalar.h" |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 28 | |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 29 | using namespace llvm; |
| 30 | |
Krzysztof Parzyszek | 7c9c058 | 2017-10-13 19:02:59 +0000 | [diff] [blame] | 31 | static cl::opt<bool> EnableCExtOpt("hexagon-cext", cl::Hidden, cl::ZeroOrMore, |
| 32 | cl::init(true), cl::desc("Enable Hexagon constant-extender optimization")); |
| 33 | |
Krzysztof Parzyszek | 1279881 | 2016-01-12 19:09:01 +0000 | [diff] [blame] | 34 | static cl::opt<bool> EnableRDFOpt("rdf-opt", cl::Hidden, cl::ZeroOrMore, |
| 35 | cl::init(true), cl::desc("Enable RDF-based optimizations")); |
| 36 | |
| 37 | static cl::opt<bool> DisableHardwareLoops("disable-hexagon-hwloops", |
Krzysztof Parzyszek | c05dff1 | 2015-03-31 13:35:12 +0000 | [diff] [blame] | 38 | cl::Hidden, cl::desc("Disable Hardware Loops for Hexagon target")); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 39 | |
Krzysztof Parzyszek | f5cbac9 | 2016-04-29 15:49:13 +0000 | [diff] [blame] | 40 | static cl::opt<bool> DisableAModeOpt("disable-hexagon-amodeopt", |
| 41 | cl::Hidden, cl::ZeroOrMore, cl::init(false), |
| 42 | cl::desc("Disable Hexagon Addressing Mode Optimization")); |
| 43 | |
Jyotsna Verma | 653d883 | 2013-03-27 11:14:24 +0000 | [diff] [blame] | 44 | static cl::opt<bool> DisableHexagonCFGOpt("disable-hexagon-cfgopt", |
Krzysztof Parzyszek | c05dff1 | 2015-03-31 13:35:12 +0000 | [diff] [blame] | 45 | cl::Hidden, cl::ZeroOrMore, cl::init(false), |
| 46 | cl::desc("Disable Hexagon CFG Optimization")); |
| 47 | |
Krzysztof Parzyszek | 167d918 | 2016-07-28 20:01:59 +0000 | [diff] [blame] | 48 | static cl::opt<bool> DisableHCP("disable-hcp", cl::init(false), cl::Hidden, |
| 49 | cl::ZeroOrMore, cl::desc("Disable Hexagon constant propagation")); |
| 50 | |
Krzysztof Parzyszek | 5b7dd0c | 2015-10-16 19:43:56 +0000 | [diff] [blame] | 51 | static cl::opt<bool> DisableStoreWidening("disable-store-widen", |
| 52 | cl::Hidden, cl::init(false), cl::desc("Disable store widening")); |
| 53 | |
Krzysztof Parzyszek | c05dff1 | 2015-03-31 13:35:12 +0000 | [diff] [blame] | 54 | static cl::opt<bool> EnableExpandCondsets("hexagon-expand-condsets", |
| 55 | cl::init(true), cl::Hidden, cl::ZeroOrMore, |
| 56 | cl::desc("Early expansion of MUX")); |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 57 | |
Krzysztof Parzyszek | fb33824 | 2015-10-06 15:49:14 +0000 | [diff] [blame] | 58 | static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden, |
| 59 | cl::ZeroOrMore, cl::desc("Enable early if-conversion")); |
| 60 | |
Krzysztof Parzyszek | 21b53a5 | 2015-07-08 14:47:34 +0000 | [diff] [blame] | 61 | static cl::opt<bool> EnableGenInsert("hexagon-insert", cl::init(true), |
| 62 | cl::Hidden, cl::desc("Generate \"insert\" instructions")); |
Jyotsna Verma | 653d883 | 2013-03-27 11:14:24 +0000 | [diff] [blame] | 63 | |
Krzysztof Parzyszek | 79b2433 | 2015-07-08 19:22:28 +0000 | [diff] [blame] | 64 | static cl::opt<bool> EnableCommGEP("hexagon-commgep", cl::init(true), |
| 65 | cl::Hidden, cl::ZeroOrMore, cl::desc("Enable commoning of GEP instructions")); |
| 66 | |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 67 | static cl::opt<bool> EnableGenExtract("hexagon-extract", cl::init(true), |
| 68 | cl::Hidden, cl::desc("Generate \"extract\" instructions")); |
Krzysztof Parzyszek | 79b2433 | 2015-07-08 19:22:28 +0000 | [diff] [blame] | 69 | |
Krzysztof Parzyszek | 9217220 | 2015-07-20 21:23:25 +0000 | [diff] [blame] | 70 | static cl::opt<bool> EnableGenMux("hexagon-mux", cl::init(true), cl::Hidden, |
| 71 | cl::desc("Enable converting conditional transfers into MUX instructions")); |
| 72 | |
Krzysztof Parzyszek | 7587447 | 2015-07-14 19:30:21 +0000 | [diff] [blame] | 73 | static cl::opt<bool> EnableGenPred("hexagon-gen-pred", cl::init(true), |
| 74 | cl::Hidden, cl::desc("Enable conversion of arithmetic operations to " |
| 75 | "predicate instructions")); |
| 76 | |
Krzysztof Parzyszek | d3d0a4b | 2016-07-22 14:22:43 +0000 | [diff] [blame] | 77 | static cl::opt<bool> EnableLoopPrefetch("hexagon-loop-prefetch", |
| 78 | cl::init(false), cl::Hidden, cl::ZeroOrMore, |
| 79 | cl::desc("Enable loop data prefetch on Hexagon")); |
| 80 | |
Krzysztof Parzyszek | a7c5f04 | 2015-10-16 20:38:54 +0000 | [diff] [blame] | 81 | static cl::opt<bool> DisableHSDR("disable-hsdr", cl::init(false), cl::Hidden, |
| 82 | cl::desc("Disable splitting double registers")); |
| 83 | |
Krzysztof Parzyszek | ced9941 | 2015-10-20 22:57:13 +0000 | [diff] [blame] | 84 | static cl::opt<bool> EnableBitSimplify("hexagon-bit", cl::init(true), |
| 85 | cl::Hidden, cl::desc("Bit simplification")); |
| 86 | |
| 87 | static cl::opt<bool> EnableLoopResched("hexagon-loop-resched", cl::init(true), |
| 88 | cl::Hidden, cl::desc("Loop rescheduling")); |
| 89 | |
Krzysztof Parzyszek | d559005 | 2016-05-11 15:01:30 +0000 | [diff] [blame] | 90 | static cl::opt<bool> HexagonNoOpt("hexagon-noopt", cl::init(false), |
| 91 | cl::Hidden, cl::desc("Disable backend optimizations")); |
| 92 | |
Ron Lieberman | 8123b96 | 2016-08-01 19:36:39 +0000 | [diff] [blame] | 93 | static cl::opt<bool> EnableVectorPrint("enable-hexagon-vector-print", |
| 94 | cl::Hidden, cl::ZeroOrMore, cl::init(false), |
| 95 | cl::desc("Enable Hexagon Vector print instr pass")); |
| 96 | |
Krzysztof Parzyszek | 95614ac | 2018-01-26 21:17:14 +0000 | [diff] [blame] | 97 | static cl::opt<bool> EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden, |
| 98 | cl::ZeroOrMore, cl::init(true), cl::desc("Enable vextract optimization")); |
| 99 | |
Krzysztof Parzyszek | d91a9e2 | 2018-08-02 22:17:53 +0000 | [diff] [blame] | 100 | static cl::opt<bool> EnableInitialCFGCleanup("hexagon-initial-cfg-cleanup", |
| 101 | cl::Hidden, cl::ZeroOrMore, cl::init(true), |
| 102 | cl::desc("Simplify the CFG after atomic expansion pass")); |
| 103 | |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 104 | /// HexagonTargetMachineModule - Note that this is used on hosts that |
| 105 | /// cannot link in a library unless there are references into the |
| 106 | /// library. In particular, it seems that it is not possible to get |
| 107 | /// things to work on Win32 without this. Though it is unused, do not |
| 108 | /// remove it. |
| 109 | extern "C" int HexagonTargetMachineModule; |
| 110 | int HexagonTargetMachineModule = 0; |
| 111 | |
Sergei Larin | 4d8986a | 2012-09-04 14:49:56 +0000 | [diff] [blame] | 112 | static ScheduleDAGInstrs *createVLIWMachineSched(MachineSchedContext *C) { |
Krzysztof Parzyszek | 697297a | 2017-08-28 15:52:54 +0000 | [diff] [blame] | 113 | ScheduleDAGMILive *DAG = |
| 114 | new VLIWMachineScheduler(C, make_unique<ConvergingVLIWScheduler>()); |
Krzysztof Parzyszek | 95da97e | 2017-08-28 16:24:22 +0000 | [diff] [blame] | 115 | DAG->addMutation(make_unique<HexagonSubtarget::UsrOverflowMutation>()); |
| 116 | DAG->addMutation(make_unique<HexagonSubtarget::HVXMemLatencyMutation>()); |
| 117 | DAG->addMutation(make_unique<HexagonSubtarget::CallMutation>()); |
Krzysztof Parzyszek | 697297a | 2017-08-28 15:52:54 +0000 | [diff] [blame] | 118 | DAG->addMutation(createCopyConstrainDAGMutation(DAG->TII, DAG->TRI)); |
| 119 | return DAG; |
Sergei Larin | 4d8986a | 2012-09-04 14:49:56 +0000 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | static MachineSchedRegistry |
| 123 | SchedCustomRegistry("hexagon", "Run Hexagon's custom scheduler", |
| 124 | createVLIWMachineSched); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 125 | |
Krzysztof Parzyszek | c05dff1 | 2015-03-31 13:35:12 +0000 | [diff] [blame] | 126 | namespace llvm { |
Krzysztof Parzyszek | 951fb36 | 2016-08-24 22:27:36 +0000 | [diff] [blame] | 127 | extern char &HexagonExpandCondsetsID; |
Krzysztof Parzyszek | b404fae | 2018-02-20 14:29:43 +0000 | [diff] [blame] | 128 | void initializeHexagonBitSimplifyPass(PassRegistry&); |
Krzysztof Parzyszek | 7c9c058 | 2017-10-13 19:02:59 +0000 | [diff] [blame] | 129 | void initializeHexagonConstExtendersPass(PassRegistry&); |
Krzysztof Parzyszek | 96690ce | 2018-02-23 20:33:26 +0000 | [diff] [blame] | 130 | void initializeHexagonConstPropagationPass(PassRegistry&); |
Krzysztof Parzyszek | 1966fd7 | 2017-08-09 21:22:05 +0000 | [diff] [blame] | 131 | void initializeHexagonEarlyIfConversionPass(PassRegistry&); |
Krzysztof Parzyszek | 951fb36 | 2016-08-24 22:27:36 +0000 | [diff] [blame] | 132 | void initializeHexagonExpandCondsetsPass(PassRegistry&); |
Krzysztof Parzyszek | de2ac17 | 2017-06-13 16:07:36 +0000 | [diff] [blame] | 133 | void initializeHexagonGenMuxPass(PassRegistry&); |
Krzysztof Parzyszek | 3818aea | 2017-10-20 16:56:33 +0000 | [diff] [blame] | 134 | void initializeHexagonHardwareLoopsPass(PassRegistry&); |
Krzysztof Parzyszek | df4a05d | 2017-07-10 18:38:52 +0000 | [diff] [blame] | 135 | void initializeHexagonLoopIdiomRecognizePass(PassRegistry&); |
Pranav Bhandarkar | 931d0b7 | 2017-09-21 21:48:23 +0000 | [diff] [blame] | 136 | void initializeHexagonVectorLoopCarriedReusePass(PassRegistry&); |
Krzysztof Parzyszek | 5ddd2e5 | 2017-06-27 18:37:16 +0000 | [diff] [blame] | 137 | void initializeHexagonNewValueJumpPass(PassRegistry&); |
Krzysztof Parzyszek | df4a05d | 2017-07-10 18:38:52 +0000 | [diff] [blame] | 138 | void initializeHexagonOptAddrModePass(PassRegistry&); |
| 139 | void initializeHexagonPacketizerPass(PassRegistry&); |
Krzysztof Parzyszek | bef1c56 | 2017-10-30 14:11:52 +0000 | [diff] [blame] | 140 | void initializeHexagonRDFOptPass(PassRegistry&); |
Krzysztof Parzyszek | effcc2f | 2018-05-04 15:04:48 +0000 | [diff] [blame] | 141 | void initializeHexagonSplitDoubleRegsPass(PassRegistry&); |
Krzysztof Parzyszek | 95614ac | 2018-01-26 21:17:14 +0000 | [diff] [blame] | 142 | void initializeHexagonVExtractPass(PassRegistry&); |
Krzysztof Parzyszek | c8b9438 | 2017-01-26 21:41:10 +0000 | [diff] [blame] | 143 | Pass *createHexagonLoopIdiomPass(); |
Pranav Bhandarkar | 931d0b7 | 2017-09-21 21:48:23 +0000 | [diff] [blame] | 144 | Pass *createHexagonVectorLoopCarriedReusePass(); |
Krzysztof Parzyszek | 951fb36 | 2016-08-24 22:27:36 +0000 | [diff] [blame] | 145 | |
Krzysztof Parzyszek | ced9941 | 2015-10-20 22:57:13 +0000 | [diff] [blame] | 146 | FunctionPass *createHexagonBitSimplify(); |
Krzysztof Parzyszek | 7b59ae2 | 2016-04-19 18:30:18 +0000 | [diff] [blame] | 147 | FunctionPass *createHexagonBranchRelaxation(); |
Krzysztof Parzyszek | db86770 | 2015-10-19 17:46:01 +0000 | [diff] [blame] | 148 | FunctionPass *createHexagonCallFrameInformation(); |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 149 | FunctionPass *createHexagonCFGOptimizer(); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 150 | FunctionPass *createHexagonCommonGEP(); |
Krzysztof Parzyszek | 7c9c058 | 2017-10-13 19:02:59 +0000 | [diff] [blame] | 151 | FunctionPass *createHexagonConstExtenders(); |
Krzysztof Parzyszek | 167d918 | 2016-07-28 20:01:59 +0000 | [diff] [blame] | 152 | FunctionPass *createHexagonConstPropagationPass(); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 153 | FunctionPass *createHexagonCopyToCombine(); |
Krzysztof Parzyszek | fb33824 | 2015-10-06 15:49:14 +0000 | [diff] [blame] | 154 | FunctionPass *createHexagonEarlyIfConversion(); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 155 | FunctionPass *createHexagonFixupHwLoops(); |
| 156 | FunctionPass *createHexagonGenExtract(); |
Krzysztof Parzyszek | 21b53a5 | 2015-07-08 14:47:34 +0000 | [diff] [blame] | 157 | FunctionPass *createHexagonGenInsert(); |
Krzysztof Parzyszek | 9217220 | 2015-07-20 21:23:25 +0000 | [diff] [blame] | 158 | FunctionPass *createHexagonGenMux(); |
Krzysztof Parzyszek | 7587447 | 2015-07-14 19:30:21 +0000 | [diff] [blame] | 159 | FunctionPass *createHexagonGenPredicate(); |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 160 | FunctionPass *createHexagonHardwareLoops(); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 161 | FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM, |
| 162 | CodeGenOpt::Level OptLevel); |
Krzysztof Parzyszek | ced9941 | 2015-10-20 22:57:13 +0000 | [diff] [blame] | 163 | FunctionPass *createHexagonLoopRescheduling(); |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 164 | FunctionPass *createHexagonNewValueJump(); |
Krzysztof Parzyszek | 055c5fd | 2015-10-19 19:10:48 +0000 | [diff] [blame] | 165 | FunctionPass *createHexagonOptimizeSZextends(); |
Krzysztof Parzyszek | f5cbac9 | 2016-04-29 15:49:13 +0000 | [diff] [blame] | 166 | FunctionPass *createHexagonOptAddrMode(); |
Krzysztof Parzyszek | 39a979c | 2018-08-17 14:24:24 +0000 | [diff] [blame] | 167 | FunctionPass *createHexagonPacketizer(bool Minimal); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 168 | FunctionPass *createHexagonPeephole(); |
Krzysztof Parzyszek | 1279881 | 2016-01-12 19:09:01 +0000 | [diff] [blame] | 169 | FunctionPass *createHexagonRDFOpt(); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 170 | FunctionPass *createHexagonSplitConst32AndConst64(); |
Krzysztof Parzyszek | a7c5f04 | 2015-10-16 20:38:54 +0000 | [diff] [blame] | 171 | FunctionPass *createHexagonSplitDoubleRegs(); |
Krzysztof Parzyszek | 5b7dd0c | 2015-10-16 19:43:56 +0000 | [diff] [blame] | 172 | FunctionPass *createHexagonStoreWidening(); |
Ron Lieberman | 8123b96 | 2016-08-01 19:36:39 +0000 | [diff] [blame] | 173 | FunctionPass *createHexagonVectorPrint(); |
Krzysztof Parzyszek | 95614ac | 2018-01-26 21:17:14 +0000 | [diff] [blame] | 174 | FunctionPass *createHexagonVExtract(); |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 175 | } // end namespace llvm; |
Krzysztof Parzyszek | c05dff1 | 2015-03-31 13:35:12 +0000 | [diff] [blame] | 176 | |
Rafael Espindola | 8c34dd8 | 2016-05-18 22:04:49 +0000 | [diff] [blame] | 177 | static Reloc::Model getEffectiveRelocModel(Optional<Reloc::Model> RM) { |
| 178 | if (!RM.hasValue()) |
| 179 | return Reloc::Static; |
| 180 | return *RM; |
| 181 | } |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 182 | |
Krzysztof Parzyszek | c8b9438 | 2017-01-26 21:41:10 +0000 | [diff] [blame] | 183 | extern "C" void LLVMInitializeHexagonTarget() { |
| 184 | // Register the target. |
| 185 | RegisterTargetMachine<HexagonTargetMachine> X(getTheHexagonTarget()); |
Krzysztof Parzyszek | de2ac17 | 2017-06-13 16:07:36 +0000 | [diff] [blame] | 186 | |
| 187 | PassRegistry &PR = *PassRegistry::getPassRegistry(); |
Krzysztof Parzyszek | b404fae | 2018-02-20 14:29:43 +0000 | [diff] [blame] | 188 | initializeHexagonBitSimplifyPass(PR); |
Krzysztof Parzyszek | 7c9c058 | 2017-10-13 19:02:59 +0000 | [diff] [blame] | 189 | initializeHexagonConstExtendersPass(PR); |
Krzysztof Parzyszek | 96690ce | 2018-02-23 20:33:26 +0000 | [diff] [blame] | 190 | initializeHexagonConstPropagationPass(PR); |
Krzysztof Parzyszek | 1966fd7 | 2017-08-09 21:22:05 +0000 | [diff] [blame] | 191 | initializeHexagonEarlyIfConversionPass(PR); |
Krzysztof Parzyszek | de2ac17 | 2017-06-13 16:07:36 +0000 | [diff] [blame] | 192 | initializeHexagonGenMuxPass(PR); |
Krzysztof Parzyszek | 3818aea | 2017-10-20 16:56:33 +0000 | [diff] [blame] | 193 | initializeHexagonHardwareLoopsPass(PR); |
Krzysztof Parzyszek | df4a05d | 2017-07-10 18:38:52 +0000 | [diff] [blame] | 194 | initializeHexagonLoopIdiomRecognizePass(PR); |
Pranav Bhandarkar | 931d0b7 | 2017-09-21 21:48:23 +0000 | [diff] [blame] | 195 | initializeHexagonVectorLoopCarriedReusePass(PR); |
Krzysztof Parzyszek | 5ddd2e5 | 2017-06-27 18:37:16 +0000 | [diff] [blame] | 196 | initializeHexagonNewValueJumpPass(PR); |
Krzysztof Parzyszek | df4a05d | 2017-07-10 18:38:52 +0000 | [diff] [blame] | 197 | initializeHexagonOptAddrModePass(PR); |
| 198 | initializeHexagonPacketizerPass(PR); |
Krzysztof Parzyszek | bef1c56 | 2017-10-30 14:11:52 +0000 | [diff] [blame] | 199 | initializeHexagonRDFOptPass(PR); |
Krzysztof Parzyszek | effcc2f | 2018-05-04 15:04:48 +0000 | [diff] [blame] | 200 | initializeHexagonSplitDoubleRegsPass(PR); |
Krzysztof Parzyszek | 95614ac | 2018-01-26 21:17:14 +0000 | [diff] [blame] | 201 | initializeHexagonVExtractPass(PR); |
Krzysztof Parzyszek | c8b9438 | 2017-01-26 21:41:10 +0000 | [diff] [blame] | 202 | } |
| 203 | |
Daniel Sanders | 3e5de88 | 2015-06-11 19:41:26 +0000 | [diff] [blame] | 204 | HexagonTargetMachine::HexagonTargetMachine(const Target &T, const Triple &TT, |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 205 | StringRef CPU, StringRef FS, |
Craig Topper | b545408 | 2012-03-17 09:24:09 +0000 | [diff] [blame] | 206 | const TargetOptions &Options, |
Rafael Espindola | 8c34dd8 | 2016-05-18 22:04:49 +0000 | [diff] [blame] | 207 | Optional<Reloc::Model> RM, |
Rafael Espindola | 79e238a | 2017-08-03 02:16:21 +0000 | [diff] [blame] | 208 | Optional<CodeModel::Model> CM, |
| 209 | CodeGenOpt::Level OL, bool JIT) |
Krzysztof Parzyszek | e599643 | 2016-02-12 14:47:38 +0000 | [diff] [blame] | 210 | // Specify the vector alignment explicitly. For v512x1, the calculated |
| 211 | // alignment would be 512*alignment(i1), which is 512 bytes, instead of |
| 212 | // the required minimum of 64 bytes. |
Matthias Braun | bb8507e | 2017-10-12 22:57:28 +0000 | [diff] [blame] | 213 | : LLVMTargetMachine( |
Rafael Espindola | 79e238a | 2017-08-03 02:16:21 +0000 | [diff] [blame] | 214 | T, |
| 215 | "e-m:e-p:32:32:32-a:0-n16:32-" |
| 216 | "i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-" |
| 217 | "v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048", |
| 218 | TT, CPU, FS, Options, getEffectiveRelocModel(RM), |
David Green | ca29c27 | 2018-12-07 12:10:23 +0000 | [diff] [blame^] | 219 | getEffectiveCodeModel(CM, CodeModel::Small), |
| 220 | (HexagonNoOpt ? CodeGenOpt::None : OL)), |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 221 | TLOF(make_unique<HexagonTargetObjectFile>()) { |
Krzysztof Parzyszek | 951fb36 | 2016-08-24 22:27:36 +0000 | [diff] [blame] | 222 | initializeHexagonExpandCondsetsPass(*PassRegistry::getPassRegistry()); |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 223 | initAsmInfo(); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 224 | } |
| 225 | |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 226 | const HexagonSubtarget * |
| 227 | HexagonTargetMachine::getSubtargetImpl(const Function &F) const { |
Reid Kleckner | b518054 | 2017-03-21 16:57:19 +0000 | [diff] [blame] | 228 | AttributeList FnAttrs = F.getAttributes(); |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 229 | Attribute CPUAttr = |
Reid Kleckner | b518054 | 2017-03-21 16:57:19 +0000 | [diff] [blame] | 230 | FnAttrs.getAttribute(AttributeList::FunctionIndex, "target-cpu"); |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 231 | Attribute FSAttr = |
Reid Kleckner | b518054 | 2017-03-21 16:57:19 +0000 | [diff] [blame] | 232 | FnAttrs.getAttribute(AttributeList::FunctionIndex, "target-features"); |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 233 | |
| 234 | std::string CPU = !CPUAttr.hasAttribute(Attribute::None) |
| 235 | ? CPUAttr.getValueAsString().str() |
| 236 | : TargetCPU; |
| 237 | std::string FS = !FSAttr.hasAttribute(Attribute::None) |
| 238 | ? FSAttr.getValueAsString().str() |
| 239 | : TargetFS; |
| 240 | |
| 241 | auto &I = SubtargetMap[CPU + FS]; |
| 242 | if (!I) { |
| 243 | // This needs to be done before we create a new subtarget since any |
| 244 | // creation will depend on the TM and the code generation flags on the |
| 245 | // function that reside in TargetOptions. |
| 246 | resetTargetOptions(F); |
| 247 | I = llvm::make_unique<HexagonSubtarget>(TargetTriple, CPU, FS, *this); |
| 248 | } |
| 249 | return I.get(); |
| 250 | } |
| 251 | |
Krzysztof Parzyszek | c8b9438 | 2017-01-26 21:41:10 +0000 | [diff] [blame] | 252 | void HexagonTargetMachine::adjustPassManager(PassManagerBuilder &PMB) { |
| 253 | PMB.addExtension( |
| 254 | PassManagerBuilder::EP_LateLoopOptimizations, |
| 255 | [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) { |
| 256 | PM.add(createHexagonLoopIdiomPass()); |
| 257 | }); |
Pranav Bhandarkar | 931d0b7 | 2017-09-21 21:48:23 +0000 | [diff] [blame] | 258 | PMB.addExtension( |
| 259 | PassManagerBuilder::EP_LoopOptimizerEnd, |
| 260 | [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) { |
| 261 | PM.add(createHexagonVectorLoopCarriedReusePass()); |
| 262 | }); |
Krzysztof Parzyszek | c8b9438 | 2017-01-26 21:41:10 +0000 | [diff] [blame] | 263 | } |
| 264 | |
Sanjoy Das | 26d11ca | 2017-12-22 18:21:59 +0000 | [diff] [blame] | 265 | TargetTransformInfo |
| 266 | HexagonTargetMachine::getTargetTransformInfo(const Function &F) { |
| 267 | return TargetTransformInfo(HexagonTTIImpl(this, F)); |
Krzysztof Parzyszek | 73e66f3 | 2015-08-05 18:35:37 +0000 | [diff] [blame] | 268 | } |
| 269 | |
| 270 | |
Reid Kleckner | 357600e | 2014-11-20 23:37:18 +0000 | [diff] [blame] | 271 | HexagonTargetMachine::~HexagonTargetMachine() {} |
| 272 | |
Andrew Trick | ccb6736 | 2012-02-03 05:12:41 +0000 | [diff] [blame] | 273 | namespace { |
| 274 | /// Hexagon Code Generator Pass Configuration Options. |
| 275 | class HexagonPassConfig : public TargetPassConfig { |
| 276 | public: |
Matthias Braun | 5e394c3 | 2017-05-30 21:36:41 +0000 | [diff] [blame] | 277 | HexagonPassConfig(HexagonTargetMachine &TM, PassManagerBase &PM) |
Krzysztof Parzyszek | d0f8e1c | 2016-05-27 20:48:39 +0000 | [diff] [blame] | 278 | : TargetPassConfig(TM, PM) {} |
Andrew Trick | ccb6736 | 2012-02-03 05:12:41 +0000 | [diff] [blame] | 279 | |
| 280 | HexagonTargetMachine &getHexagonTargetMachine() const { |
| 281 | return getTM<HexagonTargetMachine>(); |
| 282 | } |
| 283 | |
Craig Topper | 906c2cd | 2014-04-29 07:58:16 +0000 | [diff] [blame] | 284 | ScheduleDAGInstrs * |
| 285 | createMachineScheduler(MachineSchedContext *C) const override { |
Andrew Trick | 978674b | 2013-09-20 05:14:41 +0000 | [diff] [blame] | 286 | return createVLIWMachineSched(C); |
| 287 | } |
| 288 | |
Krzysztof Parzyszek | 79b2433 | 2015-07-08 19:22:28 +0000 | [diff] [blame] | 289 | void addIRPasses() override; |
Craig Topper | 906c2cd | 2014-04-29 07:58:16 +0000 | [diff] [blame] | 290 | bool addInstSelector() override; |
Matthias Braun | 7e37a5f | 2014-12-11 21:26:47 +0000 | [diff] [blame] | 291 | void addPreRegAlloc() override; |
| 292 | void addPostRegAlloc() override; |
| 293 | void addPreSched2() override; |
| 294 | void addPreEmitPass() override; |
Andrew Trick | ccb6736 | 2012-02-03 05:12:41 +0000 | [diff] [blame] | 295 | }; |
| 296 | } // namespace |
| 297 | |
Andrew Trick | f8ea108 | 2012-02-04 02:56:59 +0000 | [diff] [blame] | 298 | TargetPassConfig *HexagonTargetMachine::createPassConfig(PassManagerBase &PM) { |
Matthias Braun | 5e394c3 | 2017-05-30 21:36:41 +0000 | [diff] [blame] | 299 | return new HexagonPassConfig(*this, PM); |
Andrew Trick | ccb6736 | 2012-02-03 05:12:41 +0000 | [diff] [blame] | 300 | } |
| 301 | |
Krzysztof Parzyszek | 79b2433 | 2015-07-08 19:22:28 +0000 | [diff] [blame] | 302 | void HexagonPassConfig::addIRPasses() { |
| 303 | TargetPassConfig::addIRPasses(); |
Krzysztof Parzyszek | 79b2433 | 2015-07-08 19:22:28 +0000 | [diff] [blame] | 304 | bool NoOpt = (getOptLevel() == CodeGenOpt::None); |
Krzysztof Parzyszek | feaf7b8 | 2015-07-09 14:51:21 +0000 | [diff] [blame] | 305 | |
Krzysztof Parzyszek | cf3ad58 | 2018-01-24 17:48:11 +0000 | [diff] [blame] | 306 | if (!NoOpt) { |
| 307 | addPass(createConstantPropagationPass()); |
| 308 | addPass(createDeadCodeEliminationPass()); |
| 309 | } |
| 310 | |
Francis Visoiu Mistrih | 8b61764 | 2017-05-18 17:21:13 +0000 | [diff] [blame] | 311 | addPass(createAtomicExpandPass()); |
Krzysztof Parzyszek | d91a9e2 | 2018-08-02 22:17:53 +0000 | [diff] [blame] | 312 | |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 313 | if (!NoOpt) { |
Krzysztof Parzyszek | d91a9e2 | 2018-08-02 22:17:53 +0000 | [diff] [blame] | 314 | if (EnableInitialCFGCleanup) |
| 315 | addPass(createCFGSimplificationPass(1, true, true, false, true)); |
Krzysztof Parzyszek | d3d0a4b | 2016-07-22 14:22:43 +0000 | [diff] [blame] | 316 | if (EnableLoopPrefetch) |
| 317 | addPass(createLoopDataPrefetchPass()); |
Krzysztof Parzyszek | a0ecf07 | 2015-07-14 17:07:24 +0000 | [diff] [blame] | 318 | if (EnableCommGEP) |
| 319 | addPass(createHexagonCommonGEP()); |
| 320 | // Replace certain combinations of shifts and ands with extracts. |
| 321 | if (EnableGenExtract) |
| 322 | addPass(createHexagonGenExtract()); |
| 323 | } |
Krzysztof Parzyszek | 79b2433 | 2015-07-08 19:22:28 +0000 | [diff] [blame] | 324 | } |
| 325 | |
Andrew Trick | ccb6736 | 2012-02-03 05:12:41 +0000 | [diff] [blame] | 326 | bool HexagonPassConfig::addInstSelector() { |
Bill Wendling | a3cd350 | 2013-06-19 21:36:55 +0000 | [diff] [blame] | 327 | HexagonTargetMachine &TM = getHexagonTargetMachine(); |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 328 | bool NoOpt = (getOptLevel() == CodeGenOpt::None); |
Jyotsna Verma | 653d883 | 2013-03-27 11:14:24 +0000 | [diff] [blame] | 329 | |
Krzysztof Parzyszek | 055c5fd | 2015-10-19 19:10:48 +0000 | [diff] [blame] | 330 | if (!NoOpt) |
| 331 | addPass(createHexagonOptimizeSZextends()); |
| 332 | |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 333 | addPass(createHexagonISelDag(TM, getOptLevel())); |
Jyotsna Verma | 653d883 | 2013-03-27 11:14:24 +0000 | [diff] [blame] | 334 | |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 335 | if (!NoOpt) { |
Krzysztof Parzyszek | 95614ac | 2018-01-26 21:17:14 +0000 | [diff] [blame] | 336 | if (EnableVExtractOpt) |
| 337 | addPass(createHexagonVExtract()); |
Krzysztof Parzyszek | 7587447 | 2015-07-14 19:30:21 +0000 | [diff] [blame] | 338 | // Create logical operations on predicate registers. |
| 339 | if (EnableGenPred) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 340 | addPass(createHexagonGenPredicate()); |
Krzysztof Parzyszek | ced9941 | 2015-10-20 22:57:13 +0000 | [diff] [blame] | 341 | // Rotate loops to expose bit-simplification opportunities. |
| 342 | if (EnableLoopResched) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 343 | addPass(createHexagonLoopRescheduling()); |
Krzysztof Parzyszek | a7c5f04 | 2015-10-16 20:38:54 +0000 | [diff] [blame] | 344 | // Split double registers. |
| 345 | if (!DisableHSDR) |
| 346 | addPass(createHexagonSplitDoubleRegs()); |
Krzysztof Parzyszek | ced9941 | 2015-10-20 22:57:13 +0000 | [diff] [blame] | 347 | // Bit simplification. |
| 348 | if (EnableBitSimplify) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 349 | addPass(createHexagonBitSimplify()); |
Jyotsna Verma | 653d883 | 2013-03-27 11:14:24 +0000 | [diff] [blame] | 350 | addPass(createHexagonPeephole()); |
Krzysztof Parzyszek | 167d918 | 2016-07-28 20:01:59 +0000 | [diff] [blame] | 351 | // Constant propagation. |
| 352 | if (!DisableHCP) { |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 353 | addPass(createHexagonConstPropagationPass()); |
| 354 | addPass(&UnreachableMachineBlockElimID); |
Krzysztof Parzyszek | 167d918 | 2016-07-28 20:01:59 +0000 | [diff] [blame] | 355 | } |
Krzysztof Parzyszek | 21b53a5 | 2015-07-08 14:47:34 +0000 | [diff] [blame] | 356 | if (EnableGenInsert) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 357 | addPass(createHexagonGenInsert()); |
Krzysztof Parzyszek | fb33824 | 2015-10-06 15:49:14 +0000 | [diff] [blame] | 358 | if (EnableEarlyIf) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 359 | addPass(createHexagonEarlyIfConversion()); |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 360 | } |
Jyotsna Verma | 653d883 | 2013-03-27 11:14:24 +0000 | [diff] [blame] | 361 | |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 362 | return false; |
| 363 | } |
| 364 | |
Matthias Braun | 7e37a5f | 2014-12-11 21:26:47 +0000 | [diff] [blame] | 365 | void HexagonPassConfig::addPreRegAlloc() { |
Krzysztof Parzyszek | 5b7dd0c | 2015-10-16 19:43:56 +0000 | [diff] [blame] | 366 | if (getOptLevel() != CodeGenOpt::None) { |
Krzysztof Parzyszek | 7c9c058 | 2017-10-13 19:02:59 +0000 | [diff] [blame] | 367 | if (EnableCExtOpt) |
| 368 | addPass(createHexagonConstExtenders()); |
Krzysztof Parzyszek | 951fb36 | 2016-08-24 22:27:36 +0000 | [diff] [blame] | 369 | if (EnableExpandCondsets) |
| 370 | insertPass(&RegisterCoalescerID, &HexagonExpandCondsetsID); |
Krzysztof Parzyszek | 5b7dd0c | 2015-10-16 19:43:56 +0000 | [diff] [blame] | 371 | if (!DisableStoreWidening) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 372 | addPass(createHexagonStoreWidening()); |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 373 | if (!DisableHardwareLoops) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 374 | addPass(createHexagonHardwareLoops()); |
Krzysztof Parzyszek | 5b7dd0c | 2015-10-16 19:43:56 +0000 | [diff] [blame] | 375 | } |
Brendon Cahoon | 254f889 | 2016-07-29 16:44:44 +0000 | [diff] [blame] | 376 | if (TM->getOptLevel() >= CodeGenOpt::Default) |
| 377 | addPass(&MachinePipelinerID); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 378 | } |
| 379 | |
Matthias Braun | 7e37a5f | 2014-12-11 21:26:47 +0000 | [diff] [blame] | 380 | void HexagonPassConfig::addPostRegAlloc() { |
Krzysztof Parzyszek | 1279881 | 2016-01-12 19:09:01 +0000 | [diff] [blame] | 381 | if (getOptLevel() != CodeGenOpt::None) { |
| 382 | if (EnableRDFOpt) |
| 383 | addPass(createHexagonRDFOpt()); |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 384 | if (!DisableHexagonCFGOpt) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 385 | addPass(createHexagonCFGOptimizer()); |
Krzysztof Parzyszek | f5cbac9 | 2016-04-29 15:49:13 +0000 | [diff] [blame] | 386 | if (!DisableAModeOpt) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 387 | addPass(createHexagonOptAddrMode()); |
Krzysztof Parzyszek | 1279881 | 2016-01-12 19:09:01 +0000 | [diff] [blame] | 388 | } |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 389 | } |
| 390 | |
Matthias Braun | 7e37a5f | 2014-12-11 21:26:47 +0000 | [diff] [blame] | 391 | void HexagonPassConfig::addPreSched2() { |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 392 | addPass(createHexagonCopyToCombine()); |
Jyotsna Verma | 5eb5980 | 2013-05-07 19:53:00 +0000 | [diff] [blame] | 393 | if (getOptLevel() != CodeGenOpt::None) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 394 | addPass(&IfConverterID); |
Eric Christopher | 01f875e | 2015-02-02 22:11:43 +0000 | [diff] [blame] | 395 | addPass(createHexagonSplitConst32AndConst64()); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 396 | } |
| 397 | |
Matthias Braun | 7e37a5f | 2014-12-11 21:26:47 +0000 | [diff] [blame] | 398 | void HexagonPassConfig::addPreEmitPass() { |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 399 | bool NoOpt = (getOptLevel() == CodeGenOpt::None); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 400 | |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 401 | if (!NoOpt) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 402 | addPass(createHexagonNewValueJump()); |
Sirish Pande | 4bd20c5 | 2012-05-12 05:10:30 +0000 | [diff] [blame] | 403 | |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 404 | addPass(createHexagonBranchRelaxation()); |
Krzysztof Parzyszek | 7b59ae2 | 2016-04-19 18:30:18 +0000 | [diff] [blame] | 405 | |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 406 | if (!NoOpt) { |
| 407 | if (!DisableHardwareLoops) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 408 | addPass(createHexagonFixupHwLoops()); |
Krzysztof Parzyszek | 9217220 | 2015-07-20 21:23:25 +0000 | [diff] [blame] | 409 | // Generate MUX from pairs of conditional transfers. |
| 410 | if (EnableGenMux) |
Krzysztof Parzyszek | b1ada4e | 2017-06-08 21:25:36 +0000 | [diff] [blame] | 411 | addPass(createHexagonGenMux()); |
Krzysztof Parzyszek | 59df52c | 2013-05-06 21:25:45 +0000 | [diff] [blame] | 412 | } |
Krzysztof Parzyszek | a8ab1b7 | 2017-12-11 18:57:54 +0000 | [diff] [blame] | 413 | |
Krzysztof Parzyszek | 39a979c | 2018-08-17 14:24:24 +0000 | [diff] [blame] | 414 | // Packetization is mandatory: it handles gather/scatter at all opt levels. |
| 415 | addPass(createHexagonPacketizer(NoOpt), false); |
Krzysztof Parzyszek | a8ab1b7 | 2017-12-11 18:57:54 +0000 | [diff] [blame] | 416 | |
Ron Lieberman | 8123b96 | 2016-08-01 19:36:39 +0000 | [diff] [blame] | 417 | if (EnableVectorPrint) |
| 418 | addPass(createHexagonVectorPrint(), false); |
Krzysztof Parzyszek | db86770 | 2015-10-19 17:46:01 +0000 | [diff] [blame] | 419 | |
| 420 | // Add CFI instructions if necessary. |
| 421 | addPass(createHexagonCallFrameInformation(), false); |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 422 | } |