Coverage Report

Created: 2018-07-19 03:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
Line
Count
Source (jump to first uncovered line)
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_SCALAREVOLUTIONEXPRESSIONS_H
15
#define LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H
16
17
#include "llvm/ADT/DenseMap.h"
18
#include "llvm/ADT/FoldingSet.h"
19
#include "llvm/ADT/SmallPtrSet.h"
20
#include "llvm/ADT/SmallVector.h"
21
#include "llvm/ADT/iterator_range.h"
22
#include "llvm/Analysis/ScalarEvolution.h"
23
#include "llvm/IR/Constants.h"
24
#include "llvm/IR/Value.h"
25
#include "llvm/IR/ValueHandle.h"
26
#include "llvm/Support/Casting.h"
27
#include "llvm/Support/ErrorHandling.h"
28
#include <cassert>
29
#include <cstddef>
30
31
namespace llvm {
32
33
class APInt;
34
class Constant;
35
class ConstantRange;
36
class Loop;
37
class Type;
38
39
  enum SCEVTypes {
40
    // These should be ordered in terms of increasing complexity to make the
41
    // folders simpler.
42
    scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr,
43
    scUDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr,
44
    scUnknown, scCouldNotCompute
45
  };
46
47
  /// This class represents a constant integer value.
48
  class SCEVConstant : public SCEV {
49
    friend class ScalarEvolution;
50
51
    ConstantInt *V;
52
53
    SCEVConstant(const FoldingSetNodeIDRef ID, ConstantInt *v) :
54
5.31M
      SCEV(ID, scConstant), V(v) {}
55
56
  public:
57
329M
    ConstantInt *getValue() const { return V; }
58
197M
    const APInt &getAPInt() const { return getValue()->getValue(); }
59
60
93.9M
    Type *getType() const { return V->getType(); }
61
62
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
63
495M
    static bool classof(const SCEV *S) {
64
495M
      return S->getSCEVType() == scConstant;
65
495M
    }
66
  };
67
68
  /// This is the base class for unary cast operator classes.
69
  class SCEVCastExpr : public SCEV {
70
  protected:
71
    const SCEV *Op;
72
    Type *Ty;
73
74
    SCEVCastExpr(const FoldingSetNodeIDRef ID,
75
                 unsigned SCEVTy, const SCEV *op, Type *ty);
76
77
  public:
78
30.1M
    const SCEV *getOperand() const { return Op; }
79
9.83M
    Type *getType() const { return Ty; }
80
81
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
82
6.69M
    static bool classof(const SCEV *S) {
83
6.69M
      return S->getSCEVType() == scTruncate ||
84
6.69M
             
S->getSCEVType() == scZeroExtend6.68M
||
85
6.69M
             
S->getSCEVType() == scSignExtend6.52M
;
86
6.69M
    }
87
  };
88
89
  /// This class represents a truncation of an integer value to a
90
  /// smaller integer value.
91
  class SCEVTruncateExpr : public SCEVCastExpr {
92
    friend class ScalarEvolution;
93
94
    SCEVTruncateExpr(const FoldingSetNodeIDRef ID,
95
                     const SCEV *op, Type *ty);
96
97
  public:
98
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
99
58.0M
    static bool classof(const SCEV *S) {
100
58.0M
      return S->getSCEVType() == scTruncate;
101
58.0M
    }
102
  };
103
104
  /// This class represents a zero extension of a small integer value
105
  /// to a larger integer value.
106
  class SCEVZeroExtendExpr : public SCEVCastExpr {
107
    friend class ScalarEvolution;
108
109
    SCEVZeroExtendExpr(const FoldingSetNodeIDRef ID,
110
                       const SCEV *op, Type *ty);
111
112
  public:
113
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
114
30.1M
    static bool classof(const SCEV *S) {
115
30.1M
      return S->getSCEVType() == scZeroExtend;
116
30.1M
    }
117
  };
118
119
  /// This class represents a sign extension of a small integer value
120
  /// to a larger integer value.
121
  class SCEVSignExtendExpr : public SCEVCastExpr {
122
    friend class ScalarEvolution;
123
124
    SCEVSignExtendExpr(const FoldingSetNodeIDRef ID,
125
                       const SCEV *op, Type *ty);
126
127
  public:
128
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
129
30.3M
    static bool classof(const SCEV *S) {
130
30.3M
      return S->getSCEVType() == scSignExtend;
131
30.3M
    }
132
  };
133
134
  /// This node is a base class providing common functionality for
135
  /// n'ary operators.
136
  class SCEVNAryExpr : public SCEV {
137
  protected:
138
    // Since SCEVs are immutable, ScalarEvolution allocates operand
139
    // arrays with its SCEVAllocator, so this class just needs a simple
140
    // pointer rather than a more elaborate vector-like data structure.
141
    // This also avoids the need for a non-trivial destructor.
142
    const SCEV *const *Operands;
143
    size_t NumOperands;
144
145
    SCEVNAryExpr(const FoldingSetNodeIDRef ID,
146
                 enum SCEVTypes T, const SCEV *const *O, size_t N)
147
11.5M
      : SCEV(ID, T), Operands(O), NumOperands(N) {}
148
149
  public:
150
146M
    size_t getNumOperands() const { return NumOperands; }
151
152
247M
    const SCEV *getOperand(unsigned i) const {
153
247M
      assert(i < NumOperands && "Operand index out of range!");
154
247M
      return Operands[i];
155
247M
    }
156
157
    using op_iterator = const SCEV *const *;
158
    using op_range = iterator_range<op_iterator>;
159
160
136M
    op_iterator op_begin() const { return Operands; }
161
135M
    op_iterator op_end() const { return Operands + NumOperands; }
162
97.6M
    op_range operands() const {
163
97.6M
      return make_range(op_begin(), op_end());
164
97.6M
    }
165
166
49.8M
    Type *getType() const { return getOperand(0)->getType(); }
167
168
42.6M
    NoWrapFlags getNoWrapFlags(NoWrapFlags Mask = NoWrapMask) const {
169
42.6M
      return (NoWrapFlags)(SubclassData & Mask);
170
42.6M
    }
171
172
9.83M
    bool hasNoUnsignedWrap() const {
173
9.83M
      return getNoWrapFlags(FlagNUW) != FlagAnyWrap;
174
9.83M
    }
175
176
10.7M
    bool hasNoSignedWrap() const {
177
10.7M
      return getNoWrapFlags(FlagNSW) != FlagAnyWrap;
178
10.7M
    }
179
180
59.4k
    bool hasNoSelfWrap() const {
181
59.4k
      return getNoWrapFlags(FlagNW) != FlagAnyWrap;
182
59.4k
    }
183
184
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
185
3.53M
    static bool classof(const SCEV *S) {
186
3.53M
      return S->getSCEVType() == scAddExpr ||
187
3.53M
             
S->getSCEVType() == scMulExpr2.78M
||
188
3.53M
             
S->getSCEVType() == scSMaxExpr2.53M
||
189
3.53M
             
S->getSCEVType() == scUMaxExpr2.53M
||
190
3.53M
             
S->getSCEVType() == scAddRecExpr2.52M
;
191
3.53M
    }
192
  };
193
194
  /// This node is the base class for n'ary commutative operators.
195
  class SCEVCommutativeExpr : public SCEVNAryExpr {
196
  protected:
197
    SCEVCommutativeExpr(const FoldingSetNodeIDRef ID,
198
                        enum SCEVTypes T, const SCEV *const *O, size_t N)
199
6.28M
      : SCEVNAryExpr(ID, T, O, N) {}
200
201
  public:
202
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
203
2.45M
    static bool classof(const SCEV *S) {
204
2.45M
      return S->getSCEVType() == scAddExpr ||
205
2.45M
             
S->getSCEVType() == scMulExpr1.64M
||
206
2.45M
             
S->getSCEVType() == scSMaxExpr1.32M
||
207
2.45M
             
S->getSCEVType() == scUMaxExpr1.28M
;
208
2.45M
    }
209
210
    /// Set flags for a non-recurrence without clearing previously set flags.
211
20.0M
    void setNoWrapFlags(NoWrapFlags Flags) {
212
20.0M
      SubclassData |= Flags;
213
20.0M
    }
214
  };
215
216
  /// This node represents an addition of some number of SCEVs.
217
  class SCEVAddExpr : public SCEVCommutativeExpr {
218
    friend class ScalarEvolution;
219
220
    SCEVAddExpr(const FoldingSetNodeIDRef ID,
221
                const SCEV *const *O, size_t N)
222
4.82M
      : SCEVCommutativeExpr(ID, scAddExpr, O, N) {}
223
224
  public:
225
24.8M
    Type *getType() const {
226
24.8M
      // Use the type of the last operand, which is likely to be a pointer
227
24.8M
      // type, if there is one. This doesn't usually matter, but it can help
228
24.8M
      // reduce casts when the expressions are expanded.
229
24.8M
      return getOperand(getNumOperands() - 1)->getType();
230
24.8M
    }
231
232
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
233
177M
    static bool classof(const SCEV *S) {
234
177M
      return S->getSCEVType() == scAddExpr;
235
177M
    }
236
  };
237
238
  /// This node represents multiplication of some number of SCEVs.
239
  class SCEVMulExpr : public SCEVCommutativeExpr {
240
    friend class ScalarEvolution;
241
242
    SCEVMulExpr(const FoldingSetNodeIDRef ID,
243
                const SCEV *const *O, size_t N)
244
1.35M
      : SCEVCommutativeExpr(ID, scMulExpr, O, N) {}
245
246
  public:
247
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
248
146M
    static bool classof(const SCEV *S) {
249
146M
      return S->getSCEVType() == scMulExpr;
250
146M
    }
251
  };
252
253
  /// This class represents a binary unsigned division operation.
254
  class SCEVUDivExpr : public SCEV {
255
    friend class ScalarEvolution;
256
257
    const SCEV *LHS;
258
    const SCEV *RHS;
259
260
    SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs)
261
163k
      : SCEV(ID, scUDivExpr), LHS(lhs), RHS(rhs) {}
262
263
  public:
264
6.03M
    const SCEV *getLHS() const { return LHS; }
265
6.96M
    const SCEV *getRHS() const { return RHS; }
266
267
945k
    Type *getType() const {
268
945k
      // In most cases the types of LHS and RHS will be the same, but in some
269
945k
      // crazy cases one or the other may be a pointer. ScalarEvolution doesn't
270
945k
      // depend on the type for correctness, but handling types carefully can
271
945k
      // avoid extra casts in the SCEVExpander. The LHS is more likely to be
272
945k
      // a pointer type than the RHS, so use the RHS' type here.
273
945k
      return getRHS()->getType();
274
945k
    }
275
276
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
277
20.4M
    static bool classof(const SCEV *S) {
278
20.4M
      return S->getSCEVType() == scUDivExpr;
279
20.4M
    }
280
  };
281
282
  /// This node represents a polynomial recurrence on the trip count
283
  /// of the specified loop.  This is the primary focus of the
284
  /// ScalarEvolution framework; all the other SCEV subclasses are
285
  /// mostly just supporting infrastructure to allow SCEVAddRecExpr
286
  /// expressions to be created and analyzed.
287
  ///
288
  /// All operands of an AddRec are required to be loop invariant.
289
  ///
290
  class SCEVAddRecExpr : public SCEVNAryExpr {
291
    friend class ScalarEvolution;
292
293
    const Loop *L;
294
295
    SCEVAddRecExpr(const FoldingSetNodeIDRef ID,
296
                   const SCEV *const *O, size_t N, const Loop *l)
297
5.26M
      : SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {}
298
299
  public:
300
45.2M
    const SCEV *getStart() const { return Operands[0]; }
301
71.7M
    const Loop *getLoop() const { return L; }
302
303
    /// Constructs and returns the recurrence indicating how much this
304
    /// expression steps by.  If this is a polynomial of degree N, it
305
    /// returns a chrec of degree N-1.  We cannot determine whether
306
    /// the step recurrence has self-wraparound.
307
20.6M
    const SCEV *getStepRecurrence(ScalarEvolution &SE) const {
308
20.6M
      if (isAffine()) 
return getOperand(1)20.6M
;
309
115
      return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1,
310
115
                                                           op_end()),
311
115
                              getLoop(), FlagAnyWrap);
312
115
    }
313
314
    /// Return true if this represents an expression A + B*x where A
315
    /// and B are loop invariant values.
316
42.6M
    bool isAffine() const {
317
42.6M
      // We know that the start value is invariant.  This expression is thus
318
42.6M
      // affine iff the step is also invariant.
319
42.6M
      return getNumOperands() == 2;
320
42.6M
    }
321
322
    /// Return true if this represents an expression A + B*x + C*x^2
323
    /// where A, B and C are loop invariant values.  This corresponds
324
    /// to an addrec of the form {L,+,M,+,N}
325
194k
    bool isQuadratic() const {
326
194k
      return getNumOperands() == 3;
327
194k
    }
328
329
    /// Set flags for a recurrence without clearing any previously set flags.
330
    /// For AddRec, either NUW or NSW implies NW. Keep track of this fact here
331
    /// to make it easier to propagate flags.
332
19.8M
    void setNoWrapFlags(NoWrapFlags Flags) {
333
19.8M
      if (Flags & (FlagNUW | FlagNSW))
334
5.08M
        Flags = ScalarEvolution::setFlags(Flags, FlagNW);
335
19.8M
      SubclassData |= Flags;
336
19.8M
    }
337
338
    /// Return the value of this chain of recurrences at the specified
339
    /// iteration number.
340
    const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const;
341
342
    /// Return the number of iterations of this loop that produce
343
    /// values in the specified constant range.  Another way of
344
    /// looking at this is that it returns the first iteration number
345
    /// where the value is not in the condition, thus computing the
346
    /// exit count.  If the iteration count can't be computed, an
347
    /// instance of SCEVCouldNotCompute is returned.
348
    const SCEV *getNumIterationsInRange(const ConstantRange &Range,
349
                                        ScalarEvolution &SE) const;
350
351
    /// Return an expression representing the value of this expression
352
    /// one iteration of the loop ahead.
353
    const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const;
354
355
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
356
258M
    static bool classof(const SCEV *S) {
357
258M
      return S->getSCEVType() == scAddRecExpr;
358
258M
    }
359
  };
360
361
  /// This class represents a signed maximum selection.
362
  class SCEVSMaxExpr : public SCEVCommutativeExpr {
363
    friend class ScalarEvolution;
364
365
    SCEVSMaxExpr(const FoldingSetNodeIDRef ID,
366
                 const SCEV *const *O, size_t N)
367
54.4k
      : SCEVCommutativeExpr(ID, scSMaxExpr, O, N) {
368
54.4k
      // Max never overflows.
369
54.4k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
370
54.4k
    }
371
372
  public:
373
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
374
17.6M
    static bool classof(const SCEV *S) {
375
17.6M
      return S->getSCEVType() == scSMaxExpr;
376
17.6M
    }
377
  };
378
379
  /// This class represents an unsigned maximum selection.
380
  class SCEVUMaxExpr : public SCEVCommutativeExpr {
381
    friend class ScalarEvolution;
382
383
    SCEVUMaxExpr(const FoldingSetNodeIDRef ID,
384
                 const SCEV *const *O, size_t N)
385
52.5k
      : SCEVCommutativeExpr(ID, scUMaxExpr, O, N) {
386
52.5k
      // Max never overflows.
387
52.5k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
388
52.5k
    }
389
390
  public:
391
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
392
16.3M
    static bool classof(const SCEV *S) {
393
16.3M
      return S->getSCEVType() == scUMaxExpr;
394
16.3M
    }
395
  };
396
397
  /// This means that we are dealing with an entirely unknown SCEV
398
  /// value, and only represent it as its LLVM Value.  This is the
399
  /// "bottom" value for the analysis.
400
  class SCEVUnknown final : public SCEV, private CallbackVH {
401
    friend class ScalarEvolution;
402
403
    /// The parent ScalarEvolution value. This is used to update the
404
    /// parent's maps when the value associated with a SCEVUnknown is
405
    /// deleted or RAUW'd.
406
    ScalarEvolution *SE;
407
408
    /// The next pointer in the linked list of all SCEVUnknown
409
    /// instances owned by a ScalarEvolution.
410
    SCEVUnknown *Next;
411
412
    SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V,
413
                ScalarEvolution *se, SCEVUnknown *next) :
414
3.52M
      SCEV(ID, scUnknown), CallbackVH(V), SE(se), Next(next) {}
415
416
    // Implement CallbackVH.
417
    void deleted() override;
418
    void allUsesReplacedWith(Value *New) override;
419
420
  public:
421
58.0M
    Value *getValue() const { return getValPtr(); }
422
423
    /// @{
424
    /// Test whether this is a special constant representing a type
425
    /// size, alignment, or field offset in a target-independent
426
    /// manner, and hasn't happened to have been folded with other
427
    /// operations into something unrecognizable. This is mainly only
428
    /// useful for pretty-printing and other situations where it isn't
429
    /// absolutely required for these to succeed.
430
    bool isSizeOf(Type *&AllocTy) const;
431
    bool isAlignOf(Type *&AllocTy) const;
432
    bool isOffsetOf(Type *&STy, Constant *&FieldNo) const;
433
    /// @}
434
435
40.2M
    Type *getType() const { return getValPtr()->getType(); }
436
437
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
438
195M
    static bool classof(const SCEV *S) {
439
195M
      return S->getSCEVType() == scUnknown;
440
195M
    }
441
  };
442
443
  /// This class defines a simple visitor class that may be used for
444
  /// various SCEV analysis purposes.
445
  template<typename SC, typename RetVal=void>
446
  struct SCEVVisitor {
447
19.2M
    RetVal visit(const SCEV *S) {
448
19.2M
      switch (S->getSCEVType()) {
449
19.2M
      case scConstant:
450
6.03M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
19.2M
      case scTruncate:
452
47.9k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
19.2M
      case scZeroExtend:
454
242k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
19.2M
      case scSignExtend:
456
647k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
19.2M
      case scAddExpr:
458
2.14M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
19.2M
      case scMulExpr:
460
885k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
19.2M
      case scUDivExpr:
462
83.6k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
19.2M
      case scAddRecExpr:
464
3.93M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
19.2M
      case scSMaxExpr:
466
69.3k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
19.2M
      case scUMaxExpr:
468
26.1k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
19.2M
      case scUnknown:
470
4.80M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
19.2M
      case scCouldNotCompute:
472
291k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
19.2M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
19.2M
      }
476
19.2M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
347k
    RetVal visit(const SCEV *S) {
448
347k
      switch (S->getSCEVType()) {
449
347k
      case scConstant:
450
204k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
347k
      case scTruncate:
452
737
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
347k
      case scZeroExtend:
454
4.42k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
347k
      case scSignExtend:
456
23.8k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
347k
      case scAddExpr:
458
10.6k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
347k
      case scMulExpr:
460
36.8k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
347k
      case scUDivExpr:
462
1.12k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
347k
      case scAddRecExpr:
464
459
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
347k
      case scSMaxExpr:
466
2.71k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
347k
      case scUMaxExpr:
468
602
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
347k
      case scUnknown:
470
61.5k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
347k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
347k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
347k
      }
476
347k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVShiftRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
382k
    RetVal visit(const SCEV *S) {
448
382k
      switch (S->getSCEVType()) {
449
382k
      case scConstant:
450
33.7k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
382k
      case scTruncate:
452
1.14k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
382k
      case scZeroExtend:
454
6.33k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
382k
      case scSignExtend:
456
973
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
382k
      case scAddExpr:
458
1.80k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
382k
      case scMulExpr:
460
16.2k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
382k
      case scUDivExpr:
462
16.2k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
382k
      case scAddRecExpr:
464
10.1k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
382k
      case scSMaxExpr:
466
604
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
382k
      case scUMaxExpr:
468
381
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
382k
      case scUnknown:
470
294k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
382k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
382k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
382k
      }
476
382k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVInitRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
1.68M
    RetVal visit(const SCEV *S) {
448
1.68M
      switch (S->getSCEVType()) {
449
1.68M
      case scConstant:
450
363k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
1.68M
      case scTruncate:
452
4.48k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
1.68M
      case scZeroExtend:
454
57.5k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
1.68M
      case scSignExtend:
456
53.6k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
1.68M
      case scAddExpr:
458
67.7k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
1.68M
      case scMulExpr:
460
41.7k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
1.68M
      case scUDivExpr:
462
8.61k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
1.68M
      case scAddRecExpr:
464
514k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
1.68M
      case scSMaxExpr:
466
20.5k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
1.68M
      case scUMaxExpr:
468
3.91k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
1.68M
      case scUnknown:
470
260k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
1.68M
      case scCouldNotCompute:
472
291k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
1.68M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
1.68M
      }
476
1.68M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPostIncRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
1.26M
    RetVal visit(const SCEV *S) {
448
1.26M
      switch (S->getSCEVType()) {
449
1.26M
      case scConstant:
450
347k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
1.26M
      case scTruncate:
452
4.32k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
1.26M
      case scZeroExtend:
454
46.4k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
1.26M
      case scSignExtend:
456
36.1k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
1.26M
      case scAddExpr:
458
53.5k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
1.26M
      case scMulExpr:
460
39.3k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
1.26M
      case scUDivExpr:
462
8.17k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
1.26M
      case scAddRecExpr:
464
504k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
1.26M
      case scSMaxExpr:
466
20.4k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
1.26M
      case scUMaxExpr:
468
3.87k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
1.26M
      case scUnknown:
470
199k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
1.26M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
1.26M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
1.26M
      }
476
1.26M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVDivision, void>::visit(llvm::SCEV const*)
Line
Count
Source
447
13.1k
    RetVal visit(const SCEV *S) {
448
13.1k
      switch (S->getSCEVType()) {
449
13.1k
      case scConstant:
450
2.04k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
13.1k
      case scTruncate:
452
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
13.1k
      case scZeroExtend:
454
20
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
13.1k
      case scSignExtend:
456
59
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
13.1k
      case scAddExpr:
458
599
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
13.1k
      case scMulExpr:
460
3.83k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
13.1k
      case scUDivExpr:
462
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
13.1k
      case scAddRecExpr:
464
5.04k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
13.1k
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
13.1k
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
13.1k
      case scUnknown:
470
1.52k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
13.1k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
13.1k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
13.1k
      }
476
13.1k
    }
llvm::SCEVVisitor<llvm::SCEVParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
365
    RetVal visit(const SCEV *S) {
448
365
      switch (S->getSCEVType()) {
449
365
      case scConstant:
450
261
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
365
      case scTruncate:
452
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
365
      case scZeroExtend:
454
2
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
365
      case scSignExtend:
456
2
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
365
      case scAddExpr:
458
13
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
365
      case scMulExpr:
460
29
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
365
      case scUDivExpr:
462
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
365
      case scAddRecExpr:
464
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
365
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
365
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
365
      case scUnknown:
470
52
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
365
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
365
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
365
      }
476
365
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPredicateRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
1.89M
    RetVal visit(const SCEV *S) {
448
1.89M
      switch (S->getSCEVType()) {
449
1.89M
      case scConstant:
450
579k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
1.89M
      case scTruncate:
452
4.04k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
1.89M
      case scZeroExtend:
454
13.6k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
1.89M
      case scSignExtend:
456
118k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
1.89M
      case scAddExpr:
458
222k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
1.89M
      case scMulExpr:
460
161k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
1.89M
      case scUDivExpr:
462
3.99k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
1.89M
      case scAddRecExpr:
464
293k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
1.89M
      case scSMaxExpr:
466
6.37k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
1.89M
      case scUMaxExpr:
468
4.01k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
1.89M
      case scUnknown:
470
488k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
1.89M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
1.89M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
1.89M
      }
476
1.89M
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper, llvm::SCEV const*>::visit(llvm::SCEV const*)
llvm::SCEVVisitor<llvm::SCEVExpander, llvm::Value*>::visit(llvm::SCEV const*)
Line
Count
Source
447
2.42M
    RetVal visit(const SCEV *S) {
448
2.42M
      switch (S->getSCEVType()) {
449
2.42M
      case scConstant:
450
489k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
2.42M
      case scTruncate:
452
1.36k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
2.42M
      case scZeroExtend:
454
4.36k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
2.42M
      case scSignExtend:
456
3.80k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
2.42M
      case scAddExpr:
458
415k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
2.42M
      case scMulExpr:
460
30.9k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
2.42M
      case scUDivExpr:
462
4.69k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
2.42M
      case scAddRecExpr:
464
267k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
2.42M
      case scSMaxExpr:
466
2.40k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
2.42M
      case scUMaxExpr:
468
963
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
2.42M
      case scUnknown:
470
1.20M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
2.42M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
2.42M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
2.42M
      }
476
2.42M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
11.0M
    RetVal visit(const SCEV *S) {
448
11.0M
      switch (S->getSCEVType()) {
449
11.0M
      case scConstant:
450
3.91M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
11.0M
      case scTruncate:
452
31.3k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
11.0M
      case scZeroExtend:
454
108k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
11.0M
      case scSignExtend:
456
406k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
11.0M
      case scAddExpr:
458
1.36M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
11.0M
      case scMulExpr:
460
546k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
11.0M
      case scUDivExpr:
462
40.1k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
11.0M
      case scAddRecExpr:
464
2.30M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
11.0M
      case scSMaxExpr:
466
14.6k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
11.0M
      case scUMaxExpr:
468
12.3k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
11.0M
      case scUnknown:
470
2.26M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
11.0M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
11.0M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
11.0M
      }
476
11.0M
    }
SafeStack.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
193
    RetVal visit(const SCEV *S) {
448
193
      switch (S->getSCEVType()) {
449
193
      case scConstant:
450
31
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
193
      case scTruncate:
452
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
193
      case scZeroExtend:
454
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
193
      case scSignExtend:
456
3
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
193
      case scAddExpr:
458
34
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
193
      case scMulExpr:
460
6
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
193
      case scUDivExpr:
462
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
193
      case scAddRecExpr:
464
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
193
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
193
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
193
      case scUnknown:
470
119
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
193
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
193
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
193
      }
476
193
    }
ScopDetection.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVRemoveMax, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
12.0k
    RetVal visit(const SCEV *S) {
448
12.0k
      switch (S->getSCEVType()) {
449
12.0k
      case scConstant:
450
2.84k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
12.0k
      case scTruncate:
452
4
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
12.0k
      case scZeroExtend:
454
54
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
12.0k
      case scSignExtend:
456
188
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
12.0k
      case scAddExpr:
458
576
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
12.0k
      case scMulExpr:
460
2.62k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
12.0k
      case scUDivExpr:
462
12
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
12.0k
      case scAddRecExpr:
464
3.27k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
12.0k
      case scSMaxExpr:
466
68
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
12.0k
      case scUMaxExpr:
468
16
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
12.0k
      case scUnknown:
470
2.41k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
12.0k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
12.0k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
12.0k
      }
476
12.0k
    }
ScopInfo.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
14.2k
    RetVal visit(const SCEV *S) {
448
14.2k
      switch (S->getSCEVType()) {
449
14.2k
      case scConstant:
450
6.37k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
14.2k
      case scTruncate:
452
77
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
14.2k
      case scZeroExtend:
454
148
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
14.2k
      case scSignExtend:
456
335
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
14.2k
      case scAddExpr:
458
306
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
14.2k
      case scMulExpr:
460
202
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
14.2k
      case scUDivExpr:
462
145
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
14.2k
      case scAddRecExpr:
464
308
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
14.2k
      case scSMaxExpr:
466
61
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
14.2k
      case scUMaxExpr:
468
15
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
14.2k
      case scUnknown:
470
6.27k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
14.2k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
14.2k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
14.2k
      }
476
14.2k
    }
llvm::SCEVVisitor<llvm::SCEVLoopAddRecRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
2.23k
    RetVal visit(const SCEV *S) {
448
2.23k
      switch (S->getSCEVType()) {
449
2.23k
      case scConstant:
450
808
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
2.23k
      case scTruncate:
452
2
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
2.23k
      case scZeroExtend:
454
11
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
2.23k
      case scSignExtend:
456
28
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
2.23k
      case scAddExpr:
458
124
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
2.23k
      case scMulExpr:
460
67
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
2.23k
      case scUDivExpr:
462
5
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
2.23k
      case scAddRecExpr:
464
603
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
2.23k
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
2.23k
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
2.23k
      case scUnknown:
470
585
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
2.23k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
2.23k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
2.23k
      }
476
2.23k
    }
llvm::SCEVVisitor<polly::SCEVAffinator, std::__1::pair<isl::noexceptions::pw_aff, isl::noexceptions::set> >::visit(llvm::SCEV const*)
Line
Count
Source
447
10.6k
    RetVal visit(const SCEV *S) {
448
10.6k
      switch (S->getSCEVType()) {
449
10.6k
      case scConstant:
450
5.32k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
10.6k
      case scTruncate:
452
51
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
10.6k
      case scZeroExtend:
454
109
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
10.6k
      case scSignExtend:
456
376
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
10.6k
      case scAddExpr:
458
268
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
10.6k
      case scMulExpr:
460
1
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
10.6k
      case scUDivExpr:
462
53
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
10.6k
      case scAddRecExpr:
464
4.26k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
10.6k
      case scSMaxExpr:
466
69
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
10.6k
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
10.6k
      case scUnknown:
470
93
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
10.6k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
10.6k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
10.6k
      }
476
10.6k
    }
llvm::SCEVVisitor<SCEVValidator, ValidatorResult>::visit(llvm::SCEV const*)
Line
Count
Source
447
145k
    RetVal visit(const SCEV *S) {
448
145k
      switch (S->getSCEVType()) {
449
145k
      case scConstant:
450
84.6k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
145k
      case scTruncate:
452
283
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
145k
      case scZeroExtend:
454
788
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
145k
      case scSignExtend:
456
2.68k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
145k
      case scAddExpr:
458
3.32k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
145k
      case scMulExpr:
460
4.45k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
145k
      case scUDivExpr:
462
410
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
145k
      case scAddRecExpr:
464
30.1k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
145k
      case scSMaxExpr:
466
1.41k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
145k
      case scUMaxExpr:
468
39
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
145k
      case scUnknown:
470
16.9k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
145k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
145k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
145k
      }
476
145k
    }
llvm::SCEVVisitor<ScopExpander, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
3.52k
    RetVal visit(const SCEV *S) {
448
3.52k
      switch (S->getSCEVType()) {
449
3.52k
      case scConstant:
450
863
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
3.52k
      case scTruncate:
452
74
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
3.52k
      case scZeroExtend:
454
22
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
3.52k
      case scSignExtend:
456
36
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
3.52k
      case scAddExpr:
458
482
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
3.52k
      case scMulExpr:
460
504
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
3.52k
      case scUDivExpr:
462
13
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
3.52k
      case scAddRecExpr:
464
36
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
3.52k
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
3.52k
      case scUMaxExpr:
468
2
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
3.52k
      case scUnknown:
470
1.48k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
3.52k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
3.52k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
3.52k
      }
476
3.52k
    }
477
478
0
    RetVal visitCouldNotCompute(const SCEVCouldNotCompute *S) {
479
0
      llvm_unreachable("Invalid use of SCEVCouldNotCompute!");
480
0
    }
Unexecuted instantiation: llvm::SCEVVisitor<llvm::SCEVExpander, llvm::Value*>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVVisitor<polly::SCEVAffinator, std::__1::pair<isl::noexceptions::pw_aff, isl::noexceptions::set> >::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVVisitor<SCEVValidator, ValidatorResult>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVVisitor<ScopExpander, llvm::SCEV const*>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
481
  };
482
483
  /// Visit all nodes in the expression tree using worklist traversal.
484
  ///
485
  /// Visitor implements:
486
  ///   // return true to follow this node.
487
  ///   bool follow(const SCEV *S);
488
  ///   // return true to terminate the search.
489
  ///   bool isDone();
490
  template<typename SV>
491
  class SCEVTraversal {
492
    SV &Visitor;
493
    SmallVector<const SCEV *, 8> Worklist;
494
    SmallPtrSet<const SCEV *, 8> Visited;
495
496
341M
    void push(const SCEV *S) {
497
341M
      if (Visited.insert(S).second && 
Visitor.follow(S)305M
)
498
302M
        Worklist.push_back(S);
499
341M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::push(llvm::SCEV const*)
Line
Count
Source
496
5.11M
    void push(const SCEV *S) {
497
5.11M
      if (Visited.insert(S).second && 
Visitor.follow(S)5.11M
)
498
2.05M
        Worklist.push_back(S);
499
5.11M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::push(llvm::SCEV const*)
Line
Count
Source
496
502k
    void push(const SCEV *S) {
497
502k
      if (Visited.insert(S).second && 
Visitor.follow(S)479k
)
498
267k
        Worklist.push_back(S);
499
502k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::push(llvm::SCEV const*)
Line
Count
Source
496
157
    void push(const SCEV *S) {
497
157
      if (Visited.insert(S).second && 
Visitor.follow(S)151
)
498
151
        Worklist.push_back(S);
499
157
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure>::push(llvm::SCEV const*)
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
496
3.14k
    void push(const SCEV *S) {
497
3.14k
      if (Visited.insert(S).second && 
Visitor.follow(S)3.14k
)
498
3.13k
        Worklist.push_back(S);
499
3.14k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
496
107M
    void push(const SCEV *S) {
497
107M
      if (Visited.insert(S).second && 
Visitor.follow(S)101M
)
498
101M
        Worklist.push_back(S);
499
107M
    }
llvm::SCEVTraversal<bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
496
2.70M
    void push(const SCEV *S) {
497
2.70M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.65M
)
498
2.41M
        Worklist.push_back(S);
499
2.70M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::push(llvm::SCEV const*)
Line
Count
Source
496
11.8k
    void push(const SCEV *S) {
497
11.8k
      if (Visited.insert(S).second && 
Visitor.follow(S)9.97k
)
498
9.97k
        Worklist.push_back(S);
499
11.8k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::push(llvm::SCEV const*)
Line
Count
Source
496
3.01k
    void push(const SCEV *S) {
497
3.01k
      if (Visited.insert(S).second && 
Visitor.follow(S)3.01k
)
498
2.13k
        Worklist.push_back(S);
499
3.01k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::push(llvm::SCEV const*)
Line
Count
Source
496
8.77k
    void push(const SCEV *S) {
497
8.77k
      if (Visited.insert(S).second && 
Visitor.follow(S)8.47k
)
498
7.35k
        Worklist.push_back(S);
499
8.77k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::push(llvm::SCEV const*)
Line
Count
Source
496
2.24k
    void push(const SCEV *S) {
497
2.24k
      if (Visited.insert(S).second && 
Visitor.follow(S)2.23k
)
498
2.17k
        Worklist.push_back(S);
499
2.24k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
496
112M
    void push(const SCEV *S) {
497
112M
      if (Visited.insert(S).second && 
Visitor.follow(S)106M
)
498
106M
        Worklist.push_back(S);
499
112M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::push(llvm::SCEV const*)
Line
Count
Source
496
107M
    void push(const SCEV *S) {
497
107M
      if (Visited.insert(S).second && 
Visitor.follow(S)84.9M
)
498
84.9M
        Worklist.push_back(S);
499
107M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
496
2.01M
    void push(const SCEV *S) {
497
2.01M
      if (Visited.insert(S).second && 
Visitor.follow(S)1.96M
)
498
1.96M
        Worklist.push_back(S);
499
2.01M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::push(llvm::SCEV const*)
Line
Count
Source
496
2.66M
    void push(const SCEV *S) {
497
2.66M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.56M
)
498
2.56M
        Worklist.push_back(S);
499
2.66M
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::push(llvm::SCEV const*)
Line
Count
Source
496
20.8k
    void push(const SCEV *S) {
497
20.8k
      if (Visited.insert(S).second && 
Visitor.follow(S)20.7k
)
498
15.0k
        Worklist.push_back(S);
499
20.8k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::push(llvm::SCEV const*)
Line
Count
Source
496
44.9k
    void push(const SCEV *S) {
497
44.9k
      if (Visited.insert(S).second && 
Visitor.follow(S)41.6k
)
498
41.6k
        Worklist.push_back(S);
499
44.9k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::push(llvm::SCEV const*)
Line
Count
Source
496
52.3k
    void push(const SCEV *S) {
497
52.3k
      if (Visited.insert(S).second && 
Visitor.follow(S)46.0k
)
498
39.2k
        Worklist.push_back(S);
499
52.3k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::push(llvm::SCEV const*)
Line
Count
Source
496
27.5k
    void push(const SCEV *S) {
497
27.5k
      if (Visited.insert(S).second && 
Visitor.follow(S)26.8k
)
498
26.8k
        Worklist.push_back(S);
499
27.5k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::push(llvm::SCEV const*)
Line
Count
Source
496
78.1k
    void push(const SCEV *S) {
497
78.1k
      if (Visited.insert(S).second && 
Visitor.follow(S)71.5k
)
498
60.8k
        Worklist.push_back(S);
499
78.1k
    }
500
501
  public:
502
126M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::SCEVTraversal(containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain&)
Line
Count
Source
502
1.58M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::SCEVTraversal(IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable&)
Line
Count
Source
502
239k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::SCEVTraversal(sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize&)
Line
Count
Source
502
52
    SCEVTraversal(SV& V): Visitor(V) {}
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure&)
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure&)
Line
Count
Source
502
873
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure&)
Line
Count
Source
502
36.6M
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure&)
Line
Count
Source
502
1.60M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::SCEVTraversal((anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
502
1.85k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::SCEVTraversal((anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
502
2.88k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::SCEVTraversal((anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
502
1.85k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::SCEVTraversal((anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
502
1.57k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure&)
Line
Count
Source
502
70.2M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::SCEVTraversal(llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops&)
Line
Count
Source
502
14.9M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure&)
Line
Count
Source
502
399k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::SCEVTraversal((anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
502
519k
    SCEVTraversal(SV& V): Visitor(V) {}
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::SCEVTraversal((anonymous namespace)::SCEVFindInsideScop&)
Line
Count
Source
502
17.2k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindLoops>::SCEVTraversal(polly::SCEVFindLoops&)
Line
Count
Source
502
15.8k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindValues>::SCEVTraversal(polly::SCEVFindValues&)
Line
Count
Source
502
19.6k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVHasIVParams>::SCEVTraversal(SCEVHasIVParams&)
Line
Count
Source
502
11.7k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVInRegionDependences>::SCEVTraversal(SCEVInRegionDependences&)
Line
Count
Source
502
24.4k
    SCEVTraversal(SV& V): Visitor(V) {}
503
504
126M
    void visitAll(const SCEV *Root) {
505
126M
      push(Root);
506
427M
      while (!Worklist.empty() && 
!Visitor.isDone()302M
) {
507
301M
        const SCEV *S = Worklist.pop_back_val();
508
301M
509
301M
        switch (S->getSCEVType()) {
510
301M
        case scConstant:
511
190M
        case scUnknown:
512
190M
          break;
513
190M
        case scTruncate:
514
21.2M
        case scZeroExtend:
515
21.2M
        case scSignExtend:
516
21.2M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
21.2M
          break;
518
84.1M
        case scAddExpr:
519
84.1M
        case scMulExpr:
520
84.1M
        case scSMaxExpr:
521
84.1M
        case scUMaxExpr:
522
84.1M
        case scAddRecExpr:
523
84.1M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
182M
            push(Op);
525
84.1M
          break;
526
84.1M
        case scUDivExpr: {
527
5.23M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
5.23M
          push(UDiv->getLHS());
529
5.23M
          push(UDiv->getRHS());
530
5.23M
          break;
531
84.1M
        }
532
84.1M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
84.1M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
301M
        }
537
301M
      }
538
126M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.58M
    void visitAll(const SCEV *Root) {
505
1.58M
      push(Root);
506
3.34M
      while (!Worklist.empty() && 
!Visitor.isDone()2.05M
) {
507
1.76M
        const SCEV *S = Worklist.pop_back_val();
508
1.76M
509
1.76M
        switch (S->getSCEVType()) {
510
1.76M
        case scConstant:
511
0
        case scUnknown:
512
0
          break;
513
0
        case scTruncate:
514
0
        case scZeroExtend:
515
0
        case scSignExtend:
516
0
          push(cast<SCEVCastExpr>(S)->getOperand());
517
0
          break;
518
1.76M
        case scAddExpr:
519
1.76M
        case scMulExpr:
520
1.76M
        case scSMaxExpr:
521
1.76M
        case scUMaxExpr:
522
1.76M
        case scAddRecExpr:
523
1.76M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
3.53M
            push(Op);
525
1.76M
          break;
526
1.76M
        case scUDivExpr: {
527
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
0
          push(UDiv->getLHS());
529
0
          push(UDiv->getRHS());
530
0
          break;
531
1.76M
        }
532
1.76M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
1.76M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
1.76M
        }
537
1.76M
      }
538
1.58M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
239k
    void visitAll(const SCEV *Root) {
505
239k
      push(Root);
506
485k
      while (!Worklist.empty() && 
!Visitor.isDone()263k
) {
507
246k
        const SCEV *S = Worklist.pop_back_val();
508
246k
509
246k
        switch (S->getSCEVType()) {
510
246k
        case scConstant:
511
102k
        case scUnknown:
512
102k
          break;
513
102k
        case scTruncate:
514
38.0k
        case scZeroExtend:
515
38.0k
        case scSignExtend:
516
38.0k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
38.0k
          break;
518
105k
        case scAddExpr:
519
105k
        case scMulExpr:
520
105k
        case scSMaxExpr:
521
105k
        case scUMaxExpr:
522
105k
        case scAddRecExpr:
523
105k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
225k
            push(Op);
525
105k
          break;
526
105k
        case scUDivExpr: {
527
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
0
          push(UDiv->getLHS());
529
0
          push(UDiv->getRHS());
530
0
          break;
531
105k
        }
532
105k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
105k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
246k
        }
537
246k
      }
538
239k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
52
    void visitAll(const SCEV *Root) {
505
52
      push(Root);
506
203
      while (!Worklist.empty() && 
!Visitor.isDone()151
) {
507
151
        const SCEV *S = Worklist.pop_back_val();
508
151
509
151
        switch (S->getSCEVType()) {
510
151
        case scConstant:
511
100
        case scUnknown:
512
100
          break;
513
100
        case scTruncate:
514
0
        case scZeroExtend:
515
0
        case scSignExtend:
516
0
          push(cast<SCEVCastExpr>(S)->getOperand());
517
0
          break;
518
45
        case scAddExpr:
519
45
        case scMulExpr:
520
45
        case scSMaxExpr:
521
45
        case scUMaxExpr:
522
45
        case scAddRecExpr:
523
45
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
93
            push(Op);
525
45
          break;
526
45
        case scUDivExpr: {
527
6
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
6
          push(UDiv->getLHS());
529
6
          push(UDiv->getRHS());
530
6
          break;
531
45
        }
532
45
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
45
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
151
        }
537
151
      }
538
52
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure>::visitAll(llvm::SCEV const*)
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
873
    void visitAll(const SCEV *Root) {
505
873
      push(Root);
506
3.99k
      while (!Worklist.empty() && 
!Visitor.isDone()3.12k
) {
507
3.11k
        const SCEV *S = Worklist.pop_back_val();
508
3.11k
509
3.11k
        switch (S->getSCEVType()) {
510
3.11k
        case scConstant:
511
2.18k
        case scUnknown:
512
2.18k
          break;
513
2.18k
        case scTruncate:
514
61
        case scZeroExtend:
515
61
        case scSignExtend:
516
61
          push(cast<SCEVCastExpr>(S)->getOperand());
517
61
          break;
518
869
        case scAddExpr:
519
869
        case scMulExpr:
520
869
        case scSMaxExpr:
521
869
        case scUMaxExpr:
522
869
        case scAddRecExpr:
523
869
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
2.21k
            push(Op);
525
869
          break;
526
869
        case scUDivExpr: {
527
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
0
          push(UDiv->getLHS());
529
0
          push(UDiv->getRHS());
530
0
          break;
531
869
        }
532
869
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
869
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
3.11k
        }
537
3.11k
      }
538
873
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
36.6M
    void visitAll(const SCEV *Root) {
505
36.6M
      push(Root);
506
138M
      while (!Worklist.empty() && 
!Visitor.isDone()101M
) {
507
101M
        const SCEV *S = Worklist.pop_back_val();
508
101M
509
101M
        switch (S->getSCEVType()) {
510
101M
        case scConstant:
511
64.1M
        case scUnknown:
512
64.1M
          break;
513
64.1M
        case scTruncate:
514
7.00M
        case scZeroExtend:
515
7.00M
        case scSignExtend:
516
7.00M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
7.00M
          break;
518
29.8M
        case scAddExpr:
519
29.8M
        case scMulExpr:
520
29.8M
        case scSMaxExpr:
521
29.8M
        case scUMaxExpr:
522
29.8M
        case scAddRecExpr:
523
29.8M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
62.7M
            push(Op);
525
29.8M
          break;
526
29.8M
        case scUDivExpr: {
527
478k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
478k
          push(UDiv->getLHS());
529
478k
          push(UDiv->getRHS());
530
478k
          break;
531
29.8M
        }
532
29.8M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
29.8M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
101M
        }
537
101M
      }
538
36.6M
    }
llvm::SCEVTraversal<bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.60M
    void visitAll(const SCEV *Root) {
505
1.60M
      push(Root);
506
4.00M
      while (!Worklist.empty() && 
!Visitor.isDone()2.41M
) {
507
2.40M
        const SCEV *S = Worklist.pop_back_val();
508
2.40M
509
2.40M
        switch (S->getSCEVType()) {
510
2.40M
        case scConstant:
511
1.83M
        case scUnknown:
512
1.83M
          break;
513
1.83M
        case scTruncate:
514
62.2k
        case scZeroExtend:
515
62.2k
        case scSignExtend:
516
62.2k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
62.2k
          break;
518
488k
        case scAddExpr:
519
488k
        case scMulExpr:
520
488k
        case scSMaxExpr:
521
488k
        case scUMaxExpr:
522
488k
        case scAddRecExpr:
523
488k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
1.00M
            push(Op);
525
488k
          break;
526
488k
        case scUDivExpr: {
527
18.6k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
18.6k
          push(UDiv->getLHS());
529
18.6k
          push(UDiv->getRHS());
530
18.6k
          break;
531
488k
        }
532
488k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
488k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.40M
        }
537
2.40M
      }
538
1.60M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.85k
    void visitAll(const SCEV *Root) {
505
1.85k
      push(Root);
506
11.8k
      while (!Worklist.empty() && 
!Visitor.isDone()9.97k
) {
507
9.97k
        const SCEV *S = Worklist.pop_back_val();
508
9.97k
509
9.97k
        switch (S->getSCEVType()) {
510
9.97k
        case scConstant:
511
5.22k
        case scUnknown:
512
5.22k
          break;
513
5.22k
        case scTruncate:
514
156
        case scZeroExtend:
515
156
        case scSignExtend:
516
156
          push(cast<SCEVCastExpr>(S)->getOperand());
517
156
          break;
518
4.58k
        case scAddExpr:
519
4.58k
        case scMulExpr:
520
4.58k
        case scSMaxExpr:
521
4.58k
        case scUMaxExpr:
522
4.58k
        case scAddRecExpr:
523
4.58k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
9.84k
            push(Op);
525
4.58k
          break;
526
4.58k
        case scUDivExpr: {
527
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
8
          push(UDiv->getLHS());
529
8
          push(UDiv->getRHS());
530
8
          break;
531
4.58k
        }
532
4.58k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
4.58k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
9.97k
        }
537
9.97k
      }
538
1.85k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
2.88k
    void visitAll(const SCEV *Root) {
505
2.88k
      push(Root);
506
5.02k
      while (!Worklist.empty() && 
!Visitor.isDone()2.13k
) {
507
2.13k
        const SCEV *S = Worklist.pop_back_val();
508
2.13k
509
2.13k
        switch (S->getSCEVType()) {
510
2.13k
        case scConstant:
511
2.07k
        case scUnknown:
512
2.07k
          break;
513
2.07k
        case scTruncate:
514
2
        case scZeroExtend:
515
2
        case scSignExtend:
516
2
          push(cast<SCEVCastExpr>(S)->getOperand());
517
2
          break;
518
64
        case scAddExpr:
519
64
        case scMulExpr:
520
64
        case scSMaxExpr:
521
64
        case scUMaxExpr:
522
64
        case scAddRecExpr:
523
64
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
128
            push(Op);
525
64
          break;
526
64
        case scUDivExpr: {
527
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
0
          push(UDiv->getLHS());
529
0
          push(UDiv->getRHS());
530
0
          break;
531
64
        }
532
64
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
64
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.13k
        }
537
2.13k
      }
538
2.88k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.85k
    void visitAll(const SCEV *Root) {
505
1.85k
      push(Root);
506
9.21k
      while (!Worklist.empty() && 
!Visitor.isDone()7.35k
) {
507
7.35k
        const SCEV *S = Worklist.pop_back_val();
508
7.35k
509
7.35k
        switch (S->getSCEVType()) {
510
7.35k
        case scConstant:
511
3.86k
        case scUnknown:
512
3.86k
          break;
513
3.86k
        case scTruncate:
514
156
        case scZeroExtend:
515
156
        case scSignExtend:
516
156
          push(cast<SCEVCastExpr>(S)->getOperand());
517
156
          break;
518
3.33k
        case scAddExpr:
519
3.33k
        case scMulExpr:
520
3.33k
        case scSMaxExpr:
521
3.33k
        case scUMaxExpr:
522
3.33k
        case scAddRecExpr:
523
3.33k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
6.74k
            push(Op);
525
3.33k
          break;
526
3.33k
        case scUDivExpr: {
527
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
8
          push(UDiv->getLHS());
529
8
          push(UDiv->getRHS());
530
8
          break;
531
3.33k
        }
532
3.33k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
3.33k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
7.35k
        }
537
7.35k
      }
538
1.85k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.57k
    void visitAll(const SCEV *Root) {
505
1.57k
      push(Root);
506
3.74k
      while (!Worklist.empty() && 
!Visitor.isDone()2.17k
) {
507
2.17k
        const SCEV *S = Worklist.pop_back_val();
508
2.17k
509
2.17k
        switch (S->getSCEVType()) {
510
2.17k
        case scConstant:
511
1.75k
        case scUnknown:
512
1.75k
          break;
513
1.75k
        case scTruncate:
514
166
        case scZeroExtend:
515
166
        case scSignExtend:
516
166
          push(cast<SCEVCastExpr>(S)->getOperand());
517
166
          break;
518
245
        case scAddExpr:
519
245
        case scMulExpr:
520
245
        case scSMaxExpr:
521
245
        case scUMaxExpr:
522
245
        case scAddRecExpr:
523
245
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
493
            push(Op);
525
245
          break;
526
245
        case scUDivExpr: {
527
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
8
          push(UDiv->getLHS());
529
8
          push(UDiv->getRHS());
530
8
          break;
531
245
        }
532
245
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
245
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.17k
        }
537
2.17k
      }
538
1.57k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
70.2M
    void visitAll(const SCEV *Root) {
505
70.2M
      push(Root);
506
176M
      while (!Worklist.empty() && 
!Visitor.isDone()106M
) {
507
105M
        const SCEV *S = Worklist.pop_back_val();
508
105M
509
105M
        switch (S->getSCEVType()) {
510
105M
        case scConstant:
511
83.0M
        case scUnknown:
512
83.0M
          break;
513
83.0M
        case scTruncate:
514
5.61M
        case scZeroExtend:
515
5.61M
        case scSignExtend:
516
5.61M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
5.61M
          break;
518
14.0M
        case scAddExpr:
519
14.0M
        case scMulExpr:
520
14.0M
        case scSMaxExpr:
521
14.0M
        case scUMaxExpr:
522
14.0M
        case scAddRecExpr:
523
14.0M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
30.2M
            push(Op);
525
14.0M
          break;
526
14.0M
        case scUDivExpr: {
527
3.28M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
3.28M
          push(UDiv->getLHS());
529
3.28M
          push(UDiv->getRHS());
530
3.28M
          break;
531
14.0M
        }
532
14.0M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
14.0M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
105M
        }
537
105M
      }
538
70.2M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
14.9M
    void visitAll(const SCEV *Root) {
505
14.9M
      push(Root);
506
99.9M
      while (!Worklist.empty() && 
!Visitor.isDone()84.9M
) {
507
84.9M
        const SCEV *S = Worklist.pop_back_val();
508
84.9M
509
84.9M
        switch (S->getSCEVType()) {
510
84.9M
        case scConstant:
511
39.1M
        case scUnknown:
512
39.1M
          break;
513
39.1M
        case scTruncate:
514
8.24M
        case scZeroExtend:
515
8.24M
        case scSignExtend:
516
8.24M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
8.24M
          break;
518
36.1M
        case scAddExpr:
519
36.1M
        case scMulExpr:
520
36.1M
        case scSMaxExpr:
521
36.1M
        case scUMaxExpr:
522
36.1M
        case scAddRecExpr:
523
36.1M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
81.6M
            push(Op);
525
36.1M
          break;
526
36.1M
        case scUDivExpr: {
527
1.43M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
1.43M
          push(UDiv->getLHS());
529
1.43M
          push(UDiv->getRHS());
530
1.43M
          break;
531
36.1M
        }
532
36.1M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
36.1M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
84.9M
        }
537
84.9M
      }
538
14.9M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
399k
    void visitAll(const SCEV *Root) {
505
399k
      push(Root);
506
2.35M
      while (!Worklist.empty() && 
!Visitor.isDone()1.96M
) {
507
1.96M
        const SCEV *S = Worklist.pop_back_val();
508
1.96M
509
1.96M
        switch (S->getSCEVType()) {
510
1.96M
        case scConstant:
511
1.11M
        case scUnknown:
512
1.11M
          break;
513
1.11M
        case scTruncate:
514
103k
        case scZeroExtend:
515
103k
        case scSignExtend:
516
103k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
103k
          break;
518
741k
        case scAddExpr:
519
741k
        case scMulExpr:
520
741k
        case scSMaxExpr:
521
741k
        case scUMaxExpr:
522
741k
        case scAddRecExpr:
523
741k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
1.50M
            push(Op);
525
741k
          break;
526
741k
        case scUDivExpr: {
527
1.76k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
1.76k
          push(UDiv->getLHS());
529
1.76k
          push(UDiv->getRHS());
530
1.76k
          break;
531
741k
        }
532
741k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
741k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
1.96M
        }
537
1.96M
      }
538
399k
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
519k
    void visitAll(const SCEV *Root) {
505
519k
      push(Root);
506
3.08M
      while (!Worklist.empty() && 
!Visitor.isDone()2.56M
) {
507
2.56M
        const SCEV *S = Worklist.pop_back_val();
508
2.56M
509
2.56M
        switch (S->getSCEVType()) {
510
2.56M
        case scConstant:
511
1.43M
        case scUnknown:
512
1.43M
          break;
513
1.43M
        case scTruncate:
514
164k
        case scZeroExtend:
515
164k
        case scSignExtend:
516
164k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
164k
          break;
518
938k
        case scAddExpr:
519
938k
        case scMulExpr:
520
938k
        case scSMaxExpr:
521
938k
        case scUMaxExpr:
522
938k
        case scAddRecExpr:
523
938k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
1.93M
            push(Op);
525
938k
          break;
526
938k
        case scUDivExpr: {
527
21.0k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
21.0k
          push(UDiv->getLHS());
529
21.0k
          push(UDiv->getRHS());
530
21.0k
          break;
531
938k
        }
532
938k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
938k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.56M
        }
537
2.56M
      }
538
519k
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
17.2k
    void visitAll(const SCEV *Root) {
505
17.2k
      push(Root);
506
32.1k
      while (!Worklist.empty() && 
!Visitor.isDone()15.0k
) {
507
14.8k
        const SCEV *S = Worklist.pop_back_val();
508
14.8k
509
14.8k
        switch (S->getSCEVType()) {
510
14.8k
        case scConstant:
511
12.7k
        case scUnknown:
512
12.7k
          break;
513
12.7k
        case scTruncate:
514
791
        case scZeroExtend:
515
791
        case scSignExtend:
516
791
          push(cast<SCEVCastExpr>(S)->getOperand());
517
791
          break;
518
1.17k
        case scAddExpr:
519
1.17k
        case scMulExpr:
520
1.17k
        case scSMaxExpr:
521
1.17k
        case scUMaxExpr:
522
1.17k
        case scAddRecExpr:
523
1.17k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
2.45k
            push(Op);
525
1.17k
          break;
526
1.17k
        case scUDivExpr: {
527
163
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
163
          push(UDiv->getLHS());
529
163
          push(UDiv->getRHS());
530
163
          break;
531
1.17k
        }
532
1.17k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
1.17k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
14.8k
        }
537
14.8k
      }
538
17.2k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
15.8k
    void visitAll(const SCEV *Root) {
505
15.8k
      push(Root);
506
57.4k
      while (!Worklist.empty() && 
!Visitor.isDone()41.6k
) {
507
41.6k
        const SCEV *S = Worklist.pop_back_val();
508
41.6k
509
41.6k
        switch (S->getSCEVType()) {
510
41.6k
        case scConstant:
511
26.8k
        case scUnknown:
512
26.8k
          break;
513
26.8k
        case scTruncate:
514
1.40k
        case scZeroExtend:
515
1.40k
        case scSignExtend:
516
1.40k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
1.40k
          break;
518
13.2k
        case scAddExpr:
519
13.2k
        case scMulExpr:
520
13.2k
        case scSMaxExpr:
521
13.2k
        case scUMaxExpr:
522
13.2k
        case scAddRecExpr:
523
13.2k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
27.5k
            push(Op);
525
13.2k
          break;
526
13.2k
        case scUDivExpr: {
527
89
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
89
          push(UDiv->getLHS());
529
89
          push(UDiv->getRHS());
530
89
          break;
531
13.2k
        }
532
13.2k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
13.2k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
41.6k
        }
537
41.6k
      }
538
15.8k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
19.7k
    void visitAll(const SCEV *Root) {
505
19.7k
      push(Root);
506
58.9k
      while (!Worklist.empty() && 
!Visitor.isDone()39.2k
) {
507
39.2k
        const SCEV *S = Worklist.pop_back_val();
508
39.2k
509
39.2k
        switch (S->getSCEVType()) {
510
39.2k
        case scConstant:
511
22.5k
        case scUnknown:
512
22.5k
          break;
513
22.5k
        case scTruncate:
514
979
        case scZeroExtend:
515
979
        case scSignExtend:
516
979
          push(cast<SCEVCastExpr>(S)->getOperand());
517
979
          break;
518
15.5k
        case scAddExpr:
519
15.5k
        case scMulExpr:
520
15.5k
        case scSMaxExpr:
521
15.5k
        case scUMaxExpr:
522
15.5k
        case scAddRecExpr:
523
15.5k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
31.3k
            push(Op);
525
15.5k
          break;
526
15.5k
        case scUDivExpr: {
527
143
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
143
          push(UDiv->getLHS());
529
143
          push(UDiv->getRHS());
530
143
          break;
531
15.5k
        }
532
15.5k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
15.5k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
39.2k
        }
537
39.2k
      }
538
19.7k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
11.7k
    void visitAll(const SCEV *Root) {
505
11.7k
      push(Root);
506
38.5k
      while (!Worklist.empty() && 
!Visitor.isDone()26.8k
) {
507
26.7k
        const SCEV *S = Worklist.pop_back_val();
508
26.7k
509
26.7k
        switch (S->getSCEVType()) {
510
26.7k
        case scConstant:
511
18.4k
        case scUnknown:
512
18.4k
          break;
513
18.4k
        case scTruncate:
514
938
        case scZeroExtend:
515
938
        case scSignExtend:
516
938
          push(cast<SCEVCastExpr>(S)->getOperand());
517
938
          break;
518
7.36k
        case scAddExpr:
519
7.36k
        case scMulExpr:
520
7.36k
        case scSMaxExpr:
521
7.36k
        case scUMaxExpr:
522
7.36k
        case scAddRecExpr:
523
7.36k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
14.7k
            push(Op);
525
7.36k
          break;
526
7.36k
        case scUDivExpr: {
527
65
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
65
          push(UDiv->getLHS());
529
65
          push(UDiv->getRHS());
530
65
          break;
531
7.36k
        }
532
7.36k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
7.36k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
26.7k
        }
537
26.7k
      }
538
11.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
24.4k
    void visitAll(const SCEV *Root) {
505
24.4k
      push(Root);
506
85.3k
      while (!Worklist.empty() && 
!Visitor.isDone()60.8k
) {
507
60.8k
        const SCEV *S = Worklist.pop_back_val();
508
60.8k
509
60.8k
        switch (S->getSCEVType()) {
510
60.8k
        case scConstant:
511
33.4k
        case scUnknown:
512
33.4k
          break;
513
33.4k
        case scTruncate:
514
2.89k
        case scZeroExtend:
515
2.89k
        case scSignExtend:
516
2.89k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
2.89k
          break;
518
23.8k
        case scAddExpr:
519
23.8k
        case scMulExpr:
520
23.8k
        case scSMaxExpr:
521
23.8k
        case scUMaxExpr:
522
23.8k
        case scAddRecExpr:
523
23.8k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
49.5k
            push(Op);
525
23.8k
          break;
526
23.8k
        case scUDivExpr: {
527
637
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
637
          push(UDiv->getLHS());
529
637
          push(UDiv->getRHS());
530
637
          break;
531
23.8k
        }
532
23.8k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
23.8k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
60.8k
        }
537
60.8k
      }
538
24.4k
    }
539
  };
540
541
  /// Use SCEVTraversal to visit all nodes in the given expression tree.
542
  template<typename SV>
543
109M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
109M
    SCEVTraversal<SV> T(Visitor);
545
109M
    T.visitAll(Root);
546
109M
  }
Unexecuted instantiation: ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31&)
ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)&)
Line
Count
Source
543
873
  void visitAll(const SCEV *Root, SV& Visitor) {
544
873
    SCEVTraversal<SV> T(Visitor);
545
873
    T.visitAll(Root);
546
873
  }
ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3&)
Line
Count
Source
543
36.6M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
36.6M
    SCEVTraversal<SV> T(Visitor);
545
36.6M
    T.visitAll(Root);
546
36.6M
  }
void llvm::visitAll<bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure>(llvm::SCEV const*, bool (*&)(llvm::SCEV const* const&))
Line
Count
Source
543
1.60M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.60M
    SCEVTraversal<SV> T(Visitor);
545
1.60M
    T.visitAll(Root);
546
1.60M
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectStrides>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
543
1.85k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.85k
    SCEVTraversal<SV> T(Visitor);
545
1.85k
    T.visitAll(Root);
546
1.85k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectTerms>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
543
2.88k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
2.88k
    SCEVTraversal<SV> T(Visitor);
545
2.88k
    T.visitAll(Root);
546
2.88k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectAddRecMultiplies>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
543
1.85k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.85k
    SCEVTraversal<SV> T(Visitor);
545
1.85k
    T.visitAll(Root);
546
1.85k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVHasAddRec>(llvm::SCEV const*, (anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
543
1.57k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.57k
    SCEVTraversal<SV> T(Visitor);
545
1.57k
    T.visitAll(Root);
546
1.57k
  }
ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30&)
Line
Count
Source
543
70.2M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
70.2M
    SCEVTraversal<SV> T(Visitor);
545
70.2M
    T.visitAll(Root);
546
70.2M
  }
ScalarEvolutionExpander.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)&)
Line
Count
Source
543
399k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
399k
    SCEVTraversal<SV> T(Visitor);
545
399k
    T.visitAll(Root);
546
399k
  }
ScalarEvolutionExpander.cpp:void llvm::visitAll<(anonymous namespace)::SCEVFindUnsafe>(llvm::SCEV const*, (anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
543
519k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
519k
    SCEVTraversal<SV> T(Visitor);
545
519k
    T.visitAll(Root);
546
519k
  }
547
548
  /// Return true if any node in \p Root satisfies the predicate \p Pred.
549
  template <typename PredTy>
550
108M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
108M
    struct FindClosure {
552
108M
      bool Found = false;
553
108M
      PredTy Pred;
554
108M
555
108M
      FindClosure(PredTy Pred) : Pred(Pred) {}
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure::FindClosure(llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)
ScalarEvolution.cpp:bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure::FindClosure(containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))
Line
Count
Source
555
873
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure::FindClosure(llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)
Line
Count
Source
555
36.6M
      FindClosure(PredTy Pred) : Pred(Pred) {}
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure::FindClosure(bool (*)(llvm::SCEV const* const&))
Line
Count
Source
555
1.60M
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure::FindClosure(llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)
Line
Count
Source
555
70.2M
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolutionExpander.cpp:bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure::FindClosure(llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))
Line
Count
Source
555
399k
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
108M
557
212M
      bool follow(const SCEV *S) {
558
212M
        if (!Pred(S))
559
212M
          return true;
560
471k
561
471k
        Found = true;
562
471k
        return false;
563
471k
      }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure::follow(llvm::SCEV const*)
ScalarEvolution.cpp:bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
557
3.14k
      bool follow(const SCEV *S) {
558
3.14k
        if (!Pred(S))
559
3.13k
          return true;
560
12
561
12
        Found = true;
562
12
        return false;
563
12
      }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
557
101M
      bool follow(const SCEV *S) {
558
101M
        if (!Pred(S))
559
101M
          return true;
560
0
561
0
        Found = true;
562
0
        return false;
563
0
      }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
557
2.65M
      bool follow(const SCEV *S) {
558
2.65M
        if (!Pred(S))
559
2.41M
          return true;
560
243k
561
243k
        Found = true;
562
243k
        return false;
563
243k
      }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
557
106M
      bool follow(const SCEV *S) {
558
106M
        if (!Pred(S))
559
106M
          return true;
560
227k
561
227k
        Found = true;
562
227k
        return false;
563
227k
      }
ScalarEvolutionExpander.cpp:bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
557
1.96M
      bool follow(const SCEV *S) {
558
1.96M
        if (!Pred(S))
559
1.96M
          return true;
560
19
561
19
        Found = true;
562
19
        return false;
563
19
      }
564
108M
565
212M
      bool isDone() const { return Found; }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)::FindClosure::isDone() const
ScalarEvolution.cpp:bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))::FindClosure::isDone() const
Line
Count
Source
565
3.12k
      bool isDone() const { return Found; }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)::FindClosure::isDone() const
Line
Count
Source
565
101M
      bool isDone() const { return Found; }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure::isDone() const
Line
Count
Source
565
2.41M
      bool isDone() const { return Found; }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)::FindClosure::isDone() const
Line
Count
Source
565
106M
      bool isDone() const { return Found; }
ScalarEvolutionExpander.cpp:bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure::isDone() const
Line
Count
Source
565
1.96M
      bool isDone() const { return Found; }
566
108M
    };
567
108M
568
108M
    FindClosure FC(Pred);
569
108M
    visitAll(Root, FC);
570
108M
    return FC.Found;
571
108M
  }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_31)
ScalarEvolution.cpp:bool llvm::SCEVExprContains<containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, containsUndefs(llvm::SCEV const*)::'lambda'(llvm::SCEV const*))
Line
Count
Source
550
873
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
873
    struct FindClosure {
552
873
      bool Found = false;
553
873
      PredTy Pred;
554
873
555
873
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
873
557
873
      bool follow(const SCEV *S) {
558
873
        if (!Pred(S))
559
873
          return true;
560
873
561
873
        Found = true;
562
873
        return false;
563
873
      }
564
873
565
873
      bool isDone() const { return Found; }
566
873
    };
567
873
568
873
    FindClosure FC(Pred);
569
873
    visitAll(Root, FC);
570
873
    return FC.Found;
571
873
  }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_3)
Line
Count
Source
550
36.6M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
36.6M
    struct FindClosure {
552
36.6M
      bool Found = false;
553
36.6M
      PredTy Pred;
554
36.6M
555
36.6M
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
36.6M
557
36.6M
      bool follow(const SCEV *S) {
558
36.6M
        if (!Pred(S))
559
36.6M
          return true;
560
36.6M
561
36.6M
        Found = true;
562
36.6M
        return false;
563
36.6M
      }
564
36.6M
565
36.6M
      bool isDone() const { return Found; }
566
36.6M
    };
567
36.6M
568
36.6M
    FindClosure FC(Pred);
569
36.6M
    visitAll(Root, FC);
570
36.6M
    return FC.Found;
571
36.6M
  }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))
Line
Count
Source
550
1.60M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
1.60M
    struct FindClosure {
552
1.60M
      bool Found = false;
553
1.60M
      PredTy Pred;
554
1.60M
555
1.60M
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
1.60M
557
1.60M
      bool follow(const SCEV *S) {
558
1.60M
        if (!Pred(S))
559
1.60M
          return true;
560
1.60M
561
1.60M
        Found = true;
562
1.60M
        return false;
563
1.60M
      }
564
1.60M
565
1.60M
      bool isDone() const { return Found; }
566
1.60M
    };
567
1.60M
568
1.60M
    FindClosure FC(Pred);
569
1.60M
    visitAll(Root, FC);
570
1.60M
    return FC.Found;
571
1.60M
  }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_30)
Line
Count
Source
550
70.2M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
70.2M
    struct FindClosure {
552
70.2M
      bool Found = false;
553
70.2M
      PredTy Pred;
554
70.2M
555
70.2M
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
70.2M
557
70.2M
      bool follow(const SCEV *S) {
558
70.2M
        if (!Pred(S))
559
70.2M
          return true;
560
70.2M
561
70.2M
        Found = true;
562
70.2M
        return false;
563
70.2M
      }
564
70.2M
565
70.2M
      bool isDone() const { return Found; }
566
70.2M
    };
567
70.2M
568
70.2M
    FindClosure FC(Pred);
569
70.2M
    visitAll(Root, FC);
570
70.2M
    return FC.Found;
571
70.2M
  }
ScalarEvolutionExpander.cpp:bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))
Line
Count
Source
550
399k
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
399k
    struct FindClosure {
552
399k
      bool Found = false;
553
399k
      PredTy Pred;
554
399k
555
399k
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
399k
557
399k
      bool follow(const SCEV *S) {
558
399k
        if (!Pred(S))
559
399k
          return true;
560
399k
561
399k
        Found = true;
562
399k
        return false;
563
399k
      }
564
399k
565
399k
      bool isDone() const { return Found; }
566
399k
    };
567
399k
568
399k
    FindClosure FC(Pred);
569
399k
    visitAll(Root, FC);
570
399k
    return FC.Found;
571
399k
  }
572
573
  /// This visitor recursively visits a SCEV expression and re-writes it.
574
  /// The result from each visit is cached, so it will return the same
575
  /// SCEV for the same input.
576
  template<typename SC>
577
  class SCEVRewriteVisitor : public SCEVVisitor<SC, const SCEV *> {
578
  protected:
579
    ScalarEvolution &SE;
580
    // Memoize the result of each visit so that we only compute once for
581
    // the same input SCEV. This is to avoid redundant computations when
582
    // a SCEV is referenced by multiple SCEVs. Without memoization, this
583
    // visit algorithm would have exponential time complexity in the worst
584
    // case, causing the compiler to hang on certain tests.
585
    DenseMap<const SCEV *, const SCEV *> RewriteResults;
586
587
  public:
588
5.49M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
218k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
303k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
1.30M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
939k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
271
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
374k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
2.34M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
110
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
1.43k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
11.6k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
667
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
589
590
17.4M
    const SCEV *visit(const SCEV *S) {
591
17.4M
      auto It = RewriteResults.find(S);
592
17.4M
      if (It != RewriteResults.end())
593
817k
        return It->second;
594
16.6M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
16.6M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
16.6M
      assert(Result.second && "Should insert a new entry");
597
16.6M
      return Result.first->second;
598
16.6M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visit(llvm::SCEV const*)
Line
Count
Source
590
375k
    const SCEV *visit(const SCEV *S) {
591
375k
      auto It = RewriteResults.find(S);
592
375k
      if (It != RewriteResults.end())
593
28.2k
        return It->second;
594
347k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
347k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
347k
      assert(Result.second && "Should insert a new entry");
597
347k
      return Result.first->second;
598
347k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
386k
    const SCEV *visit(const SCEV *S) {
591
386k
      auto It = RewriteResults.find(S);
592
386k
      if (It != RewriteResults.end())
593
4.67k
        return It->second;
594
382k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
382k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
382k
      assert(Result.second && "Should insert a new entry");
597
382k
      return Result.first->second;
598
382k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
1.70M
    const SCEV *visit(const SCEV *S) {
591
1.70M
      auto It = RewriteResults.find(S);
592
1.70M
      if (It != RewriteResults.end())
593
21.5k
        return It->second;
594
1.68M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
1.68M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
1.68M
      assert(Result.second && "Should insert a new entry");
597
1.68M
      return Result.first->second;
598
1.68M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
1.28M
    const SCEV *visit(const SCEV *S) {
591
1.28M
      auto It = RewriteResults.find(S);
592
1.28M
      if (It != RewriteResults.end())
593
20.4k
        return It->second;
594
1.26M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
1.26M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
1.26M
      assert(Result.second && "Should insert a new entry");
597
1.26M
      return Result.first->second;
598
1.26M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
371
    const SCEV *visit(const SCEV *S) {
591
371
      auto It = RewriteResults.find(S);
592
371
      if (It != RewriteResults.end())
593
6
        return It->second;
594
365
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
365
      auto Result = RewriteResults.try_emplace(S, Visited);
596
365
      assert(Result.second && "Should insert a new entry");
597
365
      return Result.first->second;
598
365
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
1.95M
    const SCEV *visit(const SCEV *S) {
591
1.95M
      auto It = RewriteResults.find(S);
592
1.95M
      if (It != RewriteResults.end())
593
62.8k
        return It->second;
594
1.89M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
1.89M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
1.89M
      assert(Result.second && "Should insert a new entry");
597
1.89M
      return Result.first->second;
598
1.89M
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visit(llvm::SCEV const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
11.6M
    const SCEV *visit(const SCEV *S) {
591
11.6M
      auto It = RewriteResults.find(S);
592
11.6M
      if (It != RewriteResults.end())
593
675k
        return It->second;
594
11.0M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
11.0M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
11.0M
      assert(Result.second && "Should insert a new entry");
597
11.0M
      return Result.first->second;
598
11.0M
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
193
    const SCEV *visit(const SCEV *S) {
591
193
      auto It = RewriteResults.find(S);
592
193
      if (It != RewriteResults.end())
593
0
        return It->second;
594
193
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
193
      auto Result = RewriteResults.try_emplace(S, Visited);
596
193
      assert(Result.second && "Should insert a new entry");
597
193
      return Result.first->second;
598
193
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visit(llvm::SCEV const*)
Line
Count
Source
590
16.4k
    const SCEV *visit(const SCEV *S) {
591
16.4k
      auto It = RewriteResults.find(S);
592
16.4k
      if (It != RewriteResults.end())
593
4.40k
        return It->second;
594
12.0k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
12.0k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
12.0k
      assert(Result.second && "Should insert a new entry");
597
12.0k
      return Result.first->second;
598
12.0k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
14.3k
    const SCEV *visit(const SCEV *S) {
591
14.3k
      auto It = RewriteResults.find(S);
592
14.3k
      if (It != RewriteResults.end())
593
115
        return It->second;
594
14.2k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
14.2k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
14.2k
      assert(Result.second && "Should insert a new entry");
597
14.2k
      return Result.first->second;
598
14.2k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
2.32k
    const SCEV *visit(const SCEV *S) {
591
2.32k
      auto It = RewriteResults.find(S);
592
2.32k
      if (It != RewriteResults.end())
593
96
        return It->second;
594
2.23k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
2.23k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
2.23k
      assert(Result.second && "Should insert a new entry");
597
2.23k
      return Result.first->second;
598
2.23k
    }
599
600
5.45M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
5.45M
      return Constant;
602
5.45M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
204k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
204k
      return Constant;
602
204k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
33.7k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
33.7k
      return Constant;
602
33.7k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
363k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
363k
      return Constant;
602
363k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
347k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
347k
      return Constant;
602
347k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
261
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
261
      return Constant;
602
261
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
579k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
579k
      return Constant;
602
579k
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
3.91M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
3.91M
      return Constant;
602
3.91M
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
31
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
31
      return Constant;
602
31
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
2.84k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
2.84k
      return Constant;
602
2.84k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
6.37k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
6.37k
      return Constant;
602
6.37k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
808
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
808
      return Constant;
602
808
    }
603
604
46.1k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
46.1k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
46.1k
      return Operand == Expr->getOperand()
607
46.1k
                 ? 
Expr45.0k
608
46.1k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())1.11k
;
609
46.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
737
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
737
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
737
      return Operand == Expr->getOperand()
607
737
                 ? Expr
608
737
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
609
737
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
1.14k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
1.14k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
1.14k
      return Operand == Expr->getOperand()
607
1.14k
                 ? Expr
608
1.14k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
609
1.14k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
4.48k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
4.48k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
4.48k
      return Operand == Expr->getOperand()
607
4.48k
                 ? 
Expr4.35k
608
4.48k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())130
;
609
4.48k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
4.32k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
4.32k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
4.32k
      return Operand == Expr->getOperand()
607
4.32k
                 ? 
Expr4.19k
608
4.32k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())124
;
609
4.32k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
4.04k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
4.04k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
4.04k
      return Operand == Expr->getOperand()
607
4.04k
                 ? 
Expr3.99k
608
4.04k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())47
;
609
4.04k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
31.3k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
31.3k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
31.3k
      return Operand == Expr->getOperand()
607
31.3k
                 ? 
Expr30.5k
608
31.3k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())812
;
609
31.3k
    }
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
4
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
4
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
4
      return Operand == Expr->getOperand()
607
4
                 ? Expr
608
4
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
609
4
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
77
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
77
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
77
      return Operand == Expr->getOperand()
607
77
                 ? 
Expr75
608
77
                 : 
SE.getTruncateExpr(Operand, Expr->getType())2
;
609
77
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
2
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
2
      return Operand == Expr->getOperand()
607
2
                 ? 
Expr0
608
2
                 : SE.getTruncateExpr(Operand, Expr->getType());
609
2
    }
610
611
223k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
223k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
223k
      return Operand == Expr->getOperand()
614
223k
                 ? 
Expr218k
615
223k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())4.57k
;
616
223k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
4.42k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
4.42k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
4.42k
      return Operand == Expr->getOperand()
614
4.42k
                 ? 
Expr4.41k
615
4.42k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())10
;
616
4.42k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
6.33k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
6.33k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
6.33k
      return Operand == Expr->getOperand()
614
6.33k
                 ? 
Expr5.41k
615
6.33k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())924
;
616
6.33k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
57.5k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
57.5k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
57.5k
      return Operand == Expr->getOperand()
614
57.5k
                 ? 
Expr55.8k
615
57.5k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.62k
;
616
57.5k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
46.4k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
46.4k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
46.4k
      return Operand == Expr->getOperand()
614
46.4k
                 ? 
Expr45.7k
615
46.4k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())678
;
616
46.4k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
2
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
2
      return Operand == Expr->getOperand()
614
2
                 ? Expr
615
2
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
616
2
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
108k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
108k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
108k
      return Operand == Expr->getOperand()
614
108k
                 ? 
Expr106k
615
108k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.34k
;
616
108k
    }
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
54
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
54
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
54
      return Operand == Expr->getOperand()
614
54
                 ? Expr
615
54
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
616
54
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
148
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
148
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
148
      return Operand == Expr->getOperand()
614
148
                 ? 
Expr147
615
148
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
616
148
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
11
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
11
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
11
      return Operand == Expr->getOperand()
614
11
                 ? 
Expr10
615
11
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
616
11
    }
617
618
521k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
521k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
521k
      return Operand == Expr->getOperand()
621
521k
                 ? 
Expr519k
622
521k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2.55k
;
623
521k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
23.8k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
23.8k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
23.8k
      return Operand == Expr->getOperand()
621
23.8k
                 ? 
Expr23.8k
622
23.8k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())5
;
623
23.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
973
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
973
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
973
      return Operand == Expr->getOperand()
621
973
                 ? 
Expr930
622
973
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())43
;
623
973
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
53.6k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
53.6k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
53.6k
      return Operand == Expr->getOperand()
621
53.6k
                 ? 
Expr52.5k
622
53.6k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())1.12k
;
623
53.6k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
36.1k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
36.1k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
36.1k
      return Operand == Expr->getOperand()
621
36.1k
                 ? 
Expr35.2k
622
36.1k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())907
;
623
36.1k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
2
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
2
      return Operand == Expr->getOperand()
621
2
                 ? Expr
622
2
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
623
2
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
406k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
406k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
406k
      return Operand == Expr->getOperand()
621
406k
                 ? 
Expr406k
622
406k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())469
;
623
406k
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
3
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
3
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
3
      return Operand == Expr->getOperand()
621
3
                 ? Expr
622
3
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
623
3
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
188
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
188
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
188
      return Operand == Expr->getOperand()
621
188
                 ? Expr
622
188
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
623
188
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
335
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
335
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
335
      return Operand == Expr->getOperand()
621
335
                 ? 
Expr331
622
335
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())4
;
623
335
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
28
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
28
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
28
      return Operand == Expr->getOperand()
621
28
                 ? 
Expr26
622
28
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2
;
623
28
    }
624
625
1.72M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
1.72M
      SmallVector<const SCEV *, 2> Operands;
627
1.72M
      bool Changed = false;
628
3.76M
      for (auto *Op : Expr->operands()) {
629
3.76M
        Operands.push_back(((SC*)this)->visit(Op));
630
3.76M
        Changed |= Op != Operands.back();
631
3.76M
      }
632
1.72M
      return !Changed ? 
Expr1.70M
:
SE.getAddExpr(Operands)18.7k
;
633
1.72M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
10.6k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
10.6k
      SmallVector<const SCEV *, 2> Operands;
627
10.6k
      bool Changed = false;
628
43.0k
      for (auto *Op : Expr->operands()) {
629
43.0k
        Operands.push_back(((SC*)this)->visit(Op));
630
43.0k
        Changed |= Op != Operands.back();
631
43.0k
      }
632
10.6k
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
633
10.6k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
1.80k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
1.80k
      SmallVector<const SCEV *, 2> Operands;
627
1.80k
      bool Changed = false;
628
3.92k
      for (auto *Op : Expr->operands()) {
629
3.92k
        Operands.push_back(((SC*)this)->visit(Op));
630
3.92k
        Changed |= Op != Operands.back();
631
3.92k
      }
632
1.80k
      return !Changed ? 
Expr1.80k
:
SE.getAddExpr(Operands)1
;
633
1.80k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
67.7k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
67.7k
      SmallVector<const SCEV *, 2> Operands;
627
67.7k
      bool Changed = false;
628
142k
      for (auto *Op : Expr->operands()) {
629
142k
        Operands.push_back(((SC*)this)->visit(Op));
630
142k
        Changed |= Op != Operands.back();
631
142k
      }
632
67.7k
      return !Changed ? 
Expr64.2k
:
SE.getAddExpr(Operands)3.44k
;
633
67.7k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
53.5k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
53.5k
      SmallVector<const SCEV *, 2> Operands;
627
53.5k
      bool Changed = false;
628
113k
      for (auto *Op : Expr->operands()) {
629
113k
        Operands.push_back(((SC*)this)->visit(Op));
630
113k
        Changed |= Op != Operands.back();
631
113k
      }
632
53.5k
      return !Changed ? 
Expr50.7k
:
SE.getAddExpr(Operands)2.77k
;
633
53.5k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
13
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
13
      SmallVector<const SCEV *, 2> Operands;
627
13
      bool Changed = false;
628
26
      for (auto *Op : Expr->operands()) {
629
26
        Operands.push_back(((SC*)this)->visit(Op));
630
26
        Changed |= Op != Operands.back();
631
26
      }
632
13
      return !Changed ? 
Expr9
:
SE.getAddExpr(Operands)4
;
633
13
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
222k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
222k
      SmallVector<const SCEV *, 2> Operands;
627
222k
      bool Changed = false;
628
509k
      for (auto *Op : Expr->operands()) {
629
509k
        Operands.push_back(((SC*)this)->visit(Op));
630
509k
        Changed |= Op != Operands.back();
631
509k
      }
632
222k
      return !Changed ? 
Expr220k
:
SE.getAddExpr(Operands)1.64k
;
633
222k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitAddExpr(llvm::SCEVAddExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
1.36M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
1.36M
      SmallVector<const SCEV *, 2> Operands;
627
1.36M
      bool Changed = false;
628
2.95M
      for (auto *Op : Expr->operands()) {
629
2.95M
        Operands.push_back(((SC*)this)->visit(Op));
630
2.95M
        Changed |= Op != Operands.back();
631
2.95M
      }
632
1.36M
      return !Changed ? 
Expr1.35M
:
SE.getAddExpr(Operands)10.7k
;
633
1.36M
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
34
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
34
      SmallVector<const SCEV *, 2> Operands;
627
34
      bool Changed = false;
628
68
      for (auto *Op : Expr->operands()) {
629
68
        Operands.push_back(((SC*)this)->visit(Op));
630
68
        Changed |= Op != Operands.back();
631
68
      }
632
34
      return !Changed ? 
Expr0
: SE.getAddExpr(Operands);
633
34
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
576
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
576
      SmallVector<const SCEV *, 2> Operands;
627
576
      bool Changed = false;
628
1.15k
      for (auto *Op : Expr->operands()) {
629
1.15k
        Operands.push_back(((SC*)this)->visit(Op));
630
1.15k
        Changed |= Op != Operands.back();
631
1.15k
      }
632
576
      return !Changed ? 
Expr516
:
SE.getAddExpr(Operands)60
;
633
576
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
306
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
306
      SmallVector<const SCEV *, 2> Operands;
627
306
      bool Changed = false;
628
642
      for (auto *Op : Expr->operands()) {
629
642
        Operands.push_back(((SC*)this)->visit(Op));
630
642
        Changed |= Op != Operands.back();
631
642
      }
632
306
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
633
306
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
124
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
124
      SmallVector<const SCEV *, 2> Operands;
627
124
      bool Changed = false;
628
262
      for (auto *Op : Expr->operands()) {
629
262
        Operands.push_back(((SC*)this)->visit(Op));
630
262
        Changed |= Op != Operands.back();
631
262
      }
632
124
      return !Changed ? 
Expr112
:
SE.getAddExpr(Operands)12
;
633
124
    }
634
635
845k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
845k
      SmallVector<const SCEV *, 2> Operands;
637
845k
      bool Changed = false;
638
1.70M
      for (auto *Op : Expr->operands()) {
639
1.70M
        Operands.push_back(((SC*)this)->visit(Op));
640
1.70M
        Changed |= Op != Operands.back();
641
1.70M
      }
642
845k
      return !Changed ? 
Expr834k
:
SE.getMulExpr(Operands)11.4k
;
643
845k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
36.8k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
36.8k
      SmallVector<const SCEV *, 2> Operands;
637
36.8k
      bool Changed = false;
638
74.6k
      for (auto *Op : Expr->operands()) {
639
74.6k
        Operands.push_back(((SC*)this)->visit(Op));
640
74.6k
        Changed |= Op != Operands.back();
641
74.6k
      }
642
36.8k
      return !Changed ? 
Expr36.8k
:
SE.getMulExpr(Operands)4
;
643
36.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
16.2k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
16.2k
      SmallVector<const SCEV *, 2> Operands;
637
16.2k
      bool Changed = false;
638
36.8k
      for (auto *Op : Expr->operands()) {
639
36.8k
        Operands.push_back(((SC*)this)->visit(Op));
640
36.8k
        Changed |= Op != Operands.back();
641
36.8k
      }
642
16.2k
      return !Changed ? 
Expr16.2k
:
SE.getMulExpr(Operands)19
;
643
16.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
41.7k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
41.7k
      SmallVector<const SCEV *, 2> Operands;
637
41.7k
      bool Changed = false;
638
83.7k
      for (auto *Op : Expr->operands()) {
639
83.7k
        Operands.push_back(((SC*)this)->visit(Op));
640
83.7k
        Changed |= Op != Operands.back();
641
83.7k
      }
642
41.7k
      return !Changed ? 
Expr38.8k
:
SE.getMulExpr(Operands)2.92k
;
643
41.7k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
39.3k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
39.3k
      SmallVector<const SCEV *, 2> Operands;
637
39.3k
      bool Changed = false;
638
79.0k
      for (auto *Op : Expr->operands()) {
639
79.0k
        Operands.push_back(((SC*)this)->visit(Op));
640
79.0k
        Changed |= Op != Operands.back();
641
79.0k
      }
642
39.3k
      return !Changed ? 
Expr36.6k
:
SE.getMulExpr(Operands)2.71k
;
643
39.3k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
29
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
29
      SmallVector<const SCEV *, 2> Operands;
637
29
      bool Changed = false;
638
58
      for (auto *Op : Expr->operands()) {
639
58
        Operands.push_back(((SC*)this)->visit(Op));
640
58
        Changed |= Op != Operands.back();
641
58
      }
642
29
      return !Changed ? 
Expr22
:
SE.getMulExpr(Operands)7
;
643
29
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
161k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
161k
      SmallVector<const SCEV *, 2> Operands;
637
161k
      bool Changed = false;
638
323k
      for (auto *Op : Expr->operands()) {
639
323k
        Operands.push_back(((SC*)this)->visit(Op));
640
323k
        Changed |= Op != Operands.back();
641
323k
      }
642
161k
      return !Changed ? 
Expr158k
:
SE.getMulExpr(Operands)2.72k
;
643
161k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitMulExpr(llvm::SCEVMulExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
546k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
546k
      SmallVector<const SCEV *, 2> Operands;
637
546k
      bool Changed = false;
638
1.09M
      for (auto *Op : Expr->operands()) {
639
1.09M
        Operands.push_back(((SC*)this)->visit(Op));
640
1.09M
        Changed |= Op != Operands.back();
641
1.09M
      }
642
546k
      return !Changed ? 
Expr544k
:
SE.getMulExpr(Operands)2.90k
;
643
546k
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
6
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
6
      SmallVector<const SCEV *, 2> Operands;
637
6
      bool Changed = false;
638
12
      for (auto *Op : Expr->operands()) {
639
12
        Operands.push_back(((SC*)this)->visit(Op));
640
12
        Changed |= Op != Operands.back();
641
12
      }
642
6
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
643
6
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
2.62k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
2.62k
      SmallVector<const SCEV *, 2> Operands;
637
2.62k
      bool Changed = false;
638
6.89k
      for (auto *Op : Expr->operands()) {
639
6.89k
        Operands.push_back(((SC*)this)->visit(Op));
640
6.89k
        Changed |= Op != Operands.back();
641
6.89k
      }
642
2.62k
      return !Changed ? 
Expr2.50k
:
SE.getMulExpr(Operands)120
;
643
2.62k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
202
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
202
      SmallVector<const SCEV *, 2> Operands;
637
202
      bool Changed = false;
638
417
      for (auto *Op : Expr->operands()) {
639
417
        Operands.push_back(((SC*)this)->visit(Op));
640
417
        Changed |= Op != Operands.back();
641
417
      }
642
202
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
643
202
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
67
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
67
      SmallVector<const SCEV *, 2> Operands;
637
67
      bool Changed = false;
638
140
      for (auto *Op : Expr->operands()) {
639
140
        Operands.push_back(((SC*)this)->visit(Op));
640
140
        Changed |= Op != Operands.back();
641
140
      }
642
67
      return !Changed ? 
Expr64
:
SE.getMulExpr(Operands)3
;
643
67
    }
644
645
78.4k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
78.4k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
78.4k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
78.4k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()75.7k
;
649
78.4k
      return !Changed ? 
Expr75.7k
:
SE.getUDivExpr(LHS, RHS)2.72k
;
650
78.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
1.12k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
1.12k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
1.12k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
1.12k
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
649
1.12k
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
650
1.12k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
16.2k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
16.2k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
16.2k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
16.2k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()16.2k
;
649
16.2k
      return !Changed ? 
Expr16.2k
:
SE.getUDivExpr(LHS, RHS)3
;
650
16.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
8.61k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
8.61k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
8.61k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
8.61k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.42k
;
649
8.61k
      return !Changed ? 
Expr8.42k
:
SE.getUDivExpr(LHS, RHS)190
;
650
8.61k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
8.17k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
8.17k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
8.17k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
8.17k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.02k
;
649
8.17k
      return !Changed ? 
Expr8.02k
:
SE.getUDivExpr(LHS, RHS)152
;
650
8.17k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
6
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
6
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
6
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
6
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
649
6
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
650
6
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
3.99k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
3.99k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
3.99k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
3.99k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()3.98k
;
649
3.99k
      return !Changed ? 
Expr3.98k
:
SE.getUDivExpr(LHS, RHS)10
;
650
3.99k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitUDivExpr(llvm::SCEVUDivExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
40.1k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
40.1k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
40.1k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
40.1k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()37.7k
;
649
40.1k
      return !Changed ? 
Expr37.7k
:
SE.getUDivExpr(LHS, RHS)2.34k
;
650
40.1k
    }
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
12
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
12
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
12
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
12
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()0
;
649
12
      return !Changed ? 
Expr0
: SE.getUDivExpr(LHS, RHS);
650
12
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
145
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
145
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
145
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
145
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()142
;
649
145
      return !Changed ? 
Expr142
:
SE.getUDivExpr(LHS, RHS)3
;
650
145
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
5
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
5
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
5
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
5
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4
;
649
5
      return !Changed ? 
Expr3
:
SE.getUDivExpr(LHS, RHS)2
;
650
5
    }
651
652
297k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
297k
      SmallVector<const SCEV *, 2> Operands;
654
297k
      bool Changed = false;
655
594k
      for (auto *Op : Expr->operands()) {
656
594k
        Operands.push_back(((SC*)this)->visit(Op));
657
594k
        Changed |= Op != Operands.back();
658
594k
      }
659
297k
      return !Changed ? 
Expr295k
660
297k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
1.49k
                                         Expr->getNoWrapFlags());
662
297k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
652
459
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
459
      SmallVector<const SCEV *, 2> Operands;
654
459
      bool Changed = false;
655
1.02k
      for (auto *Op : Expr->operands()) {
656
1.02k
        Operands.push_back(((SC*)this)->visit(Op));
657
1.02k
        Changed |= Op != Operands.back();
658
1.02k
      }
659
459
      return !Changed ? Expr
660
459
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
0
                                         Expr->getNoWrapFlags());
662
459
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
652
293k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
293k
      SmallVector<const SCEV *, 2> Operands;
654
293k
      bool Changed = false;
655
586k
      for (auto *Op : Expr->operands()) {
656
586k
        Operands.push_back(((SC*)this)->visit(Op));
657
586k
        Changed |= Op != Operands.back();
658
586k
      }
659
293k
      return !Changed ? 
Expr291k
660
293k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
1.40k
                                         Expr->getNoWrapFlags());
662
293k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
652
3.27k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
3.27k
      SmallVector<const SCEV *, 2> Operands;
654
3.27k
      bool Changed = false;
655
6.63k
      for (auto *Op : Expr->operands()) {
656
6.63k
        Operands.push_back(((SC*)this)->visit(Op));
657
6.63k
        Changed |= Op != Operands.back();
658
6.63k
      }
659
3.27k
      return !Changed ? 
Expr3.19k
660
3.27k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
88
                                         Expr->getNoWrapFlags());
662
3.27k
    }
663
664
65.4k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
65.4k
      SmallVector<const SCEV *, 2> Operands;
666
65.4k
      bool Changed = false;
667
132k
      for (auto *Op : Expr->operands()) {
668
132k
        Operands.push_back(((SC *)this)->visit(Op));
669
132k
        Changed |= Op != Operands.back();
670
132k
      }
671
65.4k
      return !Changed ? 
Expr59.2k
:
SE.getSMaxExpr(Operands)6.12k
;
672
65.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
2.71k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
2.71k
      SmallVector<const SCEV *, 2> Operands;
666
2.71k
      bool Changed = false;
667
5.45k
      for (auto *Op : Expr->operands()) {
668
5.45k
        Operands.push_back(((SC *)this)->visit(Op));
669
5.45k
        Changed |= Op != Operands.back();
670
5.45k
      }
671
2.71k
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
672
2.71k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
604
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
604
      SmallVector<const SCEV *, 2> Operands;
666
604
      bool Changed = false;
667
1.33k
      for (auto *Op : Expr->operands()) {
668
1.33k
        Operands.push_back(((SC *)this)->visit(Op));
669
1.33k
        Changed |= Op != Operands.back();
670
1.33k
      }
671
604
      return !Changed ? 
Expr599
:
SE.getSMaxExpr(Operands)5
;
672
604
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
20.5k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
20.5k
      SmallVector<const SCEV *, 2> Operands;
666
20.5k
      bool Changed = false;
667
41.5k
      for (auto *Op : Expr->operands()) {
668
41.5k
        Operands.push_back(((SC *)this)->visit(Op));
669
41.5k
        Changed |= Op != Operands.back();
670
41.5k
      }
671
20.5k
      return !Changed ? 
Expr18.4k
:
SE.getSMaxExpr(Operands)2.14k
;
672
20.5k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
20.4k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
20.4k
      SmallVector<const SCEV *, 2> Operands;
666
20.4k
      bool Changed = false;
667
41.2k
      for (auto *Op : Expr->operands()) {
668
41.2k
        Operands.push_back(((SC *)this)->visit(Op));
669
41.2k
        Changed |= Op != Operands.back();
670
41.2k
      }
671
20.4k
      return !Changed ? 
Expr18.3k
:
SE.getSMaxExpr(Operands)2.05k
;
672
20.4k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
6.37k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
6.37k
      SmallVector<const SCEV *, 2> Operands;
666
6.37k
      bool Changed = false;
667
12.7k
      for (auto *Op : Expr->operands()) {
668
12.7k
        Operands.push_back(((SC *)this)->visit(Op));
669
12.7k
        Changed |= Op != Operands.back();
670
12.7k
      }
671
6.37k
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
672
6.37k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
14.6k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
14.6k
      SmallVector<const SCEV *, 2> Operands;
666
14.6k
      bool Changed = false;
667
29.7k
      for (auto *Op : Expr->operands()) {
668
29.7k
        Operands.push_back(((SC *)this)->visit(Op));
669
29.7k
        Changed |= Op != Operands.back();
670
29.7k
      }
671
14.6k
      return !Changed ? 
Expr12.7k
:
SE.getSMaxExpr(Operands)1.91k
;
672
14.6k
    }
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
61
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
61
      SmallVector<const SCEV *, 2> Operands;
666
61
      bool Changed = false;
667
132
      for (auto *Op : Expr->operands()) {
668
132
        Operands.push_back(((SC *)this)->visit(Op));
669
132
        Changed |= Op != Operands.back();
670
132
      }
671
61
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
672
61
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
673
674
25.1k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
25.1k
      SmallVector<const SCEV *, 2> Operands;
676
25.1k
      bool Changed = false;
677
50.6k
      for (auto *Op : Expr->operands()) {
678
50.6k
        Operands.push_back(((SC*)this)->visit(Op));
679
50.6k
        Changed |= Op != Operands.back();
680
50.6k
      }
681
25.1k
      return !Changed ? 
Expr24.7k
:
SE.getUMaxExpr(Operands)435
;
682
25.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
602
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
602
      SmallVector<const SCEV *, 2> Operands;
676
602
      bool Changed = false;
677
1.22k
      for (auto *Op : Expr->operands()) {
678
1.22k
        Operands.push_back(((SC*)this)->visit(Op));
679
1.22k
        Changed |= Op != Operands.back();
680
1.22k
      }
681
602
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
602
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
381
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
381
      SmallVector<const SCEV *, 2> Operands;
676
381
      bool Changed = false;
677
854
      for (auto *Op : Expr->operands()) {
678
854
        Operands.push_back(((SC*)this)->visit(Op));
679
854
        Changed |= Op != Operands.back();
680
854
      }
681
381
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
381
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
3.91k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
3.91k
      SmallVector<const SCEV *, 2> Operands;
676
3.91k
      bool Changed = false;
677
7.89k
      for (auto *Op : Expr->operands()) {
678
7.89k
        Operands.push_back(((SC*)this)->visit(Op));
679
7.89k
        Changed |= Op != Operands.back();
680
7.89k
      }
681
3.91k
      return !Changed ? 
Expr3.90k
:
SE.getUMaxExpr(Operands)9
;
682
3.91k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
3.87k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
3.87k
      SmallVector<const SCEV *, 2> Operands;
676
3.87k
      bool Changed = false;
677
7.82k
      for (auto *Op : Expr->operands()) {
678
7.82k
        Operands.push_back(((SC*)this)->visit(Op));
679
7.82k
        Changed |= Op != Operands.back();
680
7.82k
      }
681
3.87k
      return !Changed ? 
Expr3.87k
:
SE.getUMaxExpr(Operands)4
;
682
3.87k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
4.01k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
4.01k
      SmallVector<const SCEV *, 2> Operands;
676
4.01k
      bool Changed = false;
677
8.03k
      for (auto *Op : Expr->operands()) {
678
8.03k
        Operands.push_back(((SC*)this)->visit(Op));
679
8.03k
        Changed |= Op != Operands.back();
680
8.03k
      }
681
4.01k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
4.01k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
12.3k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
12.3k
      SmallVector<const SCEV *, 2> Operands;
676
12.3k
      bool Changed = false;
677
24.7k
      for (auto *Op : Expr->operands()) {
678
24.7k
        Operands.push_back(((SC*)this)->visit(Op));
679
24.7k
        Changed |= Op != Operands.back();
680
24.7k
      }
681
12.3k
      return !Changed ? 
Expr11.9k
:
SE.getUMaxExpr(Operands)422
;
682
12.3k
    }
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
16
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
16
      SmallVector<const SCEV *, 2> Operands;
676
16
      bool Changed = false;
677
32
      for (auto *Op : Expr->operands()) {
678
32
        Operands.push_back(((SC*)this)->visit(Op));
679
32
        Changed |= Op != Operands.back();
680
32
      }
681
16
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
16
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
15
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
15
      SmallVector<const SCEV *, 2> Operands;
676
15
      bool Changed = false;
677
30
      for (auto *Op : Expr->operands()) {
678
30
        Operands.push_back(((SC*)this)->visit(Op));
679
30
        Changed |= Op != Operands.back();
680
30
      }
681
15
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
15
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
683
684
2.27M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
2.27M
      return Expr;
686
2.27M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
684
2.26M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
2.26M
      return Expr;
686
2.26M
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
684
2.41k
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
2.41k
      return Expr;
686
2.41k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
684
585
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
585
      return Expr;
686
585
    }
687
688
291k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
689
291k
      return Expr;
690
291k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Line
Count
Source
688
291k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
689
291k
      return Expr;
690
291k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
691
  };
692
693
  using ValueToValueMap = DenseMap<const Value *, Value *>;
694
695
  /// The SCEVParameterRewriter takes a scalar evolution expression and updates
696
  /// the SCEVUnknown components following the Map (Value -> Value).
697
  class SCEVParameterRewriter : public SCEVRewriteVisitor<SCEVParameterRewriter> {
698
  public:
699
    static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
700
                               ValueToValueMap &Map,
701
271
                               bool InterpretConsts = false) {
702
271
      SCEVParameterRewriter Rewriter(SE, Map, InterpretConsts);
703
271
      return Rewriter.visit(Scev);
704
271
    }
705
706
    SCEVParameterRewriter(ScalarEvolution &SE, ValueToValueMap &M, bool C)
707
271
      : SCEVRewriteVisitor(SE), Map(M), InterpretConsts(C) {}
708
709
52
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
710
52
      Value *V = Expr->getValue();
711
52
      if (Map.count(V)) {
712
6
        Value *NV = Map[V];
713
6
        if (InterpretConsts && 
isa<ConstantInt>(NV)4
)
714
4
          return SE.getConstant(cast<ConstantInt>(NV));
715
2
        return SE.getUnknown(NV);
716
2
      }
717
46
      return Expr;
718
46
    }
719
720
  private:
721
    ValueToValueMap &Map;
722
    bool InterpretConsts;
723
  };
724
725
  using LoopToScevMapT = DenseMap<const Loop *, const SCEV *>;
726
727
  /// The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies
728
  /// the Map (Loop -> SCEV) to all AddRecExprs.
729
  class SCEVLoopAddRecRewriter
730
      : public SCEVRewriteVisitor<SCEVLoopAddRecRewriter> {
731
  public:
732
    SCEVLoopAddRecRewriter(ScalarEvolution &SE, LoopToScevMapT &M)
733
667
        : SCEVRewriteVisitor(SE), Map(M) {}
734
735
    static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
736
667
                               ScalarEvolution &SE) {
737
667
      SCEVLoopAddRecRewriter Rewriter(SE, Map);
738
667
      return Rewriter.visit(Scev);
739
667
    }
740
741
603
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
742
603
      SmallVector<const SCEV *, 2> Operands;
743
603
      for (const SCEV *Op : Expr->operands())
744
1.20k
        Operands.push_back(visit(Op));
745
603
746
603
      const Loop *L = Expr->getLoop();
747
603
      const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags());
748
603
749
603
      if (0 == Map.count(L))
750
1
        return Res;
751
602
752
602
      const SCEVAddRecExpr *Rec = cast<SCEVAddRecExpr>(Res);
753
602
      return Rec->evaluateAtIteration(Map[L], SE);
754
602
    }
755
756
  private:
757
    LoopToScevMapT &Map;
758
  };
759
760
} // end namespace llvm
761
762
#endif // LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H