Coverage Report

Created: 2018-11-16 02:38

/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.45M
      SCEV(ID, scConstant), V(v) {}
55
56
  public:
57
348M
    ConstantInt *getValue() const { return V; }
58
210M
    const APInt &getAPInt() const { return getValue()->getValue(); }
59
60
97.5M
    Type *getType() const { return V->getType(); }
61
62
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
63
524M
    static bool classof(const SCEV *S) {
64
524M
      return S->getSCEVType() == scConstant;
65
524M
    }
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
31.4M
    const SCEV *getOperand() const { return Op; }
79
10.6M
    Type *getType() const { return Ty; }
80
81
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
82
6.81M
    static bool classof(const SCEV *S) {
83
6.81M
      return S->getSCEVType() == scTruncate ||
84
6.81M
             
S->getSCEVType() == scZeroExtend6.80M
||
85
6.81M
             
S->getSCEVType() == scSignExtend6.64M
;
86
6.81M
    }
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
61.4M
    static bool classof(const SCEV *S) {
100
61.4M
      return S->getSCEVType() == scTruncate;
101
61.4M
    }
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
31.4M
    static bool classof(const SCEV *S) {
115
31.4M
      return S->getSCEVType() == scZeroExtend;
116
31.4M
    }
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
31.4M
    static bool classof(const SCEV *S) {
130
31.4M
      return S->getSCEVType() == scSignExtend;
131
31.4M
    }
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.9M
      : SCEV(ID, T), Operands(O), NumOperands(N) {}
148
149
  public:
150
155M
    size_t getNumOperands() const { return NumOperands; }
151
152
266M
    const SCEV *getOperand(unsigned i) const {
153
266M
      assert(i < NumOperands && "Operand index out of range!");
154
266M
      return Operands[i];
155
266M
    }
156
157
    using op_iterator = const SCEV *const *;
158
    using op_range = iterator_range<op_iterator>;
159
160
142M
    op_iterator op_begin() const { return Operands; }
161
142M
    op_iterator op_end() const { return Operands + NumOperands; }
162
101M
    op_range operands() const {
163
101M
      return make_range(op_begin(), op_end());
164
101M
    }
165
166
53.3M
    Type *getType() const { return getOperand(0)->getType(); }
167
168
35.6M
    NoWrapFlags getNoWrapFlags(NoWrapFlags Mask = NoWrapMask) const {
169
35.6M
      return (NoWrapFlags)(SubclassData & Mask);
170
35.6M
    }
171
172
10.1M
    bool hasNoUnsignedWrap() const {
173
10.1M
      return getNoWrapFlags(FlagNUW) != FlagAnyWrap;
174
10.1M
    }
175
176
11.0M
    bool hasNoSignedWrap() const {
177
11.0M
      return getNoWrapFlags(FlagNSW) != FlagAnyWrap;
178
11.0M
    }
179
180
65.0k
    bool hasNoSelfWrap() const {
181
65.0k
      return getNoWrapFlags(FlagNW) != FlagAnyWrap;
182
65.0k
    }
183
184
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
185
3.58M
    static bool classof(const SCEV *S) {
186
3.58M
      return S->getSCEVType() == scAddExpr ||
187
3.58M
             
S->getSCEVType() == scMulExpr2.82M
||
188
3.58M
             
S->getSCEVType() == scSMaxExpr2.57M
||
189
3.58M
             
S->getSCEVType() == scUMaxExpr2.57M
||
190
3.58M
             
S->getSCEVType() == scAddRecExpr2.57M
;
191
3.58M
    }
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.54M
      : SCEVNAryExpr(ID, T, O, N) {}
200
201
  public:
202
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
203
2.56M
    static bool classof(const SCEV *S) {
204
2.56M
      return S->getSCEVType() == scAddExpr ||
205
2.56M
             
S->getSCEVType() == scMulExpr1.70M
||
206
2.56M
             
S->getSCEVType() == scSMaxExpr1.36M
||
207
2.56M
             
S->getSCEVType() == scUMaxExpr1.32M
;
208
2.56M
    }
209
210
    /// Set flags for a non-recurrence without clearing previously set flags.
211
21.4M
    void setNoWrapFlags(NoWrapFlags Flags) {
212
21.4M
      SubclassData |= Flags;
213
21.4M
    }
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
5.01M
      : SCEVCommutativeExpr(ID, scAddExpr, O, N) {}
223
224
  public:
225
27.5M
    Type *getType() const {
226
27.5M
      // Use the type of the last operand, which is likely to be a pointer
227
27.5M
      // type, if there is one. This doesn't usually matter, but it can help
228
27.5M
      // reduce casts when the expressions are expanded.
229
27.5M
      return getOperand(getNumOperands() - 1)->getType();
230
27.5M
    }
231
232
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
233
187M
    static bool classof(const SCEV *S) {
234
187M
      return S->getSCEVType() == scAddExpr;
235
187M
    }
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.42M
      : SCEVCommutativeExpr(ID, scMulExpr, O, N) {}
245
246
  public:
247
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
248
156M
    static bool classof(const SCEV *S) {
249
156M
      return S->getSCEVType() == scMulExpr;
250
156M
    }
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
181k
      : SCEV(ID, scUDivExpr), LHS(lhs), RHS(rhs) {}
262
263
  public:
264
6.40M
    const SCEV *getLHS() const { return LHS; }
265
7.42M
    const SCEV *getRHS() const { return RHS; }
266
267
1.03M
    Type *getType() const {
268
1.03M
      // In most cases the types of LHS and RHS will be the same, but in some
269
1.03M
      // crazy cases one or the other may be a pointer. ScalarEvolution doesn't
270
1.03M
      // depend on the type for correctness, but handling types carefully can
271
1.03M
      // avoid extra casts in the SCEVExpander. The LHS is more likely to be
272
1.03M
      // a pointer type than the RHS, so use the RHS' type here.
273
1.03M
      return getRHS()->getType();
274
1.03M
    }
275
276
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
277
21.0M
    static bool classof(const SCEV *S) {
278
21.0M
      return S->getSCEVType() == scUDivExpr;
279
21.0M
    }
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.40M
      : SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {}
298
299
  public:
300
47.2M
    const SCEV *getStart() const { return Operands[0]; }
301
75.4M
    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
21.2M
    const SCEV *getStepRecurrence(ScalarEvolution &SE) const {
308
21.2M
      if (isAffine()) 
return getOperand(1)21.2M
;
309
132
      return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1,
310
132
                                                           op_end()),
311
132
                              getLoop(), FlagAnyWrap);
312
132
    }
313
314
    /// Return true if this represents an expression A + B*x where A
315
    /// and B are loop invariant values.
316
44.3M
    bool isAffine() const {
317
44.3M
      // We know that the start value is invariant.  This expression is thus
318
44.3M
      // affine iff the step is also invariant.
319
44.3M
      return getNumOperands() == 2;
320
44.3M
    }
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
204k
    bool isQuadratic() const {
326
204k
      return getNumOperands() == 3;
327
204k
    }
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
20.5M
    void setNoWrapFlags(NoWrapFlags Flags) {
333
20.5M
      if (Flags & (FlagNUW | FlagNSW))
334
5.19M
        Flags = ScalarEvolution::setFlags(Flags, FlagNW);
335
20.5M
      SubclassData |= Flags;
336
20.5M
    }
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
270M
    static bool classof(const SCEV *S) {
357
270M
      return S->getSCEVType() == scAddRecExpr;
358
270M
    }
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
51.0k
      : SCEVCommutativeExpr(ID, scSMaxExpr, O, N) {
368
51.0k
      // Max never overflows.
369
51.0k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
370
51.0k
    }
371
372
  public:
373
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
374
18.3M
    static bool classof(const SCEV *S) {
375
18.3M
      return S->getSCEVType() == scSMaxExpr;
376
18.3M
    }
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.7k
      : SCEVCommutativeExpr(ID, scUMaxExpr, O, N) {
386
52.7k
      // Max never overflows.
387
52.7k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
388
52.7k
    }
389
390
  public:
391
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
392
17.0M
    static bool classof(const SCEV *S) {
393
17.0M
      return S->getSCEVType() == scUMaxExpr;
394
17.0M
    }
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.64M
      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
61.7M
    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
44.1M
    Type *getType() const { return getValPtr()->getType(); }
436
437
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
438
209M
    static bool classof(const SCEV *S) {
439
209M
      return S->getSCEVType() == scUnknown;
440
209M
    }
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.6M
    RetVal visit(const SCEV *S) {
448
19.6M
      switch (S->getSCEVType()) {
449
19.6M
      case scConstant:
450
6.16M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
19.6M
      case scTruncate:
452
51.8k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
19.6M
      case scZeroExtend:
454
244k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
19.6M
      case scSignExtend:
456
655k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
19.6M
      case scAddExpr:
458
2.18M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
19.6M
      case scMulExpr:
460
888k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
19.6M
      case scUDivExpr:
462
89.8k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
19.6M
      case scAddRecExpr:
464
4.03M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
19.6M
      case scSMaxExpr:
466
58.3k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
19.6M
      case scUMaxExpr:
468
25.9k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
19.6M
      case scUnknown:
470
4.91M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
19.6M
      case scCouldNotCompute:
472
302k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
19.6M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
19.6M
      }
476
19.6M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
342k
    RetVal visit(const SCEV *S) {
448
342k
      switch (S->getSCEVType()) {
449
342k
      case scConstant:
450
212k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
342k
      case scTruncate:
452
764
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
342k
      case scZeroExtend:
454
4.34k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
342k
      case scSignExtend:
456
23.9k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
342k
      case scAddExpr:
458
7.40k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
342k
      case scMulExpr:
460
33.9k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
342k
      case scUDivExpr:
462
1.12k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
342k
      case scAddRecExpr:
464
469
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
342k
      case scSMaxExpr:
466
780
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
342k
      case scUMaxExpr:
468
608
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
342k
      case scUnknown:
470
56.5k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
342k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
342k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
342k
      }
476
342k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVShiftRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
395k
    RetVal visit(const SCEV *S) {
448
395k
      switch (S->getSCEVType()) {
449
395k
      case scConstant:
450
34.1k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
395k
      case scTruncate:
452
1.17k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
395k
      case scZeroExtend:
454
6.38k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
395k
      case scSignExtend:
456
1.13k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
395k
      case scAddExpr:
458
2.00k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
395k
      case scMulExpr:
460
16.5k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
395k
      case scUDivExpr:
462
16.3k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
395k
      case scAddRecExpr:
464
10.9k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
395k
      case scSMaxExpr:
466
775
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
395k
      case scUMaxExpr:
468
392
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
395k
      case scUnknown:
470
305k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
395k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
395k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
395k
      }
476
395k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVInitRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
1.73M
    RetVal visit(const SCEV *S) {
448
1.73M
      switch (S->getSCEVType()) {
449
1.73M
      case scConstant:
450
369k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
1.73M
      case scTruncate:
452
6.50k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
1.73M
      case scZeroExtend:
454
57.6k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
1.73M
      case scSignExtend:
456
55.0k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
1.73M
      case scAddExpr:
458
70.6k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
1.73M
      case scMulExpr:
460
42.5k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
1.73M
      case scUDivExpr:
462
8.81k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
1.73M
      case scAddRecExpr:
464
528k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
1.73M
      case scSMaxExpr:
466
20.8k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
1.73M
      case scUMaxExpr:
468
3.86k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
1.73M
      case scUnknown:
470
271k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
1.73M
      case scCouldNotCompute:
472
302k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
1.73M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
1.73M
      }
476
1.73M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPostIncRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
1.29M
    RetVal visit(const SCEV *S) {
448
1.29M
      switch (S->getSCEVType()) {
449
1.29M
      case scConstant:
450
352k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
1.29M
      case scTruncate:
452
5.01k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
1.29M
      case scZeroExtend:
454
46.5k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
1.29M
      case scSignExtend:
456
37.2k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
1.29M
      case scAddExpr:
458
55.6k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
1.29M
      case scMulExpr:
460
40.0k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
1.29M
      case scUDivExpr:
462
8.35k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
1.29M
      case scAddRecExpr:
464
516k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
1.29M
      case scSMaxExpr:
466
20.6k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
1.29M
      case scUMaxExpr:
468
3.83k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
1.29M
      case scUnknown:
470
206k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
1.29M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
1.29M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
1.29M
      }
476
1.29M
    }
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.92M
    RetVal visit(const SCEV *S) {
448
1.92M
      switch (S->getSCEVType()) {
449
1.92M
      case scConstant:
450
589k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
1.92M
      case scTruncate:
452
5.27k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
1.92M
      case scZeroExtend:
454
14.1k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
1.92M
      case scSignExtend:
456
121k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
1.92M
      case scAddExpr:
458
224k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
1.92M
      case scMulExpr:
460
162k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
1.92M
      case scUDivExpr:
462
4.43k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
1.92M
      case scAddRecExpr:
464
300k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
1.92M
      case scSMaxExpr:
466
4.56k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
1.92M
      case scUMaxExpr:
468
4.02k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
1.92M
      case scUnknown:
470
497k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
1.92M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
1.92M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
1.92M
      }
476
1.92M
    }
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.45M
    RetVal visit(const SCEV *S) {
448
2.45M
      switch (S->getSCEVType()) {
449
2.45M
      case scConstant:
450
499k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
2.45M
      case scTruncate:
452
1.03k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
2.45M
      case scZeroExtend:
454
4.15k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
2.45M
      case scSignExtend:
456
3.81k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
2.45M
      case scAddExpr:
458
418k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
2.45M
      case scMulExpr:
460
26.0k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
2.45M
      case scUDivExpr:
462
5.04k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
2.45M
      case scAddRecExpr:
464
275k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
2.45M
      case scSMaxExpr:
466
1.18k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
2.45M
      case scUMaxExpr:
468
860
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
2.45M
      case scUnknown:
470
1.22M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
2.45M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
2.45M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
2.45M
      }
476
2.45M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
11.2M
    RetVal visit(const SCEV *S) {
448
11.2M
      switch (S->getSCEVType()) {
449
11.2M
      case scConstant:
450
3.99M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
11.2M
      case scTruncate:
452
31.5k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
11.2M
      case scZeroExtend:
454
109k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
11.2M
      case scSignExtend:
456
409k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
11.2M
      case scAddExpr:
458
1.39M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
11.2M
      case scMulExpr:
460
554k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
11.2M
      case scUDivExpr:
462
45.0k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
11.2M
      case scAddRecExpr:
464
2.35M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
11.2M
      case scSMaxExpr:
466
7.84k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
11.2M
      case scUMaxExpr:
468
12.3k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
11.2M
      case scUnknown:
470
2.32M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
11.2M
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
11.2M
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
11.2M
      }
476
11.2M
    }
SafeStack.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
447
196
    RetVal visit(const SCEV *S) {
448
196
      switch (S->getSCEVType()) {
449
196
      case scConstant:
450
31
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
196
      case scTruncate:
452
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
196
      case scZeroExtend:
454
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
196
      case scSignExtend:
456
3
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
196
      case scAddExpr:
458
34
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
196
      case scMulExpr:
460
6
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
196
      case scUDivExpr:
462
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
196
      case scAddRecExpr:
464
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
196
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
196
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
196
      case scUnknown:
470
122
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
196
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
196
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
196
      }
476
196
    }
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.39k
        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
151
        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
316
        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.29k
        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.37k
    RetVal visit(const SCEV *S) {
448
2.37k
      switch (S->getSCEVType()) {
449
2.37k
      case scConstant:
450
869
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
2.37k
      case scTruncate:
452
2
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
2.37k
      case scZeroExtend:
454
11
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
2.37k
      case scSignExtend:
456
28
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
2.37k
      case scAddExpr:
458
124
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
2.37k
      case scMulExpr:
460
67
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
2.37k
      case scUDivExpr:
462
5
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
2.37k
      case scAddRecExpr:
464
664
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
2.37k
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
2.37k
      case scUMaxExpr:
468
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
2.37k
      case scUnknown:
470
605
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
2.37k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
2.37k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
2.37k
      }
476
2.37k
    }
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
112
        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.27k
        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.7k
        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
818
        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.75k
    RetVal visit(const SCEV *S) {
448
3.75k
      switch (S->getSCEVType()) {
449
3.75k
      case scConstant:
450
920
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
451
3.75k
      case scTruncate:
452
74
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
453
3.75k
      case scZeroExtend:
454
22
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
455
3.75k
      case scSignExtend:
456
36
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
457
3.75k
      case scAddExpr:
458
503
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
459
3.75k
      case scMulExpr:
460
559
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
461
3.75k
      case scUDivExpr:
462
13
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
463
3.75k
      case scAddRecExpr:
464
38
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
465
3.75k
      case scSMaxExpr:
466
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
467
3.75k
      case scUMaxExpr:
468
2
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
469
3.75k
      case scUnknown:
470
1.58k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
471
3.75k
      case scCouldNotCompute:
472
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
473
3.75k
      default:
474
0
        llvm_unreachable("Unknown SCEV type!");
475
3.75k
      }
476
3.75k
    }
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
352M
    void push(const SCEV *S) {
497
352M
      if (Visited.insert(S).second && 
Visitor.follow(S)317M
)
498
313M
        Worklist.push_back(S);
499
352M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::push(llvm::SCEV const*)
Line
Count
Source
496
5.78M
    void push(const SCEV *S) {
497
5.78M
      if (Visited.insert(S).second && 
Visitor.follow(S)5.77M
)
498
2.30M
        Worklist.push_back(S);
499
5.78M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::push(llvm::SCEV const*)
Line
Count
Source
496
500k
    void push(const SCEV *S) {
497
500k
      if (Visited.insert(S).second && 
Visitor.follow(S)481k
)
498
260k
        Worklist.push_back(S);
499
500k
    }
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::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::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
116M
    void push(const SCEV *S) {
497
116M
      if (Visited.insert(S).second && 
Visitor.follow(S)110M
)
498
110M
        Worklist.push_back(S);
499
116M
    }
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.68M
    void push(const SCEV *S) {
497
2.68M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.64M
)
498
2.39M
        Worklist.push_back(S);
499
2.68M
    }
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.98k
)
498
9.98k
        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.14k
        Worklist.push_back(S);
499
3.01k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::push(llvm::SCEV const*)
Line
Count
Source
496
8.78k
    void push(const SCEV *S) {
497
8.78k
      if (Visited.insert(S).second && 
Visitor.follow(S)8.48k
)
498
7.36k
        Worklist.push_back(S);
499
8.78k
    }
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::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
496
113M
    void push(const SCEV *S) {
497
113M
      if (Visited.insert(S).second && 
Visitor.follow(S)107M
)
498
107M
        Worklist.push_back(S);
499
113M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::push(llvm::SCEV const*)
Line
Count
Source
496
108M
    void push(const SCEV *S) {
497
108M
      if (Visited.insert(S).second && 
Visitor.follow(S)86.6M
)
498
86.6M
        Worklist.push_back(S);
499
108M
    }
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
1.99M
    void push(const SCEV *S) {
497
1.99M
      if (Visited.insert(S).second && 
Visitor.follow(S)1.95M
)
498
1.95M
        Worklist.push_back(S);
499
1.99M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::push(llvm::SCEV const*)
Line
Count
Source
496
2.71M
    void push(const SCEV *S) {
497
2.71M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.61M
)
498
2.61M
        Worklist.push_back(S);
499
2.71M
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::push(llvm::SCEV const*)
Line
Count
Source
496
20.9k
    void push(const SCEV *S) {
497
20.9k
      if (Visited.insert(S).second && 
Visitor.follow(S)20.7k
)
498
15.1k
        Worklist.push_back(S);
499
20.9k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::push(llvm::SCEV const*)
Line
Count
Source
496
45.0k
    void push(const SCEV *S) {
497
45.0k
      if (Visited.insert(S).second && 
Visitor.follow(S)41.7k
)
498
41.7k
        Worklist.push_back(S);
499
45.0k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::push(llvm::SCEV const*)
Line
Count
Source
496
52.5k
    void push(const SCEV *S) {
497
52.5k
      if (Visited.insert(S).second && 
Visitor.follow(S)46.3k
)
498
39.3k
        Worklist.push_back(S);
499
52.5k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::push(llvm::SCEV const*)
Line
Count
Source
496
27.6k
    void push(const SCEV *S) {
497
27.6k
      if (Visited.insert(S).second && 
Visitor.follow(S)26.8k
)
498
26.8k
        Worklist.push_back(S);
499
27.6k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::push(llvm::SCEV const*)
Line
Count
Source
496
78.4k
    void push(const SCEV *S) {
497
78.4k
      if (Visited.insert(S).second && 
Visitor.follow(S)71.8k
)
498
61.1k
        Worklist.push_back(S);
499
78.4k
    }
500
501
  public:
502
129M
    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.77M
    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
252k
    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::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::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
38.7M
    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.62M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::SCEVTraversal((anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
502
1.86k
    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.86k
    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::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure&)
Line
Count
Source
502
70.6M
    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
15.4M
    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
405k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::SCEVTraversal((anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
502
531k
    SCEVTraversal(SV& V): Visitor(V) {}
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::SCEVTraversal((anonymous namespace)::SCEVFindInsideScop&)
Line
Count
Source
502
17.3k
    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.7k
    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.5k
    SCEVTraversal(SV& V): Visitor(V) {}
503
504
129M
    void visitAll(const SCEV *Root) {
505
129M
      push(Root);
506
442M
      while (!Worklist.empty() && 
!Visitor.isDone()313M
) {
507
313M
        const SCEV *S = Worklist.pop_back_val();
508
313M
509
313M
        switch (S->getSCEVType()) {
510
313M
        case scConstant:
511
197M
        case scUnknown:
512
197M
          break;
513
197M
        case scTruncate:
514
22.2M
        case scZeroExtend:
515
22.2M
        case scSignExtend:
516
22.2M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
22.2M
          break;
518
87.3M
        case scAddExpr:
519
87.3M
        case scMulExpr:
520
87.3M
        case scSMaxExpr:
521
87.3M
        case scUMaxExpr:
522
87.3M
        case scAddRecExpr:
523
87.3M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
190M
            push(Op);
525
87.3M
          break;
526
87.3M
        case scUDivExpr: {
527
5.51M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
5.51M
          push(UDiv->getLHS());
529
5.51M
          push(UDiv->getRHS());
530
5.51M
          break;
531
87.3M
        }
532
87.3M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
87.3M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
313M
        }
537
313M
      }
538
129M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.77M
    void visitAll(const SCEV *Root) {
505
1.77M
      push(Root);
506
3.77M
      while (!Worklist.empty() && 
!Visitor.isDone()2.30M
) {
507
2.00M
        const SCEV *S = Worklist.pop_back_val();
508
2.00M
509
2.00M
        switch (S->getSCEVType()) {
510
2.00M
        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
2.00M
        case scAddExpr:
519
2.00M
        case scMulExpr:
520
2.00M
        case scSMaxExpr:
521
2.00M
        case scUMaxExpr:
522
2.00M
        case scAddRecExpr:
523
2.00M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
4.00M
            push(Op);
525
2.00M
          break;
526
2.00M
        case scUDivExpr: {
527
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
0
          push(UDiv->getLHS());
529
0
          push(UDiv->getRHS());
530
0
          break;
531
2.00M
        }
532
2.00M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
2.00M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.00M
        }
537
2.00M
      }
538
1.77M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
252k
    void visitAll(const SCEV *Root) {
505
252k
      push(Root);
506
490k
      while (!Worklist.empty() && 
!Visitor.isDone()257k
) {
507
238k
        const SCEV *S = Worklist.pop_back_val();
508
238k
509
238k
        switch (S->getSCEVType()) {
510
238k
        case scConstant:
511
100k
        case scUnknown:
512
100k
          break;
513
100k
        case scTruncate:
514
38.7k
        case scZeroExtend:
515
38.7k
        case scSignExtend:
516
38.7k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
38.7k
          break;
518
98.9k
        case scAddExpr:
519
98.9k
        case scMulExpr:
520
98.9k
        case scSMaxExpr:
521
98.9k
        case scUMaxExpr:
522
98.9k
        case scAddRecExpr:
523
98.9k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
209k
            push(Op);
525
98.9k
          break;
526
98.9k
        case scUDivExpr: {
527
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
0
          push(UDiv->getLHS());
529
0
          push(UDiv->getRHS());
530
0
          break;
531
98.9k
        }
532
98.9k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
98.9k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
238k
        }
537
238k
      }
538
252k
    }
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::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::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
38.7M
    void visitAll(const SCEV *Root) {
505
38.7M
      push(Root);
506
148M
      while (!Worklist.empty() && 
!Visitor.isDone()110M
) {
507
110M
        const SCEV *S = Worklist.pop_back_val();
508
110M
509
110M
        switch (S->getSCEVType()) {
510
110M
        case scConstant:
511
69.1M
        case scUnknown:
512
69.1M
          break;
513
69.1M
        case scTruncate:
514
7.70M
        case scZeroExtend:
515
7.70M
        case scSignExtend:
516
7.70M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
7.70M
          break;
518
32.7M
        case scAddExpr:
519
32.7M
        case scMulExpr:
520
32.7M
        case scSMaxExpr:
521
32.7M
        case scUMaxExpr:
522
32.7M
        case scAddRecExpr:
523
32.7M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
68.9M
            push(Op);
525
32.7M
          break;
526
32.7M
        case scUDivExpr: {
527
515k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
515k
          push(UDiv->getLHS());
529
515k
          push(UDiv->getRHS());
530
515k
          break;
531
32.7M
        }
532
32.7M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
32.7M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
110M
        }
537
110M
      }
538
38.7M
    }
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.62M
    void visitAll(const SCEV *Root) {
505
1.62M
      push(Root);
506
4.01M
      while (!Worklist.empty() && 
!Visitor.isDone()2.39M
) {
507
2.39M
        const SCEV *S = Worklist.pop_back_val();
508
2.39M
509
2.39M
        switch (S->getSCEVType()) {
510
2.39M
        case scConstant:
511
1.84M
        case scUnknown:
512
1.84M
          break;
513
1.84M
        case scTruncate:
514
59.2k
        case scZeroExtend:
515
59.2k
        case scSignExtend:
516
59.2k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
59.2k
          break;
518
472k
        case scAddExpr:
519
472k
        case scMulExpr:
520
472k
        case scSMaxExpr:
521
472k
        case scUMaxExpr:
522
472k
        case scAddRecExpr:
523
472k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
967k
            push(Op);
525
472k
          break;
526
472k
        case scUDivExpr: {
527
18.2k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
18.2k
          push(UDiv->getLHS());
529
18.2k
          push(UDiv->getRHS());
530
18.2k
          break;
531
472k
        }
532
472k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
472k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.39M
        }
537
2.39M
      }
538
1.62M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.86k
    void visitAll(const SCEV *Root) {
505
1.86k
      push(Root);
506
11.8k
      while (!Worklist.empty() && 
!Visitor.isDone()9.98k
) {
507
9.98k
        const SCEV *S = Worklist.pop_back_val();
508
9.98k
509
9.98k
        switch (S->getSCEVType()) {
510
9.98k
        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.85k
            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.98k
        }
537
9.98k
      }
538
1.86k
    }
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.03k
      while (!Worklist.empty() && 
!Visitor.isDone()2.14k
) {
507
2.14k
        const SCEV *S = Worklist.pop_back_val();
508
2.14k
509
2.14k
        switch (S->getSCEVType()) {
510
2.14k
        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.14k
        }
537
2.14k
      }
538
2.88k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
1.86k
    void visitAll(const SCEV *Root) {
505
1.86k
      push(Root);
506
9.22k
      while (!Worklist.empty() && 
!Visitor.isDone()7.36k
) {
507
7.36k
        const SCEV *S = Worklist.pop_back_val();
508
7.36k
509
7.36k
        switch (S->getSCEVType()) {
510
7.36k
        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.75k
            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.36k
        }
537
7.36k
      }
538
1.86k
    }
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::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
70.6M
    void visitAll(const SCEV *Root) {
505
70.6M
      push(Root);
506
177M
      while (!Worklist.empty() && 
!Visitor.isDone()107M
) {
507
106M
        const SCEV *S = Worklist.pop_back_val();
508
106M
509
106M
        switch (S->getSCEVType()) {
510
106M
        case scConstant:
511
83.5M
        case scUnknown:
512
83.5M
          break;
513
83.5M
        case scTruncate:
514
5.70M
        case scZeroExtend:
515
5.70M
        case scSignExtend:
516
5.70M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
5.70M
          break;
518
14.1M
        case scAddExpr:
519
14.1M
        case scMulExpr:
520
14.1M
        case scSMaxExpr:
521
14.1M
        case scUMaxExpr:
522
14.1M
        case scAddRecExpr:
523
14.1M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
30.5M
            push(Op);
525
14.1M
          break;
526
14.1M
        case scUDivExpr: {
527
3.39M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
3.39M
          push(UDiv->getLHS());
529
3.39M
          push(UDiv->getRHS());
530
3.39M
          break;
531
14.1M
        }
532
14.1M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
14.1M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
106M
        }
537
106M
      }
538
70.6M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
15.4M
    void visitAll(const SCEV *Root) {
505
15.4M
      push(Root);
506
102M
      while (!Worklist.empty() && 
!Visitor.isDone()86.6M
) {
507
86.6M
        const SCEV *S = Worklist.pop_back_val();
508
86.6M
509
86.6M
        switch (S->getSCEVType()) {
510
86.6M
        case scConstant:
511
40.5M
        case scUnknown:
512
40.5M
          break;
513
40.5M
        case scTruncate:
514
8.47M
        case scZeroExtend:
515
8.47M
        case scSignExtend:
516
8.47M
          push(cast<SCEVCastExpr>(S)->getOperand());
517
8.47M
          break;
518
36.0M
        case scAddExpr:
519
36.0M
        case scMulExpr:
520
36.0M
        case scSMaxExpr:
521
36.0M
        case scUMaxExpr:
522
36.0M
        case scAddRecExpr:
523
36.0M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
81.7M
            push(Op);
525
36.0M
          break;
526
36.0M
        case scUDivExpr: {
527
1.55M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
1.55M
          push(UDiv->getLHS());
529
1.55M
          push(UDiv->getRHS());
530
1.55M
          break;
531
36.0M
        }
532
36.0M
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
36.0M
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
86.6M
        }
537
86.6M
      }
538
15.4M
    }
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
405k
    void visitAll(const SCEV *Root) {
505
405k
      push(Root);
506
2.35M
      while (!Worklist.empty() && 
!Visitor.isDone()1.95M
) {
507
1.95M
        const SCEV *S = Worklist.pop_back_val();
508
1.95M
509
1.95M
        switch (S->getSCEVType()) {
510
1.95M
        case scConstant:
511
1.11M
        case scUnknown:
512
1.11M
          break;
513
1.11M
        case scTruncate:
514
102k
        case scZeroExtend:
515
102k
        case scSignExtend:
516
102k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
102k
          break;
518
731k
        case scAddExpr:
519
731k
        case scMulExpr:
520
731k
        case scSMaxExpr:
521
731k
        case scUMaxExpr:
522
731k
        case scAddRecExpr:
523
731k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
1.48M
            push(Op);
525
731k
          break;
526
731k
        case scUDivExpr: {
527
2.04k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
2.04k
          push(UDiv->getLHS());
529
2.04k
          push(UDiv->getRHS());
530
2.04k
          break;
531
731k
        }
532
731k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
731k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
1.95M
        }
537
1.95M
      }
538
405k
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
531k
    void visitAll(const SCEV *Root) {
505
531k
      push(Root);
506
3.14M
      while (!Worklist.empty() && 
!Visitor.isDone()2.61M
) {
507
2.61M
        const SCEV *S = Worklist.pop_back_val();
508
2.61M
509
2.61M
        switch (S->getSCEVType()) {
510
2.61M
        case scConstant:
511
1.46M
        case scUnknown:
512
1.46M
          break;
513
1.46M
        case scTruncate:
514
165k
        case scZeroExtend:
515
165k
        case scSignExtend:
516
165k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
165k
          break;
518
955k
        case scAddExpr:
519
955k
        case scMulExpr:
520
955k
        case scSMaxExpr:
521
955k
        case scUMaxExpr:
522
955k
        case scAddRecExpr:
523
955k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
1.97M
            push(Op);
525
955k
          break;
526
955k
        case scUDivExpr: {
527
23.7k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
528
23.7k
          push(UDiv->getLHS());
529
23.7k
          push(UDiv->getRHS());
530
23.7k
          break;
531
955k
        }
532
955k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
955k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
2.61M
        }
537
2.61M
      }
538
531k
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
17.3k
    void visitAll(const SCEV *Root) {
505
17.3k
      push(Root);
506
32.2k
      while (!Worklist.empty() && 
!Visitor.isDone()15.0k
) {
507
14.9k
        const SCEV *S = Worklist.pop_back_val();
508
14.9k
509
14.9k
        switch (S->getSCEVType()) {
510
14.9k
        case scConstant:
511
12.8k
        case scUnknown:
512
12.8k
          break;
513
12.8k
        case scTruncate:
514
794
        case scZeroExtend:
515
794
        case scSignExtend:
516
794
          push(cast<SCEVCastExpr>(S)->getOperand());
517
794
          break;
518
1.18k
        case scAddExpr:
519
1.18k
        case scMulExpr:
520
1.18k
        case scSMaxExpr:
521
1.18k
        case scUMaxExpr:
522
1.18k
        case scAddRecExpr:
523
1.18k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
2.47k
            push(Op);
525
1.18k
          break;
526
1.18k
        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.18k
        }
532
1.18k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
1.18k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
14.9k
        }
537
14.9k
      }
538
17.3k
    }
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.6k
      while (!Worklist.empty() && 
!Visitor.isDone()41.7k
) {
507
41.7k
        const SCEV *S = Worklist.pop_back_val();
508
41.7k
509
41.7k
        switch (S->getSCEVType()) {
510
41.7k
        case scConstant:
511
26.9k
        case scUnknown:
512
26.9k
          break;
513
26.9k
        case scTruncate:
514
1.41k
        case scZeroExtend:
515
1.41k
        case scSignExtend:
516
1.41k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
1.41k
          break;
518
13.3k
        case scAddExpr:
519
13.3k
        case scMulExpr:
520
13.3k
        case scSMaxExpr:
521
13.3k
        case scUMaxExpr:
522
13.3k
        case scAddRecExpr:
523
13.3k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
27.6k
            push(Op);
525
13.3k
          break;
526
13.3k
        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.3k
        }
532
13.3k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
13.3k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
41.7k
        }
537
41.7k
      }
538
15.8k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
19.8k
    void visitAll(const SCEV *Root) {
505
19.8k
      push(Root);
506
59.1k
      while (!Worklist.empty() && 
!Visitor.isDone()39.3k
) {
507
39.3k
        const SCEV *S = Worklist.pop_back_val();
508
39.3k
509
39.3k
        switch (S->getSCEVType()) {
510
39.3k
        case scConstant:
511
22.6k
        case scUnknown:
512
22.6k
          break;
513
22.6k
        case scTruncate:
514
1.00k
        case scZeroExtend:
515
1.00k
        case scSignExtend:
516
1.00k
          push(cast<SCEVCastExpr>(S)->getOperand());
517
1.00k
          break;
518
15.6k
        case scAddExpr:
519
15.6k
        case scMulExpr:
520
15.6k
        case scSMaxExpr:
521
15.6k
        case scUMaxExpr:
522
15.6k
        case scAddRecExpr:
523
15.6k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
31.4k
            push(Op);
525
15.6k
          break;
526
15.6k
        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.6k
        }
532
15.6k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
15.6k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
39.3k
        }
537
39.3k
      }
538
19.8k
    }
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.8k
        const SCEV *S = Worklist.pop_back_val();
508
26.8k
509
26.8k
        switch (S->getSCEVType()) {
510
26.8k
        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.38k
        case scAddExpr:
519
7.38k
        case scMulExpr:
520
7.38k
        case scSMaxExpr:
521
7.38k
        case scUMaxExpr:
522
7.38k
        case scAddRecExpr:
523
7.38k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
14.8k
            push(Op);
525
7.38k
          break;
526
7.38k
        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.38k
        }
532
7.38k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
7.38k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
26.8k
        }
537
26.8k
      }
538
11.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::visitAll(llvm::SCEV const*)
Line
Count
Source
504
24.5k
    void visitAll(const SCEV *Root) {
505
24.5k
      push(Root);
506
85.6k
      while (!Worklist.empty() && 
!Visitor.isDone()61.1k
) {
507
61.1k
        const SCEV *S = Worklist.pop_back_val();
508
61.1k
509
61.1k
        switch (S->getSCEVType()) {
510
61.1k
        case scConstant:
511
33.6k
        case scUnknown:
512
33.6k
          break;
513
33.6k
        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.9k
        case scAddExpr:
519
23.9k
        case scMulExpr:
520
23.9k
        case scSMaxExpr:
521
23.9k
        case scUMaxExpr:
522
23.9k
        case scAddRecExpr:
523
23.9k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
524
49.7k
            push(Op);
525
23.9k
          break;
526
23.9k
        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.9k
        }
532
23.9k
        case scCouldNotCompute:
533
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
534
23.9k
        default:
535
0
          llvm_unreachable("Unknown SCEV kind!");
536
61.1k
        }
537
61.1k
      }
538
24.5k
    }
539
  };
540
541
  /// Use SCEVTraversal to visit all nodes in the given expression tree.
542
  template<typename SV>
543
111M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
111M
    SCEVTraversal<SV> T(Visitor);
545
111M
    T.visitAll(Root);
546
111M
  }
Unexecuted instantiation: ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32&)
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
38.7M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
38.7M
    SCEVTraversal<SV> T(Visitor);
545
38.7M
    T.visitAll(Root);
546
38.7M
  }
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.62M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.62M
    SCEVTraversal<SV> T(Visitor);
545
1.62M
    T.visitAll(Root);
546
1.62M
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectStrides>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
543
1.86k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.86k
    SCEVTraversal<SV> T(Visitor);
545
1.86k
    T.visitAll(Root);
546
1.86k
  }
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.86k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
1.86k
    SCEVTraversal<SV> T(Visitor);
545
1.86k
    T.visitAll(Root);
546
1.86k
  }
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::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31&)
Line
Count
Source
543
70.6M
  void visitAll(const SCEV *Root, SV& Visitor) {
544
70.6M
    SCEVTraversal<SV> T(Visitor);
545
70.6M
    T.visitAll(Root);
546
70.6M
  }
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
405k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
405k
    SCEVTraversal<SV> T(Visitor);
545
405k
    T.visitAll(Root);
546
405k
  }
ScalarEvolutionExpander.cpp:void llvm::visitAll<(anonymous namespace)::SCEVFindUnsafe>(llvm::SCEV const*, (anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
543
531k
  void visitAll(const SCEV *Root, SV& Visitor) {
544
531k
    SCEVTraversal<SV> T(Visitor);
545
531k
    T.visitAll(Root);
546
531k
  }
547
548
  /// Return true if any node in \p Root satisfies the predicate \p Pred.
549
  template <typename PredTy>
550
111M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
111M
    struct FindClosure {
552
111M
      bool Found = false;
553
111M
      PredTy Pred;
554
111M
555
111M
      FindClosure(PredTy Pred) : Pred(Pred) {}
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::FindClosure::FindClosure(llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)
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
38.7M
      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.62M
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure::FindClosure(llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)
Line
Count
Source
555
70.6M
      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
405k
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
111M
557
222M
      bool follow(const SCEV *S) {
558
222M
        if (!Pred(S))
559
221M
          return true;
560
490k
561
490k
        Found = true;
562
490k
        return false;
563
490k
      }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::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
110M
      bool follow(const SCEV *S) {
558
110M
        if (!Pred(S))
559
110M
          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.64M
      bool follow(const SCEV *S) {
558
2.64M
        if (!Pred(S))
559
2.39M
          return true;
560
250k
561
250k
        Found = true;
562
250k
        return false;
563
250k
      }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
557
107M
      bool follow(const SCEV *S) {
558
107M
        if (!Pred(S))
559
107M
          return true;
560
239k
561
239k
        Found = true;
562
239k
        return false;
563
239k
      }
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.95M
      bool follow(const SCEV *S) {
558
1.95M
        if (!Pred(S))
559
1.95M
          return true;
560
16
561
16
        Found = true;
562
16
        return false;
563
16
      }
564
111M
565
221M
      bool isDone() const { return Found; }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)::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
110M
      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.39M
      bool isDone() const { return Found; }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure::isDone() const
Line
Count
Source
565
107M
      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.95M
      bool isDone() const { return Found; }
566
111M
    };
567
111M
568
111M
    FindClosure FC(Pred);
569
111M
    visitAll(Root, FC);
570
111M
    return FC.Found;
571
111M
  }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_32)
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
38.7M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
38.7M
    struct FindClosure {
552
38.7M
      bool Found = false;
553
38.7M
      PredTy Pred;
554
38.7M
555
38.7M
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
38.7M
557
38.7M
      bool follow(const SCEV *S) {
558
38.7M
        if (!Pred(S))
559
38.7M
          return true;
560
38.7M
561
38.7M
        Found = true;
562
38.7M
        return false;
563
38.7M
      }
564
38.7M
565
38.7M
      bool isDone() const { return Found; }
566
38.7M
    };
567
38.7M
568
38.7M
    FindClosure FC(Pred);
569
38.7M
    visitAll(Root, FC);
570
38.7M
    return FC.Found;
571
38.7M
  }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))
Line
Count
Source
550
1.62M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
1.62M
    struct FindClosure {
552
1.62M
      bool Found = false;
553
1.62M
      PredTy Pred;
554
1.62M
555
1.62M
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
1.62M
557
1.62M
      bool follow(const SCEV *S) {
558
1.62M
        if (!Pred(S))
559
1.62M
          return true;
560
1.62M
561
1.62M
        Found = true;
562
1.62M
        return false;
563
1.62M
      }
564
1.62M
565
1.62M
      bool isDone() const { return Found; }
566
1.62M
    };
567
1.62M
568
1.62M
    FindClosure FC(Pred);
569
1.62M
    visitAll(Root, FC);
570
1.62M
    return FC.Found;
571
1.62M
  }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)
Line
Count
Source
550
70.6M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
70.6M
    struct FindClosure {
552
70.6M
      bool Found = false;
553
70.6M
      PredTy Pred;
554
70.6M
555
70.6M
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
70.6M
557
70.6M
      bool follow(const SCEV *S) {
558
70.6M
        if (!Pred(S))
559
70.6M
          return true;
560
70.6M
561
70.6M
        Found = true;
562
70.6M
        return false;
563
70.6M
      }
564
70.6M
565
70.6M
      bool isDone() const { return Found; }
566
70.6M
    };
567
70.6M
568
70.6M
    FindClosure FC(Pred);
569
70.6M
    visitAll(Root, FC);
570
70.6M
    return FC.Found;
571
70.6M
  }
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
405k
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
551
405k
    struct FindClosure {
552
405k
      bool Found = false;
553
405k
      PredTy Pred;
554
405k
555
405k
      FindClosure(PredTy Pred) : Pred(Pred) {}
556
405k
557
405k
      bool follow(const SCEV *S) {
558
405k
        if (!Pred(S))
559
405k
          return true;
560
405k
561
405k
        Found = true;
562
405k
        return false;
563
405k
      }
564
405k
565
405k
      bool isDone() const { return Found; }
566
405k
    };
567
405k
568
405k
    FindClosure FC(Pred);
569
405k
    visitAll(Root, FC);
570
405k
    return FC.Found;
571
405k
  }
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.64M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
228k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
314k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
1.33M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
960k
    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
382k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
2.40M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
113
    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.7k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
588
688
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
589
590
17.8M
    const SCEV *visit(const SCEV *S) {
591
17.8M
      auto It = RewriteResults.find(S);
592
17.8M
      if (It != RewriteResults.end())
593
833k
        return It->second;
594
16.9M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
16.9M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
16.9M
      assert(Result.second && "Should insert a new entry");
597
16.9M
      return Result.first->second;
598
16.9M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visit(llvm::SCEV const*)
Line
Count
Source
590
368k
    const SCEV *visit(const SCEV *S) {
591
368k
      auto It = RewriteResults.find(S);
592
368k
      if (It != RewriteResults.end())
593
25.6k
        return It->second;
594
342k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
342k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
342k
      assert(Result.second && "Should insert a new entry");
597
342k
      return Result.first->second;
598
342k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
400k
    const SCEV *visit(const SCEV *S) {
591
400k
      auto It = RewriteResults.find(S);
592
400k
      if (It != RewriteResults.end())
593
4.73k
        return It->second;
594
395k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
395k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
395k
      assert(Result.second && "Should insert a new entry");
597
395k
      return Result.first->second;
598
395k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
1.75M
    const SCEV *visit(const SCEV *S) {
591
1.75M
      auto It = RewriteResults.find(S);
592
1.75M
      if (It != RewriteResults.end())
593
21.7k
        return It->second;
594
1.73M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
1.73M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
1.73M
      assert(Result.second && "Should insert a new entry");
597
1.73M
      return Result.first->second;
598
1.73M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
1.31M
    const SCEV *visit(const SCEV *S) {
591
1.31M
      auto It = RewriteResults.find(S);
592
1.31M
      if (It != RewriteResults.end())
593
20.5k
        return It->second;
594
1.29M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
1.29M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
1.29M
      assert(Result.second && "Should insert a new entry");
597
1.29M
      return Result.first->second;
598
1.29M
    }
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.98M
    const SCEV *visit(const SCEV *S) {
591
1.98M
      auto It = RewriteResults.find(S);
592
1.98M
      if (It != RewriteResults.end())
593
61.4k
        return It->second;
594
1.92M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
1.92M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
1.92M
      assert(Result.second && "Should insert a new entry");
597
1.92M
      return Result.first->second;
598
1.92M
    }
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.9M
    const SCEV *visit(const SCEV *S) {
591
11.9M
      auto It = RewriteResults.find(S);
592
11.9M
      if (It != RewriteResults.end())
593
694k
        return It->second;
594
11.2M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
11.2M
      auto Result = RewriteResults.try_emplace(S, Visited);
596
11.2M
      assert(Result.second && "Should insert a new entry");
597
11.2M
      return Result.first->second;
598
11.2M
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
590
196
    const SCEV *visit(const SCEV *S) {
591
196
      auto It = RewriteResults.find(S);
592
196
      if (It != RewriteResults.end())
593
0
        return It->second;
594
196
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
196
      auto Result = RewriteResults.try_emplace(S, Visited);
596
196
      assert(Result.second && "Should insert a new entry");
597
196
      return Result.first->second;
598
196
    }
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.4k
    const SCEV *visit(const SCEV *S) {
591
14.4k
      auto It = RewriteResults.find(S);
592
14.4k
      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.47k
    const SCEV *visit(const SCEV *S) {
591
2.47k
      auto It = RewriteResults.find(S);
592
2.47k
      if (It != RewriteResults.end())
593
97
        return It->second;
594
2.37k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
595
2.37k
      auto Result = RewriteResults.try_emplace(S, Visited);
596
2.37k
      assert(Result.second && "Should insert a new entry");
597
2.37k
      return Result.first->second;
598
2.37k
    }
599
600
5.56M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
5.56M
      return Constant;
602
5.56M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
212k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
212k
      return Constant;
602
212k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
34.1k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
34.1k
      return Constant;
602
34.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
369k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
369k
      return Constant;
602
369k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
352k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
352k
      return Constant;
602
352k
    }
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
589k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
589k
      return Constant;
602
589k
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
3.99M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
3.99M
      return Constant;
602
3.99M
    }
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.39k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
6.39k
      return Constant;
602
6.39k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
600
869
    const SCEV *visitConstant(const SCEVConstant *Constant) {
601
869
      return Constant;
602
869
    }
603
604
50.3k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
50.3k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
50.3k
      return Operand == Expr->getOperand()
607
50.3k
                 ? 
Expr48.6k
608
50.3k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())1.72k
;
609
50.3k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
764
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
764
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
764
      return Operand == Expr->getOperand()
607
764
                 ? Expr
608
764
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
609
764
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
1.17k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
1.17k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
1.17k
      return Operand == Expr->getOperand()
607
1.17k
                 ? Expr
608
1.17k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
609
1.17k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
6.50k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
6.50k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
6.50k
      return Operand == Expr->getOperand()
607
6.50k
                 ? 
Expr6.13k
608
6.50k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())370
;
609
6.50k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
604
5.01k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
5.01k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
5.01k
      return Operand == Expr->getOperand()
607
5.01k
                 ? 
Expr4.64k
608
5.01k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())364
;
609
5.01k
    }
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
5.27k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
5.27k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
5.27k
      return Operand == Expr->getOperand()
607
5.27k
                 ? 
Expr5.21k
608
5.27k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())53
;
609
5.27k
    }
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.5k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
605
31.5k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
606
31.5k
      return Operand == Expr->getOperand()
607
31.5k
                 ? 
Expr30.6k
608
31.5k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())932
;
609
31.5k
    }
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
224k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
224k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
224k
      return Operand == Expr->getOperand()
614
224k
                 ? 
Expr220k
615
224k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())4.63k
;
616
224k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
4.34k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
4.34k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
4.34k
      return Operand == Expr->getOperand()
614
4.34k
                 ? 
Expr4.33k
615
4.34k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())10
;
616
4.34k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
6.38k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
6.38k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
6.38k
      return Operand == Expr->getOperand()
614
6.38k
                 ? 
Expr5.46k
615
6.38k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())917
;
616
6.38k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
57.6k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
57.6k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
57.6k
      return Operand == Expr->getOperand()
614
57.6k
                 ? 
Expr56.0k
615
57.6k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.60k
;
616
57.6k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
611
46.5k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
46.5k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
46.5k
      return Operand == Expr->getOperand()
614
46.5k
                 ? 
Expr45.8k
615
46.5k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())671
;
616
46.5k
    }
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
109k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
109k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
109k
      return Operand == Expr->getOperand()
614
109k
                 ? 
Expr108k
615
109k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.43k
;
616
109k
    }
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
151
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
612
151
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
613
151
      return Operand == Expr->getOperand()
614
151
                 ? 
Expr150
615
151
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
616
151
    }
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
527k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
527k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
527k
      return Operand == Expr->getOperand()
621
527k
                 ? 
Expr525k
622
527k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2.66k
;
623
527k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
23.9k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
23.9k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
23.9k
      return Operand == Expr->getOperand()
621
23.9k
                 ? 
Expr23.9k
622
23.9k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())5
;
623
23.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
1.13k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
1.13k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
1.13k
      return Operand == Expr->getOperand()
621
1.13k
                 ? 
Expr1.09k
622
1.13k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())43
;
623
1.13k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
55.0k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
55.0k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
55.0k
      return Operand == Expr->getOperand()
621
55.0k
                 ? 
Expr53.9k
622
55.0k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())1.18k
;
623
55.0k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
618
37.2k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
37.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
37.2k
      return Operand == Expr->getOperand()
621
37.2k
                 ? 
Expr36.2k
622
37.2k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())963
;
623
37.2k
    }
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
409k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
619
409k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
620
409k
      return Operand == Expr->getOperand()
621
409k
                 ? 
Expr409k
622
409k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())469
;
623
409k
    }
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.75M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
1.75M
      SmallVector<const SCEV *, 2> Operands;
627
1.75M
      bool Changed = false;
628
3.84M
      for (auto *Op : Expr->operands()) {
629
3.84M
        Operands.push_back(((SC*)this)->visit(Op));
630
3.84M
        Changed |= Op != Operands.back();
631
3.84M
      }
632
1.75M
      return !Changed ? 
Expr1.74M
:
SE.getAddExpr(Operands)19.3k
;
633
1.75M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
7.40k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
7.40k
      SmallVector<const SCEV *, 2> Operands;
627
7.40k
      bool Changed = false;
628
36.5k
      for (auto *Op : Expr->operands()) {
629
36.5k
        Operands.push_back(((SC*)this)->visit(Op));
630
36.5k
        Changed |= Op != Operands.back();
631
36.5k
      }
632
7.40k
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
633
7.40k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
2.00k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
2.00k
      SmallVector<const SCEV *, 2> Operands;
627
2.00k
      bool Changed = false;
628
4.38k
      for (auto *Op : Expr->operands()) {
629
4.38k
        Operands.push_back(((SC*)this)->visit(Op));
630
4.38k
        Changed |= Op != Operands.back();
631
4.38k
      }
632
2.00k
      return !Changed ? 
Expr1.95k
:
SE.getAddExpr(Operands)49
;
633
2.00k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
70.6k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
70.6k
      SmallVector<const SCEV *, 2> Operands;
627
70.6k
      bool Changed = false;
628
148k
      for (auto *Op : Expr->operands()) {
629
148k
        Operands.push_back(((SC*)this)->visit(Op));
630
148k
        Changed |= Op != Operands.back();
631
148k
      }
632
70.6k
      return !Changed ? 
Expr66.8k
:
SE.getAddExpr(Operands)3.78k
;
633
70.6k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
625
55.6k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
55.6k
      SmallVector<const SCEV *, 2> Operands;
627
55.6k
      bool Changed = false;
628
118k
      for (auto *Op : Expr->operands()) {
629
118k
        Operands.push_back(((SC*)this)->visit(Op));
630
118k
        Changed |= Op != Operands.back();
631
118k
      }
632
55.6k
      return !Changed ? 
Expr52.8k
:
SE.getAddExpr(Operands)2.83k
;
633
55.6k
    }
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
224k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
224k
      SmallVector<const SCEV *, 2> Operands;
627
224k
      bool Changed = false;
628
513k
      for (auto *Op : Expr->operands()) {
629
513k
        Operands.push_back(((SC*)this)->visit(Op));
630
513k
        Changed |= Op != Operands.back();
631
513k
      }
632
224k
      return !Changed ? 
Expr222k
:
SE.getAddExpr(Operands)2.14k
;
633
224k
    }
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.39M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
626
1.39M
      SmallVector<const SCEV *, 2> Operands;
627
1.39M
      bool Changed = false;
628
3.02M
      for (auto *Op : Expr->operands()) {
629
3.02M
        Operands.push_back(((SC*)this)->visit(Op));
630
3.02M
        Changed |= Op != Operands.back();
631
3.02M
      }
632
1.39M
      return !Changed ? 
Expr1.38M
:
SE.getAddExpr(Operands)10.4k
;
633
1.39M
    }
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
853k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
853k
      SmallVector<const SCEV *, 2> Operands;
637
853k
      bool Changed = false;
638
1.71M
      for (auto *Op : Expr->operands()) {
639
1.71M
        Operands.push_back(((SC*)this)->visit(Op));
640
1.71M
        Changed |= Op != Operands.back();
641
1.71M
      }
642
853k
      return !Changed ? 
Expr840k
:
SE.getMulExpr(Operands)12.6k
;
643
853k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
33.9k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
33.9k
      SmallVector<const SCEV *, 2> Operands;
637
33.9k
      bool Changed = false;
638
68.5k
      for (auto *Op : Expr->operands()) {
639
68.5k
        Operands.push_back(((SC*)this)->visit(Op));
640
68.5k
        Changed |= Op != Operands.back();
641
68.5k
      }
642
33.9k
      return !Changed ? 
Expr33.9k
:
SE.getMulExpr(Operands)4
;
643
33.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
16.5k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
16.5k
      SmallVector<const SCEV *, 2> Operands;
637
16.5k
      bool Changed = false;
638
37.4k
      for (auto *Op : Expr->operands()) {
639
37.4k
        Operands.push_back(((SC*)this)->visit(Op));
640
37.4k
        Changed |= Op != Operands.back();
641
37.4k
      }
642
16.5k
      return !Changed ? 
Expr16.5k
:
SE.getMulExpr(Operands)19
;
643
16.5k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
42.5k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
42.5k
      SmallVector<const SCEV *, 2> Operands;
637
42.5k
      bool Changed = false;
638
85.3k
      for (auto *Op : Expr->operands()) {
639
85.3k
        Operands.push_back(((SC*)this)->visit(Op));
640
85.3k
        Changed |= Op != Operands.back();
641
85.3k
      }
642
42.5k
      return !Changed ? 
Expr39.3k
:
SE.getMulExpr(Operands)3.19k
;
643
42.5k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
635
40.0k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
40.0k
      SmallVector<const SCEV *, 2> Operands;
637
40.0k
      bool Changed = false;
638
80.4k
      for (auto *Op : Expr->operands()) {
639
80.4k
        Operands.push_back(((SC*)this)->visit(Op));
640
80.4k
        Changed |= Op != Operands.back();
641
80.4k
      }
642
40.0k
      return !Changed ? 
Expr37.1k
:
SE.getMulExpr(Operands)2.98k
;
643
40.0k
    }
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
162k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
162k
      SmallVector<const SCEV *, 2> Operands;
637
162k
      bool Changed = false;
638
326k
      for (auto *Op : Expr->operands()) {
639
326k
        Operands.push_back(((SC*)this)->visit(Op));
640
326k
        Changed |= Op != Operands.back();
641
326k
      }
642
162k
      return !Changed ? 
Expr159k
:
SE.getMulExpr(Operands)3.25k
;
643
162k
    }
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
554k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
636
554k
      SmallVector<const SCEV *, 2> Operands;
637
554k
      bool Changed = false;
638
1.11M
      for (auto *Op : Expr->operands()) {
639
1.11M
        Operands.push_back(((SC*)this)->visit(Op));
640
1.11M
        Changed |= Op != Operands.back();
641
1.11M
      }
642
554k
      return !Changed ? 
Expr551k
:
SE.getMulExpr(Operands)3.02k
;
643
554k
    }
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
84.3k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
84.3k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
84.3k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
84.3k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()81.3k
;
649
84.3k
      return !Changed ? 
Expr81.3k
:
SE.getUDivExpr(LHS, RHS)2.94k
;
650
84.3k
    }
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.3k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
16.3k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
16.3k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
16.3k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()16.3k
;
649
16.3k
      return !Changed ? 
Expr16.3k
:
SE.getUDivExpr(LHS, RHS)3
;
650
16.3k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
8.81k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
8.81k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
8.81k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
8.81k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.61k
;
649
8.81k
      return !Changed ? 
Expr8.61k
:
SE.getUDivExpr(LHS, RHS)199
;
650
8.81k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
645
8.35k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
8.35k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
8.35k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
8.35k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.19k
;
649
8.35k
      return !Changed ? 
Expr8.19k
:
SE.getUDivExpr(LHS, RHS)161
;
650
8.35k
    }
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
4.43k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
4.43k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
4.43k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
4.43k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4.42k
;
649
4.43k
      return !Changed ? 
Expr4.42k
:
SE.getUDivExpr(LHS, RHS)13
;
650
4.43k
    }
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
45.0k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
646
45.0k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
647
45.0k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
648
45.0k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()42.5k
;
649
45.0k
      return !Changed ? 
Expr42.5k
:
SE.getUDivExpr(LHS, RHS)2.55k
;
650
45.0k
    }
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
303k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
303k
      SmallVector<const SCEV *, 2> Operands;
654
303k
      bool Changed = false;
655
607k
      for (auto *Op : Expr->operands()) {
656
607k
        Operands.push_back(((SC*)this)->visit(Op));
657
607k
        Changed |= Op != Operands.back();
658
607k
      }
659
303k
      return !Changed ? 
Expr302k
660
303k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
1.54k
                                         Expr->getNoWrapFlags());
662
303k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
652
469
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
469
      SmallVector<const SCEV *, 2> Operands;
654
469
      bool Changed = false;
655
1.04k
      for (auto *Op : Expr->operands()) {
656
1.04k
        Operands.push_back(((SC*)this)->visit(Op));
657
1.04k
        Changed |= Op != Operands.back();
658
1.04k
      }
659
469
      return !Changed ? Expr
660
469
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
0
                                         Expr->getNoWrapFlags());
662
469
    }
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
300k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
653
300k
      SmallVector<const SCEV *, 2> Operands;
654
300k
      bool Changed = false;
655
600k
      for (auto *Op : Expr->operands()) {
656
600k
        Operands.push_back(((SC*)this)->visit(Op));
657
600k
        Changed |= Op != Operands.back();
658
600k
      }
659
300k
      return !Changed ? 
Expr298k
660
300k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
661
1.45k
                                         Expr->getNoWrapFlags());
662
300k
    }
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
55.5k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
55.5k
      SmallVector<const SCEV *, 2> Operands;
666
55.5k
      bool Changed = false;
667
112k
      for (auto *Op : Expr->operands()) {
668
112k
        Operands.push_back(((SC *)this)->visit(Op));
669
112k
        Changed |= Op != Operands.back();
670
112k
      }
671
55.5k
      return !Changed ? 
Expr50.4k
:
SE.getSMaxExpr(Operands)5.10k
;
672
55.5k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
780
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
780
      SmallVector<const SCEV *, 2> Operands;
666
780
      bool Changed = false;
667
1.57k
      for (auto *Op : Expr->operands()) {
668
1.57k
        Operands.push_back(((SC *)this)->visit(Op));
669
1.57k
        Changed |= Op != Operands.back();
670
1.57k
      }
671
780
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
672
780
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
775
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
775
      SmallVector<const SCEV *, 2> Operands;
666
775
      bool Changed = false;
667
1.68k
      for (auto *Op : Expr->operands()) {
668
1.68k
        Operands.push_back(((SC *)this)->visit(Op));
669
1.68k
        Changed |= Op != Operands.back();
670
1.68k
      }
671
775
      return !Changed ? 
Expr722
:
SE.getSMaxExpr(Operands)53
;
672
775
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
20.8k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
20.8k
      SmallVector<const SCEV *, 2> Operands;
666
20.8k
      bool Changed = false;
667
42.1k
      for (auto *Op : Expr->operands()) {
668
42.1k
        Operands.push_back(((SC *)this)->visit(Op));
669
42.1k
        Changed |= Op != Operands.back();
670
42.1k
      }
671
20.8k
      return !Changed ? 
Expr18.4k
:
SE.getSMaxExpr(Operands)2.40k
;
672
20.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
664
20.6k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
20.6k
      SmallVector<const SCEV *, 2> Operands;
666
20.6k
      bool Changed = false;
667
41.7k
      for (auto *Op : Expr->operands()) {
668
41.7k
        Operands.push_back(((SC *)this)->visit(Op));
669
41.7k
        Changed |= Op != Operands.back();
670
41.7k
      }
671
20.6k
      return !Changed ? 
Expr18.3k
:
SE.getSMaxExpr(Operands)2.31k
;
672
20.6k
    }
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
4.56k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
4.56k
      SmallVector<const SCEV *, 2> Operands;
666
4.56k
      bool Changed = false;
667
9.14k
      for (auto *Op : Expr->operands()) {
668
9.14k
        Operands.push_back(((SC *)this)->visit(Op));
669
9.14k
        Changed |= Op != Operands.back();
670
9.14k
      }
671
4.56k
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
672
4.56k
    }
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
7.84k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
665
7.84k
      SmallVector<const SCEV *, 2> Operands;
666
7.84k
      bool Changed = false;
667
15.9k
      for (auto *Op : Expr->operands()) {
668
15.9k
        Operands.push_back(((SC *)this)->visit(Op));
669
15.9k
        Changed |= Op != Operands.back();
670
15.9k
      }
671
7.84k
      return !Changed ? 
Expr7.51k
:
SE.getSMaxExpr(Operands)335
;
672
7.84k
    }
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.0k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
25.0k
      SmallVector<const SCEV *, 2> Operands;
676
25.0k
      bool Changed = false;
677
50.4k
      for (auto *Op : Expr->operands()) {
678
50.4k
        Operands.push_back(((SC*)this)->visit(Op));
679
50.4k
        Changed |= Op != Operands.back();
680
50.4k
      }
681
25.0k
      return !Changed ? 
Expr24.6k
:
SE.getUMaxExpr(Operands)432
;
682
25.0k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
608
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
608
      SmallVector<const SCEV *, 2> Operands;
676
608
      bool Changed = false;
677
1.23k
      for (auto *Op : Expr->operands()) {
678
1.23k
        Operands.push_back(((SC*)this)->visit(Op));
679
1.23k
        Changed |= Op != Operands.back();
680
1.23k
      }
681
608
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
608
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
392
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
392
      SmallVector<const SCEV *, 2> Operands;
676
392
      bool Changed = false;
677
884
      for (auto *Op : Expr->operands()) {
678
884
        Operands.push_back(((SC*)this)->visit(Op));
679
884
        Changed |= Op != Operands.back();
680
884
      }
681
392
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
392
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
3.86k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
3.86k
      SmallVector<const SCEV *, 2> Operands;
676
3.86k
      bool Changed = false;
677
7.80k
      for (auto *Op : Expr->operands()) {
678
7.80k
        Operands.push_back(((SC*)this)->visit(Op));
679
7.80k
        Changed |= Op != Operands.back();
680
7.80k
      }
681
3.86k
      return !Changed ? 
Expr3.86k
:
SE.getUMaxExpr(Operands)6
;
682
3.86k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
674
3.83k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
3.83k
      SmallVector<const SCEV *, 2> Operands;
676
3.83k
      bool Changed = false;
677
7.74k
      for (auto *Op : Expr->operands()) {
678
7.74k
        Operands.push_back(((SC*)this)->visit(Op));
679
7.74k
        Changed |= Op != Operands.back();
680
7.74k
      }
681
3.83k
      return !Changed ? 
Expr3.83k
:
SE.getUMaxExpr(Operands)4
;
682
3.83k
    }
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.02k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
675
4.02k
      SmallVector<const SCEV *, 2> Operands;
676
4.02k
      bool Changed = false;
677
8.04k
      for (auto *Op : Expr->operands()) {
678
8.04k
        Operands.push_back(((SC*)this)->visit(Op));
679
8.04k
        Changed |= Op != Operands.back();
680
8.04k
      }
681
4.02k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
682
4.02k
    }
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.6k
      for (auto *Op : Expr->operands()) {
678
24.6k
        Operands.push_back(((SC*)this)->visit(Op));
679
24.6k
        Changed |= Op != Operands.back();
680
24.6k
      }
681
12.3k
      return !Changed ? 
Expr11.8k
:
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.32M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
2.32M
      return Expr;
686
2.32M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
684
2.32M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
2.32M
      return Expr;
686
2.32M
    }
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
605
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
685
605
      return Expr;
686
605
    }
687
688
302k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
689
302k
      return Expr;
690
302k
    }
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
302k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
689
302k
      return Expr;
690
302k
    }
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
688
        : SCEVRewriteVisitor(SE), Map(M) {}
734
735
    static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
736
688
                               ScalarEvolution &SE) {
737
688
      SCEVLoopAddRecRewriter Rewriter(SE, Map);
738
688
      return Rewriter.visit(Scev);
739
688
    }
740
741
664
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
742
664
      SmallVector<const SCEV *, 2> Operands;
743
664
      for (const SCEV *Op : Expr->operands())
744
1.33k
        Operands.push_back(visit(Op));
745
664
746
664
      const Loop *L = Expr->getLoop();
747
664
      const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags());
748
664
749
664
      if (0 == Map.count(L))
750
1
        return Res;
751
663
752
663
      const SCEVAddRecExpr *Rec = cast<SCEVAddRecExpr>(Res);
753
663
      return Rec->evaluateAtIteration(Map[L], SE);
754
663
    }
755
756
  private:
757
    LoopToScevMapT &Map;
758
  };
759
760
} // end namespace llvm
761
762
#endif // LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H