blob: 32432a6c98a8daeb85cd0c65fbc0a023d6121009 [file] [log] [blame]
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +00001//===- SSEDomainFix.cpp - Use proper int/float domain for SSE ---*- C++ -*-===//
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 contains the SSEDomainFix pass.
11//
12// Some SSE instructions like mov, and, or, xor are available in different
13// variants for different operand types. These variant instructions are
14// equivalent, but on Nehalem and newer cpus there is extra latency
15// transferring data between integer and floating point domains.
16//
17// This pass changes the variant instructions to minimize domain crossings.
18//
19//===----------------------------------------------------------------------===//
20
21#define DEBUG_TYPE "sse-domain-fix"
22#include "X86InstrInfo.h"
23#include "llvm/CodeGen/MachineFunctionPass.h"
24#include "llvm/CodeGen/MachineRegisterInfo.h"
25#include "llvm/ADT/DepthFirstIterator.h"
26#include "llvm/Support/Debug.h"
27#include "llvm/Support/raw_ostream.h"
28
29using namespace llvm;
30
31namespace {
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +000032
33/// Allocate objects from a pool, allow objects to be recycled, and provide a
34/// way of deleting everything.
35template<typename T, unsigned PageSize = 64>
36class PoolAllocator {
37 std::vector<T*> Pages, Avail;
38public:
39 ~PoolAllocator() { Clear(); }
40
41 T* Alloc() {
42 if (Avail.empty()) {
43 T *p = new T[PageSize];
44 Pages.push_back(p);
45 Avail.reserve(PageSize);
46 for (unsigned n = 0; n != PageSize; ++n)
47 Avail.push_back(p+n);
48 }
49 T *p = Avail.back();
50 Avail.pop_back();
51 return p;
52 }
53
54 // Allow object to be reallocated. It won't be reconstructed.
55 void Recycle(T *p) {
56 p->clear();
57 Avail.push_back(p);
58 }
59
60 // Destroy all objects, make sure there are no external pointers to them.
61 void Clear() {
62 Avail.clear();
63 while (!Pages.empty()) {
64 delete[] Pages.back();
65 Pages.pop_back();
66 }
67 }
68};
69
70/// A DomainValue is a bit like LiveIntervals' ValNo, but it laso keeps track
71/// of execution domains.
72///
73/// An open DomainValue represents a set of instructions that can still switch
74/// execution domain. Multiple registers may refer to the same open
75/// DomainValue - they will eventually be collapsed to the same execution
76/// domain.
77///
78/// A collapsed DomainValue represents a single register that has been forced
79/// into one of more execution domains. There is a separate collapsed
80/// DomainValue for each register, but it may contain multiple execution
81/// domains. A register value is initially created in a single execution
82/// domain, but if we were forced to pay the penalty of a domain crossing, we
83/// keep track of the fact the the register is now available in multiple
84/// domains.
85struct DomainValue {
86 // Basic reference counting.
87 unsigned Refs;
88
89 // Available domains. For an open DomainValue, it is the still possible
90 // domains for collapsing. For a collapsed DomainValue it is the domains where
91 // the register is available for free.
92 unsigned Mask;
93
94 // Position of the last defining instruction.
95 unsigned Dist;
96
97 // Twiddleable instructions using or defining these registers.
98 SmallVector<MachineInstr*, 8> Instrs;
99
100 // Collapsed DomainValue have no instructions to twiddle - it simply keeps
101 // track of the domains where the registers are already available.
102 bool collapsed() const { return Instrs.empty(); }
103
104 // Is any domain in mask available?
105 bool compat(unsigned mask) const {
106 return Mask & mask;
107 }
108
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000109 // Mark domain as available.
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000110 void add(unsigned domain) {
111 Mask |= 1u << domain;
112 }
113
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000114 // First domain available in mask.
115 unsigned firstDomain() const {
116 return CountTrailingZeros_32(Mask);
117 }
118
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000119 DomainValue() { clear(); }
120
121 void clear() {
122 Refs = Mask = Dist = 0;
123 Instrs.clear();
124 }
125};
126
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000127static const unsigned NumRegs = 16;
128
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000129class SSEDomainFixPass : public MachineFunctionPass {
130 static char ID;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000131 PoolAllocator<DomainValue> Pool;
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000132
133 MachineFunction *MF;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000134 const X86InstrInfo *TII;
135 const TargetRegisterInfo *TRI;
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000136 MachineBasicBlock *MBB;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000137 DomainValue **LiveRegs;
138 typedef DenseMap<MachineBasicBlock*,DomainValue**> LiveOutMap;
139 LiveOutMap LiveOuts;
140 unsigned Distance;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000141
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000142public:
143 SSEDomainFixPass() : MachineFunctionPass(&ID) {}
144
145 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
146 AU.setPreservesAll();
147 MachineFunctionPass::getAnalysisUsage(AU);
148 }
149
150 virtual bool runOnMachineFunction(MachineFunction &MF);
151
152 virtual const char *getPassName() const {
153 return "SSE execution domain fixup";
154 }
155
156private:
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000157 // Register mapping.
158 int RegIndex(unsigned Reg);
159
160 // LiveRegs manipulations.
161 void SetLiveReg(int rx, DomainValue *DV);
162 void Kill(int rx);
163 void Force(int rx, unsigned domain);
164 void Collapse(DomainValue *dv, unsigned domain);
165 bool Merge(DomainValue *A, DomainValue *B);
166
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000167 void enterBasicBlock();
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000168 void visitGenericInstr(MachineInstr*);
169 void visitSoftInstr(MachineInstr*, unsigned mask);
170 void visitHardInstr(MachineInstr*, unsigned domain);
171
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000172};
173}
174
175char SSEDomainFixPass::ID = 0;
176
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000177/// Translate TRI register number to an index into our smaller tables of
178/// interesting registers. Return -1 for boring registers.
179int SSEDomainFixPass::RegIndex(unsigned reg) {
180 // Registers are sorted lexicographically.
181 // We just need them to be consecutive, ordering doesn't matter.
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000182 assert(X86::XMM9 == X86::XMM0+NumRegs-1 && "Unexpected sort");
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000183 reg -= X86::XMM0;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000184 return reg < NumRegs ? reg : -1;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000185}
186
187/// Set LiveRegs[rx] = dv, updating reference counts.
188void SSEDomainFixPass::SetLiveReg(int rx, DomainValue *dv) {
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000189 assert(unsigned(rx) < NumRegs && "Invalid index");
190 if (!LiveRegs)
191 LiveRegs = (DomainValue**)calloc(sizeof(DomainValue*), NumRegs);
192
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000193 if (LiveRegs[rx] == dv)
194 return;
195 if (LiveRegs[rx]) {
196 assert(LiveRegs[rx]->Refs && "Bad refcount");
197 if (--LiveRegs[rx]->Refs == 0) Pool.Recycle(LiveRegs[rx]);
198 }
199 LiveRegs[rx] = dv;
200 if (dv) ++dv->Refs;
201}
202
203// Kill register rx, recycle or collapse any DomainValue.
204void SSEDomainFixPass::Kill(int rx) {
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000205 assert(unsigned(rx) < NumRegs && "Invalid index");
206 if (!LiveRegs || !LiveRegs[rx]) return;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000207
208 // Before killing the last reference to an open DomainValue, collapse it to
209 // the first available domain.
210 if (LiveRegs[rx]->Refs == 1 && !LiveRegs[rx]->collapsed())
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000211 Collapse(LiveRegs[rx], LiveRegs[rx]->firstDomain());
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000212 else
213 SetLiveReg(rx, 0);
214}
215
216/// Force register rx into domain.
217void SSEDomainFixPass::Force(int rx, unsigned domain) {
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000218 assert(unsigned(rx) < NumRegs && "Invalid index");
Jakob Stoklund Olesend77f8182010-03-30 00:09:32 +0000219 DomainValue *dv;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000220 if (LiveRegs && (dv = LiveRegs[rx])) {
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000221 if (dv->collapsed())
222 dv->add(domain);
223 else
224 Collapse(dv, domain);
225 } else {
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000226 // Set up basic collapsed DomainValue.
Jakob Stoklund Olesend77f8182010-03-30 00:09:32 +0000227 dv = Pool.Alloc();
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000228 dv->Dist = Distance;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000229 dv->add(domain);
230 SetLiveReg(rx, dv);
231 }
232}
233
234/// Collapse open DomainValue into given domain. If there are multiple
235/// registers using dv, they each get a unique collapsed DomainValue.
236void SSEDomainFixPass::Collapse(DomainValue *dv, unsigned domain) {
237 assert(dv->compat(1u << domain) && "Cannot collapse");
238
239 // Collapse all the instructions.
240 while (!dv->Instrs.empty()) {
241 MachineInstr *mi = dv->Instrs.back();
242 TII->SetSSEDomain(mi, domain);
243 dv->Instrs.pop_back();
244 }
245 dv->Mask = 1u << domain;
246
247 // If there are multiple users, give them new, unique DomainValues.
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000248 if (LiveRegs && dv->Refs > 1) {
249 for (unsigned rx = 0; rx != NumRegs; ++rx)
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000250 if (LiveRegs[rx] == dv) {
251 DomainValue *dv2 = Pool.Alloc();
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000252 dv2->Dist = Distance;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000253 dv2->add(domain);
254 SetLiveReg(rx, dv2);
255 }
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000256 }
257}
258
259/// Merge - All instructions and registers in B are moved to A, and B is
260/// released.
261bool SSEDomainFixPass::Merge(DomainValue *A, DomainValue *B) {
262 assert(!A->collapsed() && "Cannot merge into collapsed");
263 assert(!B->collapsed() && "Cannot merge from collapsed");
264 if (!A->compat(B->Mask))
265 return false;
266 A->Mask &= B->Mask;
267 A->Dist = std::max(A->Dist, B->Dist);
268 A->Instrs.append(B->Instrs.begin(), B->Instrs.end());
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000269 for (unsigned rx = 0; rx != NumRegs; ++rx)
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000270 if (LiveRegs[rx] == B)
271 SetLiveReg(rx, A);
272 return true;
273}
274
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000275void SSEDomainFixPass::enterBasicBlock() {
276 // Try to coalesce live-out registers from predecessors.
277 for (MachineBasicBlock::const_livein_iterator i = MBB->livein_begin(),
278 e = MBB->livein_end(); i != e; ++i) {
279 int rx = RegIndex(*i);
280 if (rx < 0) continue;
281 for (MachineBasicBlock::const_pred_iterator pi = MBB->pred_begin(),
282 pe = MBB->pred_end(); pi != pe; ++pi) {
283 LiveOutMap::const_iterator fi = LiveOuts.find(*pe);
284 if (fi == LiveOuts.end()) continue;
285 DomainValue *pdv = fi->second[rx];
286 if (!pdv) continue;
287 if (!LiveRegs || !LiveRegs[rx])
288 SetLiveReg(rx, pdv);
289 else {
290 // We have a live DomainValue from more than one predecessor.
291 if (LiveRegs[rx]->collapsed()) {
292 // We are already collapsed, but predecessor is not. Force him.
293 if (!pdv->collapsed())
294 Collapse(pdv, LiveRegs[rx]->firstDomain());
295 } else {
296 // Currently open, merge in predecessor.
297 if (!pdv->collapsed())
298 Merge(LiveRegs[rx], pdv);
299 else
300 Collapse(LiveRegs[rx], pdv->firstDomain());
301 }
302 }
303 }
304 }
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000305}
306
307// A hard instruction only works in one domain. All input registers will be
308// forced into that domain.
309void SSEDomainFixPass::visitHardInstr(MachineInstr *mi, unsigned domain) {
310 // Collapse all uses.
311 for (unsigned i = mi->getDesc().getNumDefs(),
312 e = mi->getDesc().getNumOperands(); i != e; ++i) {
313 MachineOperand &mo = mi->getOperand(i);
314 if (!mo.isReg()) continue;
315 int rx = RegIndex(mo.getReg());
316 if (rx < 0) continue;
317 Force(rx, domain);
318 }
319
320 // Kill all defs and force them.
321 for (unsigned i = 0, e = mi->getDesc().getNumDefs(); i != e; ++i) {
322 MachineOperand &mo = mi->getOperand(i);
323 if (!mo.isReg()) continue;
324 int rx = RegIndex(mo.getReg());
325 if (rx < 0) continue;
326 Kill(rx);
327 Force(rx, domain);
328 }
329}
330
331// A soft instruction can be changed to work in other domains given by mask.
332void SSEDomainFixPass::visitSoftInstr(MachineInstr *mi, unsigned mask) {
333 // Scan the explicit use operands for incoming domains.
334 unsigned collmask = mask;
335 SmallVector<int, 4> used;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000336 if (LiveRegs)
337 for (unsigned i = mi->getDesc().getNumDefs(),
338 e = mi->getDesc().getNumOperands(); i != e; ++i) {
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000339 MachineOperand &mo = mi->getOperand(i);
340 if (!mo.isReg()) continue;
341 int rx = RegIndex(mo.getReg());
342 if (rx < 0) continue;
343 if (DomainValue *dv = LiveRegs[rx]) {
344 // Is it possible to use this collapsed register for free?
345 if (dv->collapsed()) {
346 if (unsigned m = collmask & dv->Mask)
347 collmask = m;
348 } else if (dv->compat(collmask))
349 used.push_back(rx);
350 else
351 Kill(rx);
352 }
353 }
354
355 // If the collapsed operands force a single domain, propagate the collapse.
356 if (isPowerOf2_32(collmask)) {
357 unsigned domain = CountTrailingZeros_32(collmask);
358 TII->SetSSEDomain(mi, domain);
359 visitHardInstr(mi, domain);
360 return;
361 }
362
363 // Kill off any remaining uses that don't match collmask, and build a list of
364 // incoming DomainValue that we want to merge.
365 SmallVector<DomainValue*,4> doms;
366 for (SmallVector<int, 4>::iterator i=used.begin(), e=used.end(); i!=e; ++i) {
367 int rx = *i;
368 DomainValue *dv = LiveRegs[rx];
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000369 // This useless DomainValue could have been missed above.
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000370 if (!dv->compat(collmask)) {
371 Kill(*i);
372 continue;
373 }
374 // sorted, uniqued insert.
375 bool inserted = false;
376 for (SmallVector<DomainValue*,4>::iterator i = doms.begin(), e = doms.end();
377 i != e && !inserted; ++i) {
378 if (dv == *i)
379 inserted = true;
380 else if (dv->Dist < (*i)->Dist) {
381 inserted = true;
382 doms.insert(i, dv);
383 }
384 }
385 if (!inserted)
386 doms.push_back(dv);
387 }
388
389 // doms are now sorted in order of appearance. Try to merge them all, giving
390 // priority to the latest ones.
391 DomainValue *dv = 0;
392 while (!doms.empty()) {
393 if (!dv)
394 dv = doms.back();
395 else if (!Merge(dv, doms.back()))
396 for (SmallVector<int,4>::iterator i=used.begin(), e=used.end(); i!=e; ++i)
397 if (LiveRegs[*i] == doms.back())
398 Kill(*i);
399 doms.pop_back();
400 }
401
402 // dv is the DomainValue we are going to use for this instruction.
403 if (!dv)
404 dv = Pool.Alloc();
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000405 dv->Dist = Distance;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000406 dv->Mask = collmask;
407 dv->Instrs.push_back(mi);
408
409 // Finally set all defs and non-collapsed uses to dv.
410 for (unsigned i = 0, e = mi->getDesc().getNumOperands(); i != e; ++i) {
411 MachineOperand &mo = mi->getOperand(i);
412 if (!mo.isReg()) continue;
413 int rx = RegIndex(mo.getReg());
414 if (rx < 0) continue;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000415 if (!LiveRegs || !LiveRegs[rx] || (mo.isDef() && LiveRegs[rx]!=dv)) {
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000416 Kill(rx);
417 SetLiveReg(rx, dv);
418 }
419 }
420}
421
422void SSEDomainFixPass::visitGenericInstr(MachineInstr *mi) {
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000423 // Process explicit defs, kill any XMM registers redefined.
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000424 for (unsigned i = 0, e = mi->getDesc().getNumDefs(); i != e; ++i) {
425 MachineOperand &mo = mi->getOperand(i);
426 if (!mo.isReg()) continue;
427 int rx = RegIndex(mo.getReg());
428 if (rx < 0) continue;
429 Kill(rx);
430 }
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000431}
432
433bool SSEDomainFixPass::runOnMachineFunction(MachineFunction &mf) {
434 MF = &mf;
435 TII = static_cast<const X86InstrInfo*>(MF->getTarget().getInstrInfo());
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000436 TRI = MF->getTarget().getRegisterInfo();
437 MBB = 0;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000438 LiveRegs = 0;
439 Distance = 0;
440 assert(NumRegs == X86::VR128RegClass.getNumRegs() && "Bad regclass");
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000441
442 // If no XMM registers are used in the function, we can skip it completely.
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000443 bool anyregs = false;
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000444 for (TargetRegisterClass::const_iterator I = X86::VR128RegClass.begin(),
445 E = X86::VR128RegClass.end(); I != E; ++I)
446 if (MF->getRegInfo().isPhysRegUsed(*I)) {
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000447 anyregs = true;
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000448 break;
449 }
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000450 if (!anyregs) return false;
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000451
452 MachineBasicBlock *Entry = MF->begin();
453 SmallPtrSet<MachineBasicBlock*, 16> Visited;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000454 for (df_ext_iterator<MachineBasicBlock*, SmallPtrSet<MachineBasicBlock*, 16> >
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000455 DFI = df_ext_begin(Entry, Visited), DFE = df_ext_end(Entry, Visited);
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000456 DFI != DFE; ++DFI) {
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000457 MBB = *DFI;
458 enterBasicBlock();
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000459 for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E;
460 ++I) {
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000461 MachineInstr *mi = I;
462 if (mi->isDebugValue()) continue;
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000463 ++Distance;
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000464 std::pair<uint16_t, uint16_t> domp = TII->GetSSEDomain(mi);
465 if (domp.first)
466 if (domp.second)
467 visitSoftInstr(mi, domp.second);
468 else
469 visitHardInstr(mi, domp.first);
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000470 else if (LiveRegs)
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000471 visitGenericInstr(mi);
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000472 }
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000473
474 // Save live registers at end of MBB - used by enterBasicBlock().
475 if (LiveRegs)
476 LiveOuts.insert(std::make_pair(MBB, LiveRegs));
477 LiveRegs = 0;
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000478 }
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000479
Jakob Stoklund Olesen1a5d2a82010-03-30 20:04:01 +0000480 // Clear the LiveOuts vectors. Should we also collapse any remaining
481 // DomainValues?
482 for (LiveOutMap::const_iterator i = LiveOuts.begin(), e = LiveOuts.end();
483 i != e; ++i)
484 free(i->second);
485 LiveOuts.clear();
Jakob Stoklund Olesene4b94b42010-03-29 23:24:21 +0000486 Pool.Clear();
487
Jakob Stoklund Olesen352aa502010-03-25 17:25:00 +0000488 return false;
489}
490
491FunctionPass *llvm::createSSEDomainFixPass() {
492 return new SSEDomainFixPass();
493}