Chris Lattner | 1d21f3e | 2002-04-09 05:21:26 +0000 | [diff] [blame] | 1 | //===-- Sparc.cpp - General implementation file for the Sparc Target ------===// |
| 2 | // |
| 3 | // This file contains the code for the Sparc Target that does not fit in any of |
| 4 | // the other files in this directory. |
| 5 | // |
| 6 | //===----------------------------------------------------------------------===// |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 7 | |
Chris Lattner | 20b1ea0 | 2001-09-14 03:47:57 +0000 | [diff] [blame] | 8 | #include "SparcInternals.h" |
Chris Lattner | 600e699 | 2002-10-29 20:47:26 +0000 | [diff] [blame] | 9 | #include "llvm/Target/TargetMachineImpls.h" |
Chris Lattner | 2fbfdcf | 2002-04-07 20:49:59 +0000 | [diff] [blame] | 10 | #include "llvm/Function.h" |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 11 | #include "llvm/PassManager.h" |
| 12 | #include "llvm/Transforms/Scalar.h" |
Misha Brukman | fce1143 | 2002-10-28 00:28:31 +0000 | [diff] [blame] | 13 | #include "llvm/CodeGen/MachineFunction.h" |
Chris Lattner | 78d881d | 2002-12-28 20:17:43 +0000 | [diff] [blame] | 14 | #include "llvm/CodeGen/MachineFunctionInfo.h" |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 15 | #include "llvm/CodeGen/PreSelection.h" |
| 16 | #include "llvm/CodeGen/StackSlots.h" |
| 17 | #include "llvm/CodeGen/PeepholeOpts.h" |
| 18 | #include "llvm/CodeGen/InstrSelection.h" |
| 19 | #include "llvm/CodeGen/InstrScheduling.h" |
| 20 | #include "llvm/CodeGen/RegisterAllocation.h" |
| 21 | #include "llvm/CodeGen/MachineCodeForInstruction.h" |
| 22 | #include "llvm/Reoptimizer/Mapping/MappingInfo.h" |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 23 | #include "Support/CommandLine.h" |
Brian Gaeke | 2e2f2dc | 2003-06-18 21:14:23 +0000 | [diff] [blame] | 24 | #include "llvm/Assembly/PrintModulePass.h" |
Ruchira Sasanka | e38bd533 | 2001-09-15 00:30:44 +0000 | [diff] [blame] | 25 | |
Chris Lattner | 6af2040 | 2002-12-03 05:41:54 +0000 | [diff] [blame] | 26 | static const unsigned ImplicitRegUseList[] = { 0 }; /* not used yet */ |
Chris Lattner | 9a3d63b | 2001-09-19 15:56:23 +0000 | [diff] [blame] | 27 | // Build the MachineInstruction Description Array... |
Chris Lattner | 3501fea | 2003-01-14 22:00:31 +0000 | [diff] [blame] | 28 | const TargetInstrDescriptor SparcMachineInstrDesc[] = { |
Chris Lattner | 9a3d63b | 2001-09-19 15:56:23 +0000 | [diff] [blame] | 29 | #define I(ENUM, OPCODESTRING, NUMOPERANDS, RESULTPOS, MAXIMM, IMMSE, \ |
| 30 | NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS) \ |
| 31 | { OPCODESTRING, NUMOPERANDS, RESULTPOS, MAXIMM, IMMSE, \ |
Chris Lattner | 6af2040 | 2002-12-03 05:41:54 +0000 | [diff] [blame] | 32 | NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS, 0, \ |
| 33 | ImplicitRegUseList, ImplicitRegUseList }, |
Chris Lattner | 9a3d63b | 2001-09-19 15:56:23 +0000 | [diff] [blame] | 34 | #include "SparcInstr.def" |
| 35 | }; |
Vikram S. Adve | 0fb4980 | 2001-09-18 13:01:29 +0000 | [diff] [blame] | 36 | |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 37 | //--------------------------------------------------------------------------- |
| 38 | // Command line options to control choice of code generation passes. |
| 39 | //--------------------------------------------------------------------------- |
| 40 | |
Misha Brukman | fe8a796 | 2003-08-06 23:25:25 +0000 | [diff] [blame^] | 41 | static cl::opt<bool> DisablePreOpt("disable-preopt", |
Misha Brukman | 58ba50f | 2003-08-06 23:06:21 +0000 | [diff] [blame] | 42 | cl::desc("Disable optimizations prior to instruction selection")); |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 43 | |
Misha Brukman | fe8a796 | 2003-08-06 23:25:25 +0000 | [diff] [blame^] | 44 | static cl::opt<bool> DisableSched("disable-sched", |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 45 | cl::desc("Disable local scheduling pass")); |
| 46 | |
Misha Brukman | fe8a796 | 2003-08-06 23:25:25 +0000 | [diff] [blame^] | 47 | static cl::opt<bool> DisablePeephole("disable-peephole", |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 48 | cl::desc("Disable peephole optimization pass")); |
| 49 | |
Brian Gaeke | 2e2f2dc | 2003-06-18 21:14:23 +0000 | [diff] [blame] | 50 | static cl::opt<bool> |
| 51 | DisableStrip("disable-strip", |
| 52 | cl::desc("Do not strip the LLVM bytecode included in the executable")); |
| 53 | |
| 54 | static cl::opt<bool> |
Vikram S. Adve | deb9634 | 2003-07-29 19:58:00 +0000 | [diff] [blame] | 55 | DumpInput("dump-input",cl::desc("Print bytecode before native code generation"), |
| 56 | cl::Hidden); |
Brian Gaeke | 2e2f2dc | 2003-06-18 21:14:23 +0000 | [diff] [blame] | 57 | |
Vikram S. Adve | 0fb4980 | 2001-09-18 13:01:29 +0000 | [diff] [blame] | 58 | //---------------------------------------------------------------------------- |
Chris Lattner | 46cbff6 | 2001-09-14 16:56:32 +0000 | [diff] [blame] | 59 | // allocateSparcTargetMachine - Allocate and return a subclass of TargetMachine |
| 60 | // that implements the Sparc backend. (the llvm/CodeGen/Sparc.h interface) |
Vikram S. Adve | 0fb4980 | 2001-09-18 13:01:29 +0000 | [diff] [blame] | 61 | //---------------------------------------------------------------------------- |
Ruchira Sasanka | cc3ccac | 2001-10-15 16:25:28 +0000 | [diff] [blame] | 62 | |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 63 | TargetMachine *allocateSparcTargetMachine(unsigned Configuration) { |
| 64 | return new UltraSparc(); |
| 65 | } |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 66 | |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 67 | //--------------------------------------------------------------------------- |
| 68 | // class UltraSparcFrameInfo |
| 69 | // |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 70 | // Interface to stack frame layout info for the UltraSPARC. |
Vikram S. Adve | 00521d7 | 2001-11-12 23:26:35 +0000 | [diff] [blame] | 71 | // Starting offsets for each area of the stack frame are aligned at |
| 72 | // a multiple of getStackFrameSizeAlignment(). |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 73 | //--------------------------------------------------------------------------- |
| 74 | |
| 75 | int |
Misha Brukman | fce1143 | 2002-10-28 00:28:31 +0000 | [diff] [blame] | 76 | UltraSparcFrameInfo::getFirstAutomaticVarOffset(MachineFunction& , |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 77 | bool& pos) const |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 78 | { |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 79 | pos = false; // static stack area grows downwards |
| 80 | return StaticAreaOffsetFromFP; |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | int |
Misha Brukman | fce1143 | 2002-10-28 00:28:31 +0000 | [diff] [blame] | 84 | UltraSparcFrameInfo::getRegSpillAreaOffset(MachineFunction& mcInfo, |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 85 | bool& pos) const |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 86 | { |
Chris Lattner | 78d881d | 2002-12-28 20:17:43 +0000 | [diff] [blame] | 87 | // ensure no more auto vars are added |
| 88 | mcInfo.getInfo()->freezeAutomaticVarsArea(); |
Vikram S. Adve | 0bc0516 | 2002-04-25 04:43:45 +0000 | [diff] [blame] | 89 | |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 90 | pos = false; // static stack area grows downwards |
Chris Lattner | 78d881d | 2002-12-28 20:17:43 +0000 | [diff] [blame] | 91 | unsigned autoVarsSize = mcInfo.getInfo()->getAutomaticVarsSize(); |
Vikram S. Adve | 00521d7 | 2001-11-12 23:26:35 +0000 | [diff] [blame] | 92 | return StaticAreaOffsetFromFP - autoVarsSize; |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | int |
Misha Brukman | fce1143 | 2002-10-28 00:28:31 +0000 | [diff] [blame] | 96 | UltraSparcFrameInfo::getTmpAreaOffset(MachineFunction& mcInfo, |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 97 | bool& pos) const |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 98 | { |
Chris Lattner | 78d881d | 2002-12-28 20:17:43 +0000 | [diff] [blame] | 99 | MachineFunctionInfo *MFI = mcInfo.getInfo(); |
| 100 | MFI->freezeAutomaticVarsArea(); // ensure no more auto vars are added |
| 101 | MFI->freezeSpillsArea(); // ensure no more spill slots are added |
Vikram S. Adve | 0bc0516 | 2002-04-25 04:43:45 +0000 | [diff] [blame] | 102 | |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 103 | pos = false; // static stack area grows downwards |
Chris Lattner | 78d881d | 2002-12-28 20:17:43 +0000 | [diff] [blame] | 104 | unsigned autoVarsSize = MFI->getAutomaticVarsSize(); |
| 105 | unsigned spillAreaSize = MFI->getRegSpillsSize(); |
Vikram S. Adve | 00521d7 | 2001-11-12 23:26:35 +0000 | [diff] [blame] | 106 | int offset = autoVarsSize + spillAreaSize; |
Vikram S. Adve | 00521d7 | 2001-11-12 23:26:35 +0000 | [diff] [blame] | 107 | return StaticAreaOffsetFromFP - offset; |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | int |
Misha Brukman | fce1143 | 2002-10-28 00:28:31 +0000 | [diff] [blame] | 111 | UltraSparcFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo, |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 112 | bool& pos) const |
| 113 | { |
Vikram S. Adve | e6d2c41 | 2002-03-18 03:08:07 +0000 | [diff] [blame] | 114 | // Dynamic stack area grows downwards starting at top of opt-args area. |
| 115 | // The opt-args, required-args, and register-save areas are empty except |
| 116 | // during calls and traps, so they are shifted downwards on each |
| 117 | // dynamic-size alloca. |
| 118 | pos = false; |
Chris Lattner | 78d881d | 2002-12-28 20:17:43 +0000 | [diff] [blame] | 119 | unsigned optArgsSize = mcInfo.getInfo()->getMaxOptionalArgsSize(); |
Vikram S. Adve | e1f7280 | 2002-09-16 15:39:26 +0000 | [diff] [blame] | 120 | if (int extra = optArgsSize % getStackFrameSizeAlignment()) |
| 121 | optArgsSize += (getStackFrameSizeAlignment() - extra); |
Vikram S. Adve | 00521d7 | 2001-11-12 23:26:35 +0000 | [diff] [blame] | 122 | int offset = optArgsSize + FirstOptionalOutgoingArgOffsetFromSP; |
Vikram S. Adve | e6d2c41 | 2002-03-18 03:08:07 +0000 | [diff] [blame] | 123 | assert((offset - OFFSET) % getStackFrameSizeAlignment() == 0); |
Vikram S. Adve | 00521d7 | 2001-11-12 23:26:35 +0000 | [diff] [blame] | 124 | return offset; |
Vikram S. Adve | 9db4318 | 2001-10-22 13:44:23 +0000 | [diff] [blame] | 125 | } |
| 126 | |
Chris Lattner | 20b1ea0 | 2001-09-14 03:47:57 +0000 | [diff] [blame] | 127 | //--------------------------------------------------------------------------- |
| 128 | // class UltraSparcMachine |
| 129 | // |
| 130 | // Purpose: |
| 131 | // Primary interface to machine description for the UltraSPARC. |
| 132 | // Primarily just initializes machine-dependent parameters in |
| 133 | // class TargetMachine, and creates machine-dependent subclasses |
Chris Lattner | 3501fea | 2003-01-14 22:00:31 +0000 | [diff] [blame] | 134 | // for classes such as TargetInstrInfo. |
Chris Lattner | 20b1ea0 | 2001-09-14 03:47:57 +0000 | [diff] [blame] | 135 | // |
| 136 | //--------------------------------------------------------------------------- |
| 137 | |
Vikram S. Adve | 0fb4980 | 2001-09-18 13:01:29 +0000 | [diff] [blame] | 138 | UltraSparc::UltraSparc() |
Chris Lattner | 10daaa1 | 2003-04-26 20:11:09 +0000 | [diff] [blame] | 139 | : TargetMachine("UltraSparc-Native", false), |
Vikram S. Adve | 7f37fe5 | 2001-11-08 04:55:13 +0000 | [diff] [blame] | 140 | schedInfo(*this), |
| 141 | regInfo(*this), |
Vikram S. Adve | b704840 | 2001-11-09 02:16:04 +0000 | [diff] [blame] | 142 | frameInfo(*this), |
Vikram S. Adve | d55697c | 2002-09-20 00:52:09 +0000 | [diff] [blame] | 143 | cacheInfo(*this), |
Chris Lattner | c56406c | 2002-10-29 21:48:17 +0000 | [diff] [blame] | 144 | optInfo(*this) { |
Chris Lattner | 20b1ea0 | 2001-09-14 03:47:57 +0000 | [diff] [blame] | 145 | } |
| 146 | |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 147 | |
| 148 | // addPassesToEmitAssembly - This method controls the entire code generation |
| 149 | // process for the ultra sparc. |
| 150 | // |
Chris Lattner | 6334205 | 2002-10-29 21:12:46 +0000 | [diff] [blame] | 151 | bool UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 152 | { |
Brian Gaeke | 2e2f2dc | 2003-06-18 21:14:23 +0000 | [diff] [blame] | 153 | // The following 3 passes used to be inserted specially by llc. |
| 154 | // Replace malloc and free instructions with library calls. |
| 155 | PM.add(createLowerAllocationsPass()); |
| 156 | |
Brian Gaeke | 2e2f2dc | 2003-06-18 21:14:23 +0000 | [diff] [blame] | 157 | // Strip all of the symbols from the bytecode so that it will be smaller... |
| 158 | if (!DisableStrip) |
| 159 | PM.add(createSymbolStrippingPass()); |
| 160 | |
Chris Lattner | 155e68f | 2003-04-23 16:24:55 +0000 | [diff] [blame] | 161 | // FIXME: implement the switch instruction in the instruction selector. |
| 162 | PM.add(createLowerSwitchPass()); |
Brian Gaeke | 2e2f2dc | 2003-06-18 21:14:23 +0000 | [diff] [blame] | 163 | |
Vikram S. Adve | 248932b | 2003-08-01 15:53:24 +0000 | [diff] [blame] | 164 | // decompose multi-dimensional array references into single-dim refs |
| 165 | PM.add(createDecomposeMultiDimRefsPass()); |
| 166 | |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 167 | // Construct and initialize the MachineFunction object for this fn. |
Chris Lattner | 227c3d3 | 2002-10-28 01:12:41 +0000 | [diff] [blame] | 168 | PM.add(createMachineCodeConstructionPass(*this)); |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 169 | |
| 170 | //Insert empty stackslots in the stack frame of each function |
| 171 | //so %fp+offset-8 and %fp+offset-16 are empty slots now! |
| 172 | PM.add(createStackSlotsPass(*this)); |
| 173 | |
Misha Brukman | 58ba50f | 2003-08-06 23:06:21 +0000 | [diff] [blame] | 174 | if (!DisablePreOpt) { |
| 175 | // Specialize LLVM code for this target machine |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 176 | PM.add(createPreSelectionPass(*this)); |
Misha Brukman | 58ba50f | 2003-08-06 23:06:21 +0000 | [diff] [blame] | 177 | // Run basic dataflow optimizations on LLVM code |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 178 | PM.add(createReassociatePass()); |
| 179 | PM.add(createLICMPass()); |
| 180 | PM.add(createGCSEPass()); |
| 181 | } |
Vikram S. Adve | deb9634 | 2003-07-29 19:58:00 +0000 | [diff] [blame] | 182 | |
| 183 | // If LLVM dumping after transformations is requested, add it to the pipeline |
| 184 | if (DumpInput) |
Misha Brukman | 58ba50f | 2003-08-06 23:06:21 +0000 | [diff] [blame] | 185 | PM.add(new PrintFunctionPass("Input code to instsr. selection:\n", |
| 186 | &std::cerr)); |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 187 | |
| 188 | PM.add(createInstructionSelectionPass(*this)); |
| 189 | |
| 190 | if (!DisableSched) |
| 191 | PM.add(createInstructionSchedulingWithSSAPass(*this)); |
| 192 | |
| 193 | PM.add(getRegisterAllocator(*this)); |
| 194 | |
| 195 | PM.add(getPrologEpilogInsertionPass()); |
| 196 | |
| 197 | if (!DisablePeephole) |
| 198 | PM.add(createPeepholeOptsPass(*this)); |
| 199 | |
Brian Gaeke | aeab1e1 | 2003-06-04 22:07:12 +0000 | [diff] [blame] | 200 | PM.add(getMappingInfoCollector(Out)); |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 201 | |
| 202 | // Output assembly language to the .s file. Assembly emission is split into |
| 203 | // two parts: Function output and Global value output. This is because |
| 204 | // function output is pipelined with all of the rest of code generation stuff, |
| 205 | // allowing machine code representations for functions to be free'd after the |
| 206 | // function has been emitted. |
| 207 | // |
| 208 | PM.add(getFunctionAsmPrinterPass(Out)); |
Chris Lattner | 227c3d3 | 2002-10-28 01:12:41 +0000 | [diff] [blame] | 209 | PM.add(createMachineCodeDestructionPass()); // Free stuff no longer needed |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 210 | |
| 211 | // Emit Module level assembly after all of the functions have been processed. |
| 212 | PM.add(getModuleAsmPrinterPass(Out)); |
| 213 | |
| 214 | // Emit bytecode to the assembly file into its special section next |
| 215 | PM.add(getEmitBytecodeToAsmPass(Out)); |
| 216 | PM.add(getFunctionInfo(Out)); |
Chris Lattner | 6334205 | 2002-10-29 21:12:46 +0000 | [diff] [blame] | 217 | return false; |
Chris Lattner | 4f94637 | 2002-10-28 01:03:43 +0000 | [diff] [blame] | 218 | } |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 219 | |
| 220 | // addPassesToJITCompile - This method controls the JIT method of code |
| 221 | // generation for the UltraSparc. |
| 222 | // |
| 223 | bool UltraSparc::addPassesToJITCompile(PassManager &PM) { |
Misha Brukman | a512450 | 2003-06-06 07:11:16 +0000 | [diff] [blame] | 224 | const TargetData &TD = getTargetData(); |
| 225 | |
| 226 | PM.add(new TargetData("lli", TD.isLittleEndian(), TD.getPointerSize(), |
| 227 | TD.getPointerAlignment(), TD.getDoubleAlignment())); |
| 228 | |
| 229 | // Replace malloc and free instructions with library calls. |
| 230 | // Do this after tracing until lli implements these lib calls. |
| 231 | // For now, it will emulate malloc and free internally. |
| 232 | PM.add(createLowerAllocationsPass()); |
| 233 | |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 234 | // FIXME: implement the switch instruction in the instruction selector. |
| 235 | PM.add(createLowerSwitchPass()); |
| 236 | |
Misha Brukman | 58ba50f | 2003-08-06 23:06:21 +0000 | [diff] [blame] | 237 | // decompose multi-dimensional array references into single-dim refs |
| 238 | PM.add(createDecomposeMultiDimRefsPass()); |
| 239 | |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 240 | // Construct and initialize the MachineFunction object for this fn. |
| 241 | PM.add(createMachineCodeConstructionPass(*this)); |
| 242 | |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 243 | PM.add(createInstructionSelectionPass(*this)); |
| 244 | |
| 245 | // new pass: convert Value* in MachineOperand to an unsigned register |
| 246 | // this brings it in line with what the X86 JIT's RegisterAllocator expects |
| 247 | //PM.add(createAddRegNumToValuesPass()); |
| 248 | |
| 249 | PM.add(getRegisterAllocator(*this)); |
| 250 | PM.add(getPrologEpilogInsertionPass()); |
| 251 | |
Misha Brukman | d1ef7a8 | 2003-05-30 20:00:13 +0000 | [diff] [blame] | 252 | if (!DisablePeephole) |
| 253 | PM.add(createPeepholeOptsPass(*this)); |
| 254 | |
Misha Brukman | 86172ab | 2003-05-27 22:24:48 +0000 | [diff] [blame] | 255 | return false; // success! |
| 256 | } |