Make it illegal to call getDependency* on non-memory instructions
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolutionExpressions.h
1 //===- llvm/Analysis/ScalarEvolutionExpressions.h - SCEV Exprs --*- 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 defines the classes used to represent and build scalar expressions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPRESSIONS_H
15 #define LLVM_ANALYSIS_SCALAREVOLUTION_EXPRESSIONS_H
16
17 #include "llvm/Analysis/ScalarEvolution.h"
18
19 namespace llvm {
20   class ConstantInt;
21   class ConstantRange;
22   class APInt;
23
24   enum SCEVTypes {
25     // These should be ordered in terms of increasing complexity to make the
26     // folders simpler.
27     scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr,
28     scUDivExpr, scSDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr, scUnknown,
29     scCouldNotCompute
30   };
31
32   //===--------------------------------------------------------------------===//
33   /// SCEVConstant - This class represents a constant integer value.
34   ///
35   class SCEVConstant : public SCEV {
36     friend class ScalarEvolution;
37
38     ConstantInt *V;
39     explicit SCEVConstant(ConstantInt *v) : SCEV(scConstant), V(v) {}
40
41     virtual ~SCEVConstant();
42   public:
43     ConstantInt *getValue() const { return V; }
44
45     virtual bool isLoopInvariant(const Loop *L) const {
46       return true;
47     }
48
49     virtual bool hasComputableLoopEvolution(const Loop *L) const {
50       return false;  // Not loop variant
51     }
52
53     virtual const Type *getType() const;
54
55     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
56                                                  const SCEVHandle &Conc,
57                                                  ScalarEvolution &SE) const {
58       return this;
59     }
60
61     virtual void print(std::ostream &OS) const;
62     void print(std::ostream *OS) const { if (OS) print(*OS); }
63
64     /// Methods for support type inquiry through isa, cast, and dyn_cast:
65     static inline bool classof(const SCEVConstant *S) { return true; }
66     static inline bool classof(const SCEV *S) {
67       return S->getSCEVType() == scConstant;
68     }
69   };
70
71   //===--------------------------------------------------------------------===//
72   /// SCEVTruncateExpr - This class represents a truncation of an integer value
73   /// to a smaller integer value.
74   ///
75   class SCEVTruncateExpr : public SCEV {
76     friend class ScalarEvolution;
77
78     SCEVHandle Op;
79     const Type *Ty;
80     SCEVTruncateExpr(const SCEVHandle &op, const Type *ty);
81     virtual ~SCEVTruncateExpr();
82   public:
83     const SCEVHandle &getOperand() const { return Op; }
84     virtual const Type *getType() const { return Ty; }
85
86     virtual bool isLoopInvariant(const Loop *L) const {
87       return Op->isLoopInvariant(L);
88     }
89
90     virtual bool hasComputableLoopEvolution(const Loop *L) const {
91       return Op->hasComputableLoopEvolution(L);
92     }
93
94     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
95                                                  const SCEVHandle &Conc,
96                                                  ScalarEvolution &SE) const {
97       SCEVHandle H = Op->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
98       if (H == Op)
99         return this;
100       return SE.getTruncateExpr(H, Ty);
101     }
102
103     virtual void print(std::ostream &OS) const;
104     void print(std::ostream *OS) const { if (OS) print(*OS); }
105
106     /// Methods for support type inquiry through isa, cast, and dyn_cast:
107     static inline bool classof(const SCEVTruncateExpr *S) { return true; }
108     static inline bool classof(const SCEV *S) {
109       return S->getSCEVType() == scTruncate;
110     }
111   };
112
113   //===--------------------------------------------------------------------===//
114   /// SCEVZeroExtendExpr - This class represents a zero extension of a small
115   /// integer value to a larger integer value.
116   ///
117   class SCEVZeroExtendExpr : public SCEV {
118     friend class ScalarEvolution;
119
120     SCEVHandle Op;
121     const Type *Ty;
122     SCEVZeroExtendExpr(const SCEVHandle &op, const Type *ty);
123     virtual ~SCEVZeroExtendExpr();
124   public:
125     const SCEVHandle &getOperand() const { return Op; }
126     virtual const Type *getType() const { return Ty; }
127
128     virtual bool isLoopInvariant(const Loop *L) const {
129       return Op->isLoopInvariant(L);
130     }
131
132     virtual bool hasComputableLoopEvolution(const Loop *L) const {
133       return Op->hasComputableLoopEvolution(L);
134     }
135
136     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
137                                                  const SCEVHandle &Conc,
138                                                  ScalarEvolution &SE) const {
139       SCEVHandle H = Op->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
140       if (H == Op)
141         return this;
142       return SE.getZeroExtendExpr(H, Ty);
143     }
144
145     virtual void print(std::ostream &OS) const;
146     void print(std::ostream *OS) const { if (OS) print(*OS); }
147
148     /// Methods for support type inquiry through isa, cast, and dyn_cast:
149     static inline bool classof(const SCEVZeroExtendExpr *S) { return true; }
150     static inline bool classof(const SCEV *S) {
151       return S->getSCEVType() == scZeroExtend;
152     }
153   };
154
155   //===--------------------------------------------------------------------===//
156   /// SCEVSignExtendExpr - This class represents a sign extension of a small
157   /// integer value to a larger integer value.
158   ///
159   class SCEVSignExtendExpr : public SCEV {
160     friend class ScalarEvolution;
161
162     SCEVHandle Op;
163     const Type *Ty;
164     SCEVSignExtendExpr(const SCEVHandle &op, const Type *ty);
165     virtual ~SCEVSignExtendExpr();
166   public:
167     const SCEVHandle &getOperand() const { return Op; }
168     virtual const Type *getType() const { return Ty; }
169
170     virtual bool isLoopInvariant(const Loop *L) const {
171       return Op->isLoopInvariant(L);
172     }
173
174     virtual bool hasComputableLoopEvolution(const Loop *L) const {
175       return Op->hasComputableLoopEvolution(L);
176     }
177
178     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
179                                                  const SCEVHandle &Conc,
180                                                  ScalarEvolution &SE) const {
181       SCEVHandle H = Op->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
182       if (H == Op)
183         return this;
184       return SE.getSignExtendExpr(H, Ty);
185     }
186
187     virtual void print(std::ostream &OS) const;
188     void print(std::ostream *OS) const { if (OS) print(*OS); }
189
190     /// Methods for support type inquiry through isa, cast, and dyn_cast:
191     static inline bool classof(const SCEVSignExtendExpr *S) { return true; }
192     static inline bool classof(const SCEV *S) {
193       return S->getSCEVType() == scSignExtend;
194     }
195   };
196
197
198   //===--------------------------------------------------------------------===//
199   /// SCEVCommutativeExpr - This node is the base class for n'ary commutative
200   /// operators.
201   ///
202   class SCEVCommutativeExpr : public SCEV {
203     friend class ScalarEvolution;
204
205     std::vector<SCEVHandle> Operands;
206
207   protected:
208     SCEVCommutativeExpr(enum SCEVTypes T, const std::vector<SCEVHandle> &ops)
209       : SCEV(T) {
210       Operands.reserve(ops.size());
211       Operands.insert(Operands.end(), ops.begin(), ops.end());
212     }
213     ~SCEVCommutativeExpr();
214
215   public:
216     unsigned getNumOperands() const { return (unsigned)Operands.size(); }
217     const SCEVHandle &getOperand(unsigned i) const {
218       assert(i < Operands.size() && "Operand index out of range!");
219       return Operands[i];
220     }
221
222     const std::vector<SCEVHandle> &getOperands() const { return Operands; }
223     typedef std::vector<SCEVHandle>::const_iterator op_iterator;
224     op_iterator op_begin() const { return Operands.begin(); }
225     op_iterator op_end() const { return Operands.end(); }
226
227
228     virtual bool isLoopInvariant(const Loop *L) const {
229       for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
230         if (!getOperand(i)->isLoopInvariant(L)) return false;
231       return true;
232     }
233
234     // hasComputableLoopEvolution - Commutative expressions have computable loop
235     // evolutions iff they have at least one operand that varies with the loop,
236     // but that all varying operands are computable.
237     virtual bool hasComputableLoopEvolution(const Loop *L) const {
238       bool HasVarying = false;
239       for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
240         if (!getOperand(i)->isLoopInvariant(L)) {
241           if (getOperand(i)->hasComputableLoopEvolution(L))
242             HasVarying = true;
243           else
244             return false;
245         }
246       return HasVarying;
247     }
248
249     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
250                                                  const SCEVHandle &Conc,
251                                                  ScalarEvolution &SE) const;
252
253     virtual const char *getOperationStr() const = 0;
254
255     virtual const Type *getType() const { return getOperand(0)->getType(); }
256     virtual void print(std::ostream &OS) const;
257     void print(std::ostream *OS) const { if (OS) print(*OS); }
258
259     /// Methods for support type inquiry through isa, cast, and dyn_cast:
260     static inline bool classof(const SCEVCommutativeExpr *S) { return true; }
261     static inline bool classof(const SCEV *S) {
262       return S->getSCEVType() == scAddExpr ||
263              S->getSCEVType() == scMulExpr ||
264              S->getSCEVType() == scSMaxExpr ||
265              S->getSCEVType() == scUMaxExpr;
266     }
267   };
268
269
270   //===--------------------------------------------------------------------===//
271   /// SCEVAddExpr - This node represents an addition of some number of SCEVs.
272   ///
273   class SCEVAddExpr : public SCEVCommutativeExpr {
274     friend class ScalarEvolution;
275
276     explicit SCEVAddExpr(const std::vector<SCEVHandle> &ops)
277       : SCEVCommutativeExpr(scAddExpr, ops) {
278     }
279
280   public:
281     virtual const char *getOperationStr() const { return " + "; }
282
283     /// Methods for support type inquiry through isa, cast, and dyn_cast:
284     static inline bool classof(const SCEVAddExpr *S) { return true; }
285     static inline bool classof(const SCEV *S) {
286       return S->getSCEVType() == scAddExpr;
287     }
288   };
289
290   //===--------------------------------------------------------------------===//
291   /// SCEVMulExpr - This node represents multiplication of some number of SCEVs.
292   ///
293   class SCEVMulExpr : public SCEVCommutativeExpr {
294     friend class ScalarEvolution;
295
296     explicit SCEVMulExpr(const std::vector<SCEVHandle> &ops)
297       : SCEVCommutativeExpr(scMulExpr, ops) {
298     }
299
300   public:
301     virtual const char *getOperationStr() const { return " * "; }
302
303     /// Methods for support type inquiry through isa, cast, and dyn_cast:
304     static inline bool classof(const SCEVMulExpr *S) { return true; }
305     static inline bool classof(const SCEV *S) {
306       return S->getSCEVType() == scMulExpr;
307     }
308   };
309
310
311   //===--------------------------------------------------------------------===//
312   /// SCEVUDivExpr - This class represents a binary unsigned division operation.
313   ///
314   class SCEVUDivExpr : public SCEV {
315     friend class ScalarEvolution;
316
317     SCEVHandle LHS, RHS;
318     SCEVUDivExpr(const SCEVHandle &lhs, const SCEVHandle &rhs)
319       : SCEV(scUDivExpr), LHS(lhs), RHS(rhs) {}
320
321     virtual ~SCEVUDivExpr();
322   public:
323     const SCEVHandle &getLHS() const { return LHS; }
324     const SCEVHandle &getRHS() const { return RHS; }
325
326     virtual bool isLoopInvariant(const Loop *L) const {
327       return LHS->isLoopInvariant(L) && RHS->isLoopInvariant(L);
328     }
329
330     virtual bool hasComputableLoopEvolution(const Loop *L) const {
331       return LHS->hasComputableLoopEvolution(L) &&
332              RHS->hasComputableLoopEvolution(L);
333     }
334
335     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
336                                                  const SCEVHandle &Conc,
337                                                  ScalarEvolution &SE) const {
338       SCEVHandle L = LHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
339       SCEVHandle R = RHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
340       if (L == LHS && R == RHS)
341         return this;
342       else
343         return SE.getUDivExpr(L, R);
344     }
345
346
347     virtual const Type *getType() const;
348
349     void print(std::ostream &OS) const;
350     void print(std::ostream *OS) const { if (OS) print(*OS); }
351
352     /// Methods for support type inquiry through isa, cast, and dyn_cast:
353     static inline bool classof(const SCEVUDivExpr *S) { return true; }
354     static inline bool classof(const SCEV *S) {
355       return S->getSCEVType() == scUDivExpr;
356     }
357   };
358
359
360   //===--------------------------------------------------------------------===//
361   /// SCEVSDivExpr - This class represents a binary signed division operation.
362   ///
363   class SCEVSDivExpr : public SCEV {
364     friend class ScalarEvolution;
365
366     SCEVHandle LHS, RHS;
367     SCEVSDivExpr(const SCEVHandle &lhs, const SCEVHandle &rhs)
368       : SCEV(scSDivExpr), LHS(lhs), RHS(rhs) {}
369
370     virtual ~SCEVSDivExpr();
371   public:
372     const SCEVHandle &getLHS() const { return LHS; }
373     const SCEVHandle &getRHS() const { return RHS; }
374
375     virtual bool isLoopInvariant(const Loop *L) const {
376       return LHS->isLoopInvariant(L) && RHS->isLoopInvariant(L);
377     }
378
379     virtual bool hasComputableLoopEvolution(const Loop *L) const {
380       return LHS->hasComputableLoopEvolution(L) &&
381              RHS->hasComputableLoopEvolution(L);
382     }
383
384     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
385                                                  const SCEVHandle &Conc,
386                                                  ScalarEvolution &SE) const {
387       SCEVHandle L = LHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
388       SCEVHandle R = RHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
389       if (L == LHS && R == RHS)
390         return this;
391       else
392         return SE.getSDivExpr(L, R);
393     }
394
395
396     virtual const Type *getType() const;
397
398     void print(std::ostream &OS) const;
399     void print(std::ostream *OS) const { if (OS) print(*OS); }
400
401     /// Methods for support type inquiry through isa, cast, and dyn_cast:
402     static inline bool classof(const SCEVSDivExpr *S) { return true; }
403     static inline bool classof(const SCEV *S) {
404       return S->getSCEVType() == scSDivExpr;
405     }
406   };
407
408
409   //===--------------------------------------------------------------------===//
410   /// SCEVAddRecExpr - This node represents a polynomial recurrence on the trip
411   /// count of the specified loop.
412   ///
413   /// All operands of an AddRec are required to be loop invariant.
414   ///
415   class SCEVAddRecExpr : public SCEV {
416     friend class ScalarEvolution;
417
418     std::vector<SCEVHandle> Operands;
419     const Loop *L;
420
421     SCEVAddRecExpr(const std::vector<SCEVHandle> &ops, const Loop *l)
422       : SCEV(scAddRecExpr), Operands(ops), L(l) {
423       for (size_t i = 0, e = Operands.size(); i != e; ++i)
424         assert(Operands[i]->isLoopInvariant(l) &&
425                "Operands of AddRec must be loop-invariant!");
426     }
427     ~SCEVAddRecExpr();
428   public:
429     typedef std::vector<SCEVHandle>::const_iterator op_iterator;
430     op_iterator op_begin() const { return Operands.begin(); }
431     op_iterator op_end() const { return Operands.end(); }
432
433     unsigned getNumOperands() const { return (unsigned)Operands.size(); }
434     const SCEVHandle &getOperand(unsigned i) const { return Operands[i]; }
435     const SCEVHandle &getStart() const { return Operands[0]; }
436     const Loop *getLoop() const { return L; }
437
438
439     /// getStepRecurrence - This method constructs and returns the recurrence
440     /// indicating how much this expression steps by.  If this is a polynomial
441     /// of degree N, it returns a chrec of degree N-1.
442     SCEVHandle getStepRecurrence(ScalarEvolution &SE) const {
443       if (isAffine()) return getOperand(1);
444       return SE.getAddRecExpr(std::vector<SCEVHandle>(op_begin()+1,op_end()),
445                               getLoop());
446     }
447
448     virtual bool hasComputableLoopEvolution(const Loop *QL) const {
449       if (L == QL) return true;
450       return false;
451     }
452
453     virtual bool isLoopInvariant(const Loop *QueryLoop) const;
454
455     virtual const Type *getType() const { return Operands[0]->getType(); }
456
457     /// isAffine - Return true if this is an affine AddRec (i.e., it represents
458     /// an expressions A+B*x where A and B are loop invariant values.
459     bool isAffine() const {
460       // We know that the start value is invariant.  This expression is thus
461       // affine iff the step is also invariant.
462       return getNumOperands() == 2;
463     }
464
465     /// isQuadratic - Return true if this is an quadratic AddRec (i.e., it
466     /// represents an expressions A+B*x+C*x^2 where A, B and C are loop
467     /// invariant values.  This corresponds to an addrec of the form {L,+,M,+,N}
468     bool isQuadratic() const {
469       return getNumOperands() == 3;
470     }
471
472     /// evaluateAtIteration - Return the value of this chain of recurrences at
473     /// the specified iteration number.
474     SCEVHandle evaluateAtIteration(SCEVHandle It, ScalarEvolution &SE) const;
475
476     /// getNumIterationsInRange - Return the number of iterations of this loop
477     /// that produce values in the specified constant range.  Another way of
478     /// looking at this is that it returns the first iteration number where the
479     /// value is not in the condition, thus computing the exit count.  If the
480     /// iteration count can't be computed, an instance of SCEVCouldNotCompute is
481     /// returned.
482     SCEVHandle getNumIterationsInRange(ConstantRange Range,
483                                        ScalarEvolution &SE) const;
484
485     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
486                                                  const SCEVHandle &Conc,
487                                                  ScalarEvolution &SE) const;
488
489     virtual void print(std::ostream &OS) const;
490     void print(std::ostream *OS) const { if (OS) print(*OS); }
491
492     /// Methods for support type inquiry through isa, cast, and dyn_cast:
493     static inline bool classof(const SCEVAddRecExpr *S) { return true; }
494     static inline bool classof(const SCEV *S) {
495       return S->getSCEVType() == scAddRecExpr;
496     }
497   };
498
499
500   //===--------------------------------------------------------------------===//
501   /// SCEVSMaxExpr - This class represents a signed maximum selection.
502   ///
503   class SCEVSMaxExpr : public SCEVCommutativeExpr {
504     friend class ScalarEvolution;
505
506     explicit SCEVSMaxExpr(const std::vector<SCEVHandle> &ops)
507       : SCEVCommutativeExpr(scSMaxExpr, ops) {
508     }
509
510   public:
511     virtual const char *getOperationStr() const { return " smax "; }
512
513     /// Methods for support type inquiry through isa, cast, and dyn_cast:
514     static inline bool classof(const SCEVSMaxExpr *S) { return true; }
515     static inline bool classof(const SCEV *S) {
516       return S->getSCEVType() == scSMaxExpr;
517     }
518   };
519
520
521   //===--------------------------------------------------------------------===//
522   /// SCEVUMaxExpr - This class represents an unsigned maximum selection.
523   ///
524   class SCEVUMaxExpr : public SCEVCommutativeExpr {
525     friend class ScalarEvolution;
526
527     explicit SCEVUMaxExpr(const std::vector<SCEVHandle> &ops)
528       : SCEVCommutativeExpr(scUMaxExpr, ops) {
529     }
530
531   public:
532     virtual const char *getOperationStr() const { return " umax "; }
533
534     /// Methods for support type inquiry through isa, cast, and dyn_cast:
535     static inline bool classof(const SCEVUMaxExpr *S) { return true; }
536     static inline bool classof(const SCEV *S) {
537       return S->getSCEVType() == scUMaxExpr;
538     }
539   };
540
541
542   //===--------------------------------------------------------------------===//
543   /// SCEVUnknown - This means that we are dealing with an entirely unknown SCEV
544   /// value, and only represent it as it's LLVM Value.  This is the "bottom"
545   /// value for the analysis.
546   ///
547   class SCEVUnknown : public SCEV {
548     friend class ScalarEvolution;
549
550     Value *V;
551     explicit SCEVUnknown(Value *v) : SCEV(scUnknown), V(v) {}
552
553   protected:
554     ~SCEVUnknown();
555   public:
556     Value *getValue() const { return V; }
557
558     virtual bool isLoopInvariant(const Loop *L) const;
559     virtual bool hasComputableLoopEvolution(const Loop *QL) const {
560       return false; // not computable
561     }
562
563     SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
564                                                  const SCEVHandle &Conc,
565                                                  ScalarEvolution &SE) const {
566       if (&*Sym == this) return Conc;
567       return this;
568     }
569
570     virtual const Type *getType() const;
571
572     virtual void print(std::ostream &OS) const;
573     void print(std::ostream *OS) const { if (OS) print(*OS); }
574
575     /// Methods for support type inquiry through isa, cast, and dyn_cast:
576     static inline bool classof(const SCEVUnknown *S) { return true; }
577     static inline bool classof(const SCEV *S) {
578       return S->getSCEVType() == scUnknown;
579     }
580   };
581
582   /// SCEVVisitor - This class defines a simple visitor class that may be used
583   /// for various SCEV analysis purposes.
584   template<typename SC, typename RetVal=void>
585   struct SCEVVisitor {
586     RetVal visit(SCEV *S) {
587       switch (S->getSCEVType()) {
588       case scConstant:
589         return ((SC*)this)->visitConstant((SCEVConstant*)S);
590       case scTruncate:
591         return ((SC*)this)->visitTruncateExpr((SCEVTruncateExpr*)S);
592       case scZeroExtend:
593         return ((SC*)this)->visitZeroExtendExpr((SCEVZeroExtendExpr*)S);
594       case scSignExtend:
595         return ((SC*)this)->visitSignExtendExpr((SCEVSignExtendExpr*)S);
596       case scAddExpr:
597         return ((SC*)this)->visitAddExpr((SCEVAddExpr*)S);
598       case scMulExpr:
599         return ((SC*)this)->visitMulExpr((SCEVMulExpr*)S);
600       case scUDivExpr:
601         return ((SC*)this)->visitUDivExpr((SCEVUDivExpr*)S);
602       case scSDivExpr:
603         return ((SC*)this)->visitSDivExpr((SCEVSDivExpr*)S);
604       case scAddRecExpr:
605         return ((SC*)this)->visitAddRecExpr((SCEVAddRecExpr*)S);
606       case scSMaxExpr:
607         return ((SC*)this)->visitSMaxExpr((SCEVSMaxExpr*)S);
608       case scUMaxExpr:
609         return ((SC*)this)->visitUMaxExpr((SCEVUMaxExpr*)S);
610       case scUnknown:
611         return ((SC*)this)->visitUnknown((SCEVUnknown*)S);
612       case scCouldNotCompute:
613         return ((SC*)this)->visitCouldNotCompute((SCEVCouldNotCompute*)S);
614       default:
615         assert(0 && "Unknown SCEV type!");
616         abort();
617       }
618     }
619
620     RetVal visitCouldNotCompute(SCEVCouldNotCompute *S) {
621       assert(0 && "Invalid use of SCEVCouldNotCompute!");
622       abort();
623       return RetVal();
624     }
625   };
626 }
627
628 #endif