Coverage Report

Created: 2019-01-21 03:01

/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
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file defines the classes used to represent and build scalar expressions.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H
14
#define LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H
15
16
#include "llvm/ADT/DenseMap.h"
17
#include "llvm/ADT/FoldingSet.h"
18
#include "llvm/ADT/SmallPtrSet.h"
19
#include "llvm/ADT/SmallVector.h"
20
#include "llvm/ADT/iterator_range.h"
21
#include "llvm/Analysis/ScalarEvolution.h"
22
#include "llvm/IR/Constants.h"
23
#include "llvm/IR/Value.h"
24
#include "llvm/IR/ValueHandle.h"
25
#include "llvm/Support/Casting.h"
26
#include "llvm/Support/ErrorHandling.h"
27
#include <cassert>
28
#include <cstddef>
29
30
namespace llvm {
31
32
class APInt;
33
class Constant;
34
class ConstantRange;
35
class Loop;
36
class Type;
37
38
  enum SCEVTypes {
39
    // These should be ordered in terms of increasing complexity to make the
40
    // folders simpler.
41
    scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr,
42
    scUDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr,
43
    scUnknown, scCouldNotCompute
44
  };
45
46
  /// This class represents a constant integer value.
47
  class SCEVConstant : public SCEV {
48
    friend class ScalarEvolution;
49
50
    ConstantInt *V;
51
52
    SCEVConstant(const FoldingSetNodeIDRef ID, ConstantInt *v) :
53
5.42M
      SCEV(ID, scConstant), V(v) {}
54
55
  public:
56
347M
    ConstantInt *getValue() const { return V; }
57
209M
    const APInt &getAPInt() const { return getValue()->getValue(); }
58
59
97.0M
    Type *getType() const { return V->getType(); }
60
61
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
62
522M
    static bool classof(const SCEV *S) {
63
522M
      return S->getSCEVType() == scConstant;
64
522M
    }
65
  };
66
67
  /// This is the base class for unary cast operator classes.
68
  class SCEVCastExpr : public SCEV {
69
  protected:
70
    const SCEV *Op;
71
    Type *Ty;
72
73
    SCEVCastExpr(const FoldingSetNodeIDRef ID,
74
                 unsigned SCEVTy, const SCEV *op, Type *ty);
75
76
  public:
77
31.2M
    const SCEV *getOperand() const { return Op; }
78
10.5M
    Type *getType() const { return Ty; }
79
80
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
81
6.79M
    static bool classof(const SCEV *S) {
82
6.79M
      return S->getSCEVType() == scTruncate ||
83
6.79M
             
S->getSCEVType() == scZeroExtend6.77M
||
84
6.79M
             
S->getSCEVType() == scSignExtend6.61M
;
85
6.79M
    }
86
  };
87
88
  /// This class represents a truncation of an integer value to a
89
  /// smaller integer value.
90
  class SCEVTruncateExpr : public SCEVCastExpr {
91
    friend class ScalarEvolution;
92
93
    SCEVTruncateExpr(const FoldingSetNodeIDRef ID,
94
                     const SCEV *op, Type *ty);
95
96
  public:
97
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
98
60.9M
    static bool classof(const SCEV *S) {
99
60.9M
      return S->getSCEVType() == scTruncate;
100
60.9M
    }
101
  };
102
103
  /// This class represents a zero extension of a small integer value
104
  /// to a larger integer value.
105
  class SCEVZeroExtendExpr : public SCEVCastExpr {
106
    friend class ScalarEvolution;
107
108
    SCEVZeroExtendExpr(const FoldingSetNodeIDRef ID,
109
                       const SCEV *op, Type *ty);
110
111
  public:
112
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
113
31.2M
    static bool classof(const SCEV *S) {
114
31.2M
      return S->getSCEVType() == scZeroExtend;
115
31.2M
    }
116
  };
117
118
  /// This class represents a sign extension of a small integer value
119
  /// to a larger integer value.
120
  class SCEVSignExtendExpr : public SCEVCastExpr {
121
    friend class ScalarEvolution;
122
123
    SCEVSignExtendExpr(const FoldingSetNodeIDRef ID,
124
                       const SCEV *op, Type *ty);
125
126
  public:
127
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
128
31.2M
    static bool classof(const SCEV *S) {
129
31.2M
      return S->getSCEVType() == scSignExtend;
130
31.2M
    }
131
  };
132
133
  /// This node is a base class providing common functionality for
134
  /// n'ary operators.
135
  class SCEVNAryExpr : public SCEV {
136
  protected:
137
    // Since SCEVs are immutable, ScalarEvolution allocates operand
138
    // arrays with its SCEVAllocator, so this class just needs a simple
139
    // pointer rather than a more elaborate vector-like data structure.
140
    // This also avoids the need for a non-trivial destructor.
141
    const SCEV *const *Operands;
142
    size_t NumOperands;
143
144
    SCEVNAryExpr(const FoldingSetNodeIDRef ID,
145
                 enum SCEVTypes T, const SCEV *const *O, size_t N)
146
11.8M
      : SCEV(ID, T), Operands(O), NumOperands(N) {}
147
148
  public:
149
160M
    size_t getNumOperands() const { return NumOperands; }
150
151
278M
    const SCEV *getOperand(unsigned i) const {
152
278M
      assert(i < NumOperands && "Operand index out of range!");
153
278M
      return Operands[i];
154
278M
    }
155
156
    using op_iterator = const SCEV *const *;
157
    using op_range = iterator_range<op_iterator>;
158
159
141M
    op_iterator op_begin() const { return Operands; }
160
141M
    op_iterator op_end() const { return Operands + NumOperands; }
161
100M
    op_range operands() const {
162
100M
      return make_range(op_begin(), op_end());
163
100M
    }
164
165
53.0M
    Type *getType() const { return getOperand(0)->getType(); }
166
167
35.4M
    NoWrapFlags getNoWrapFlags(NoWrapFlags Mask = NoWrapMask) const {
168
35.4M
      return (NoWrapFlags)(SubclassData & Mask);
169
35.4M
    }
170
171
10.1M
    bool hasNoUnsignedWrap() const {
172
10.1M
      return getNoWrapFlags(FlagNUW) != FlagAnyWrap;
173
10.1M
    }
174
175
10.9M
    bool hasNoSignedWrap() const {
176
10.9M
      return getNoWrapFlags(FlagNSW) != FlagAnyWrap;
177
10.9M
    }
178
179
64.2k
    bool hasNoSelfWrap() const {
180
64.2k
      return getNoWrapFlags(FlagNW) != FlagAnyWrap;
181
64.2k
    }
182
183
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
184
3.56M
    static bool classof(const SCEV *S) {
185
3.56M
      return S->getSCEVType() == scAddExpr ||
186
3.56M
             
S->getSCEVType() == scMulExpr2.81M
||
187
3.56M
             
S->getSCEVType() == scSMaxExpr2.56M
||
188
3.56M
             
S->getSCEVType() == scUMaxExpr2.56M
||
189
3.56M
             
S->getSCEVType() == scAddRecExpr2.56M
;
190
3.56M
    }
191
  };
192
193
  /// This node is the base class for n'ary commutative operators.
194
  class SCEVCommutativeExpr : public SCEVNAryExpr {
195
  protected:
196
    SCEVCommutativeExpr(const FoldingSetNodeIDRef ID,
197
                        enum SCEVTypes T, const SCEV *const *O, size_t N)
198
6.50M
      : SCEVNAryExpr(ID, T, O, N) {}
199
200
  public:
201
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
202
2.54M
    static bool classof(const SCEV *S) {
203
2.54M
      return S->getSCEVType() == scAddExpr ||
204
2.54M
             
S->getSCEVType() == scMulExpr1.69M
||
205
2.54M
             
S->getSCEVType() == scSMaxExpr1.35M
||
206
2.54M
             
S->getSCEVType() == scUMaxExpr1.31M
;
207
2.54M
    }
208
209
    /// Set flags for a non-recurrence without clearing previously set flags.
210
21.2M
    void setNoWrapFlags(NoWrapFlags Flags) {
211
21.2M
      SubclassData |= Flags;
212
21.2M
    }
213
  };
214
215
  /// This node represents an addition of some number of SCEVs.
216
  class SCEVAddExpr : public SCEVCommutativeExpr {
217
    friend class ScalarEvolution;
218
219
    SCEVAddExpr(const FoldingSetNodeIDRef ID,
220
                const SCEV *const *O, size_t N)
221
4.98M
      : SCEVCommutativeExpr(ID, scAddExpr, O, N) {}
222
223
  public:
224
27.3M
    Type *getType() const {
225
27.3M
      // Use the type of the last operand, which is likely to be a pointer
226
27.3M
      // type, if there is one. This doesn't usually matter, but it can help
227
27.3M
      // reduce casts when the expressions are expanded.
228
27.3M
      return getOperand(getNumOperands() - 1)->getType();
229
27.3M
    }
230
231
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
232
186M
    static bool classof(const SCEV *S) {
233
186M
      return S->getSCEVType() == scAddExpr;
234
186M
    }
235
  };
236
237
  /// This node represents multiplication of some number of SCEVs.
238
  class SCEVMulExpr : public SCEVCommutativeExpr {
239
    friend class ScalarEvolution;
240
241
    SCEVMulExpr(const FoldingSetNodeIDRef ID,
242
                const SCEV *const *O, size_t N)
243
1.41M
      : SCEVCommutativeExpr(ID, scMulExpr, O, N) {}
244
245
  public:
246
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
247
161M
    static bool classof(const SCEV *S) {
248
161M
      return S->getSCEVType() == scMulExpr;
249
161M
    }
250
  };
251
252
  /// This class represents a binary unsigned division operation.
253
  class SCEVUDivExpr : public SCEV {
254
    friend class ScalarEvolution;
255
256
    const SCEV *LHS;
257
    const SCEV *RHS;
258
259
    SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs)
260
179k
      : SCEV(ID, scUDivExpr), LHS(lhs), RHS(rhs) {}
261
262
  public:
263
6.34M
    const SCEV *getLHS() const { return LHS; }
264
7.34M
    const SCEV *getRHS() const { return RHS; }
265
266
1.02M
    Type *getType() const {
267
1.02M
      // In most cases the types of LHS and RHS will be the same, but in some
268
1.02M
      // crazy cases one or the other may be a pointer. ScalarEvolution doesn't
269
1.02M
      // depend on the type for correctness, but handling types carefully can
270
1.02M
      // avoid extra casts in the SCEVExpander. The LHS is more likely to be
271
1.02M
      // a pointer type than the RHS, so use the RHS' type here.
272
1.02M
      return getRHS()->getType();
273
1.02M
    }
274
275
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
276
20.9M
    static bool classof(const SCEV *S) {
277
20.9M
      return S->getSCEVType() == scUDivExpr;
278
20.9M
    }
279
  };
280
281
  /// This node represents a polynomial recurrence on the trip count
282
  /// of the specified loop.  This is the primary focus of the
283
  /// ScalarEvolution framework; all the other SCEV subclasses are
284
  /// mostly just supporting infrastructure to allow SCEVAddRecExpr
285
  /// expressions to be created and analyzed.
286
  ///
287
  /// All operands of an AddRec are required to be loop invariant.
288
  ///
289
  class SCEVAddRecExpr : public SCEVNAryExpr {
290
    friend class ScalarEvolution;
291
292
    const Loop *L;
293
294
    SCEVAddRecExpr(const FoldingSetNodeIDRef ID,
295
                   const SCEV *const *O, size_t N, const Loop *l)
296
5.36M
      : SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {}
297
298
  public:
299
46.9M
    const SCEV *getStart() const { return Operands[0]; }
300
74.9M
    const Loop *getLoop() const { return L; }
301
302
    /// Constructs and returns the recurrence indicating how much this
303
    /// expression steps by.  If this is a polynomial of degree N, it
304
    /// returns a chrec of degree N-1.  We cannot determine whether
305
    /// the step recurrence has self-wraparound.
306
21.1M
    const SCEV *getStepRecurrence(ScalarEvolution &SE) const {
307
21.1M
      if (isAffine()) 
return getOperand(1)21.1M
;
308
134
      return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1,
309
134
                                                           op_end()),
310
134
                              getLoop(), FlagAnyWrap);
311
134
    }
312
313
    /// Return true if this represents an expression A + B*x where A
314
    /// and B are loop invariant values.
315
43.9M
    bool isAffine() const {
316
43.9M
      // We know that the start value is invariant.  This expression is thus
317
43.9M
      // affine iff the step is also invariant.
318
43.9M
      return getNumOperands() == 2;
319
43.9M
    }
320
321
    /// Return true if this represents an expression A + B*x + C*x^2
322
    /// where A, B and C are loop invariant values.  This corresponds
323
    /// to an addrec of the form {L,+,M,+,N}
324
202k
    bool isQuadratic() const {
325
202k
      return getNumOperands() == 3;
326
202k
    }
327
328
    /// Set flags for a recurrence without clearing any previously set flags.
329
    /// For AddRec, either NUW or NSW implies NW. Keep track of this fact here
330
    /// to make it easier to propagate flags.
331
20.4M
    void setNoWrapFlags(NoWrapFlags Flags) {
332
20.4M
      if (Flags & (FlagNUW | FlagNSW))
333
5.17M
        Flags = ScalarEvolution::setFlags(Flags, FlagNW);
334
20.4M
      SubclassData |= Flags;
335
20.4M
    }
336
337
    /// Return the value of this chain of recurrences at the specified
338
    /// iteration number.
339
    const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const;
340
341
    /// Return the number of iterations of this loop that produce
342
    /// values in the specified constant range.  Another way of
343
    /// looking at this is that it returns the first iteration number
344
    /// where the value is not in the condition, thus computing the
345
    /// exit count.  If the iteration count can't be computed, an
346
    /// instance of SCEVCouldNotCompute is returned.
347
    const SCEV *getNumIterationsInRange(const ConstantRange &Range,
348
                                        ScalarEvolution &SE) const;
349
350
    /// Return an expression representing the value of this expression
351
    /// one iteration of the loop ahead.
352
    const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const;
353
354
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
355
269M
    static bool classof(const SCEV *S) {
356
269M
      return S->getSCEVType() == scAddRecExpr;
357
269M
    }
358
  };
359
360
  /// This class represents a signed maximum selection.
361
  class SCEVSMaxExpr : public SCEVCommutativeExpr {
362
    friend class ScalarEvolution;
363
364
    SCEVSMaxExpr(const FoldingSetNodeIDRef ID,
365
                 const SCEV *const *O, size_t N)
366
51.0k
      : SCEVCommutativeExpr(ID, scSMaxExpr, O, N) {
367
51.0k
      // Max never overflows.
368
51.0k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
369
51.0k
    }
370
371
  public:
372
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
373
18.1M
    static bool classof(const SCEV *S) {
374
18.1M
      return S->getSCEVType() == scSMaxExpr;
375
18.1M
    }
376
  };
377
378
  /// This class represents an unsigned maximum selection.
379
  class SCEVUMaxExpr : public SCEVCommutativeExpr {
380
    friend class ScalarEvolution;
381
382
    SCEVUMaxExpr(const FoldingSetNodeIDRef ID,
383
                 const SCEV *const *O, size_t N)
384
52.2k
      : SCEVCommutativeExpr(ID, scUMaxExpr, O, N) {
385
52.2k
      // Max never overflows.
386
52.2k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
387
52.2k
    }
388
389
  public:
390
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
391
16.8M
    static bool classof(const SCEV *S) {
392
16.8M
      return S->getSCEVType() == scUMaxExpr;
393
16.8M
    }
394
  };
395
396
  /// This means that we are dealing with an entirely unknown SCEV
397
  /// value, and only represent it as its LLVM Value.  This is the
398
  /// "bottom" value for the analysis.
399
  class SCEVUnknown final : public SCEV, private CallbackVH {
400
    friend class ScalarEvolution;
401
402
    /// The parent ScalarEvolution value. This is used to update the
403
    /// parent's maps when the value associated with a SCEVUnknown is
404
    /// deleted or RAUW'd.
405
    ScalarEvolution *SE;
406
407
    /// The next pointer in the linked list of all SCEVUnknown
408
    /// instances owned by a ScalarEvolution.
409
    SCEVUnknown *Next;
410
411
    SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V,
412
                ScalarEvolution *se, SCEVUnknown *next) :
413
3.61M
      SCEV(ID, scUnknown), CallbackVH(V), SE(se), Next(next) {}
414
415
    // Implement CallbackVH.
416
    void deleted() override;
417
    void allUsesReplacedWith(Value *New) override;
418
419
  public:
420
62.5M
    Value *getValue() const { return getValPtr(); }
421
422
    /// @{
423
    /// Test whether this is a special constant representing a type
424
    /// size, alignment, or field offset in a target-independent
425
    /// manner, and hasn't happened to have been folded with other
426
    /// operations into something unrecognizable. This is mainly only
427
    /// useful for pretty-printing and other situations where it isn't
428
    /// absolutely required for these to succeed.
429
    bool isSizeOf(Type *&AllocTy) const;
430
    bool isAlignOf(Type *&AllocTy) const;
431
    bool isOffsetOf(Type *&STy, Constant *&FieldNo) const;
432
    /// @}
433
434
43.8M
    Type *getType() const { return getValPtr()->getType(); }
435
436
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
437
208M
    static bool classof(const SCEV *S) {
438
208M
      return S->getSCEVType() == scUnknown;
439
208M
    }
440
  };
441
442
  /// This class defines a simple visitor class that may be used for
443
  /// various SCEV analysis purposes.
444
  template<typename SC, typename RetVal=void>
445
  struct SCEVVisitor {
446
19.4M
    RetVal visit(const SCEV *S) {
447
19.4M
      switch (S->getSCEVType()) {
448
19.4M
      case scConstant:
449
6.11M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
19.4M
      case scTruncate:
451
50.3k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
19.4M
      case scZeroExtend:
453
244k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
19.4M
      case scSignExtend:
455
655k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
19.4M
      case scAddExpr:
457
2.16M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
19.4M
      case scMulExpr:
459
883k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
19.4M
      case scUDivExpr:
461
87.8k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
19.4M
      case scAddRecExpr:
463
4.00M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
19.4M
      case scSMaxExpr:
465
58.6k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
19.4M
      case scUMaxExpr:
467
25.2k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
19.4M
      case scUnknown:
469
4.87M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
19.4M
      case scCouldNotCompute:
471
301k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
19.4M
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
19.4M
      }
475
19.4M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
340k
    RetVal visit(const SCEV *S) {
447
340k
      switch (S->getSCEVType()) {
448
340k
      case scConstant:
449
210k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
340k
      case scTruncate:
451
765
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
340k
      case scZeroExtend:
453
4.28k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
340k
      case scSignExtend:
455
23.9k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
340k
      case scAddExpr:
457
7.40k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
340k
      case scMulExpr:
459
33.9k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
340k
      case scUDivExpr:
461
1.12k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
340k
      case scAddRecExpr:
463
471
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
340k
      case scSMaxExpr:
465
785
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
340k
      case scUMaxExpr:
467
602
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
340k
      case scUnknown:
469
56.5k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
340k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
340k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
340k
      }
475
340k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVShiftRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
393k
    RetVal visit(const SCEV *S) {
447
393k
      switch (S->getSCEVType()) {
448
393k
      case scConstant:
449
33.8k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
393k
      case scTruncate:
451
1.24k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
393k
      case scZeroExtend:
453
6.36k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
393k
      case scSignExtend:
455
974
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
393k
      case scAddExpr:
457
1.89k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
393k
      case scMulExpr:
459
16.4k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
393k
      case scUDivExpr:
461
16.2k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
393k
      case scAddRecExpr:
463
10.8k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
393k
      case scSMaxExpr:
465
775
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
393k
      case scUMaxExpr:
467
389
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
393k
      case scUnknown:
469
304k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
393k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
393k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
393k
      }
475
393k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVInitRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
1.73M
    RetVal visit(const SCEV *S) {
447
1.73M
      switch (S->getSCEVType()) {
448
1.73M
      case scConstant:
449
369k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
1.73M
      case scTruncate:
451
6.48k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
1.73M
      case scZeroExtend:
453
58.2k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
1.73M
      case scSignExtend:
455
55.2k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
1.73M
      case scAddExpr:
457
70.4k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
1.73M
      case scMulExpr:
459
42.7k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
1.73M
      case scUDivExpr:
461
8.73k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
1.73M
      case scAddRecExpr:
463
526k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
1.73M
      case scSMaxExpr:
465
21.0k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
1.73M
      case scUMaxExpr:
467
3.81k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
1.73M
      case scUnknown:
469
269k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
1.73M
      case scCouldNotCompute:
471
301k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
1.73M
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
1.73M
      }
475
1.73M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPostIncRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
1.29M
    RetVal visit(const SCEV *S) {
447
1.29M
      switch (S->getSCEVType()) {
448
1.29M
      case scConstant:
449
353k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
1.29M
      case scTruncate:
451
4.99k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
1.29M
      case scZeroExtend:
453
47.1k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
1.29M
      case scSignExtend:
455
37.4k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
1.29M
      case scAddExpr:
457
55.6k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
1.29M
      case scMulExpr:
459
40.4k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
1.29M
      case scUDivExpr:
461
8.28k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
1.29M
      case scAddRecExpr:
463
515k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
1.29M
      case scSMaxExpr:
465
20.8k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
1.29M
      case scUMaxExpr:
467
3.78k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
1.29M
      case scUnknown:
469
205k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
1.29M
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
1.29M
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
1.29M
      }
475
1.29M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVDivision, void>::visit(llvm::SCEV const*)
Line
Count
Source
446
14.5k
    RetVal visit(const SCEV *S) {
447
14.5k
      switch (S->getSCEVType()) {
448
14.5k
      case scConstant:
449
2.39k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
14.5k
      case scTruncate:
451
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
14.5k
      case scZeroExtend:
453
20
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
14.5k
      case scSignExtend:
455
62
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
14.5k
      case scAddExpr:
457
623
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
14.5k
      case scMulExpr:
459
4.25k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
14.5k
      case scUDivExpr:
461
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
14.5k
      case scAddRecExpr:
463
5.60k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
14.5k
      case scSMaxExpr:
465
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
14.5k
      case scUMaxExpr:
467
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
14.5k
      case scUnknown:
469
1.62k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
14.5k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
14.5k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
14.5k
      }
475
14.5k
    }
llvm::SCEVVisitor<llvm::SCEVParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
383
    RetVal visit(const SCEV *S) {
447
383
      switch (S->getSCEVType()) {
448
383
      case scConstant:
449
267
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
383
      case scTruncate:
451
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
383
      case scZeroExtend:
453
2
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
383
      case scSignExtend:
455
2
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
383
      case scAddExpr:
457
13
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
383
      case scMulExpr:
459
35
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
383
      case scUDivExpr:
461
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
383
      case scAddRecExpr:
463
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
383
      case scSMaxExpr:
465
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
383
      case scUMaxExpr:
467
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
383
      case scUnknown:
469
58
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
383
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
383
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
383
      }
475
383
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPredicateRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
1.92M
    RetVal visit(const SCEV *S) {
447
1.92M
      switch (S->getSCEVType()) {
448
1.92M
      case scConstant:
449
587k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
1.92M
      case scTruncate:
451
4.98k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
1.92M
      case scZeroExtend:
453
14.1k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
1.92M
      case scSignExtend:
455
120k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
1.92M
      case scAddExpr:
457
223k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
1.92M
      case scMulExpr:
459
162k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
1.92M
      case scUDivExpr:
461
4.41k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
1.92M
      case scAddRecExpr:
463
298k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
1.92M
      case scSMaxExpr:
465
4.56k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
1.92M
      case scUMaxExpr:
467
4.00k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
1.92M
      case scUnknown:
469
495k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
1.92M
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
1.92M
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
1.92M
      }
475
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
446
2.43M
    RetVal visit(const SCEV *S) {
447
2.43M
      switch (S->getSCEVType()) {
448
2.43M
      case scConstant:
449
497k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
2.43M
      case scTruncate:
451
994
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
2.43M
      case scZeroExtend:
453
4.09k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
2.43M
      case scSignExtend:
455
3.80k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
2.43M
      case scAddExpr:
457
412k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
2.43M
      case scMulExpr:
459
25.5k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
2.43M
      case scUDivExpr:
461
4.96k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
2.43M
      case scAddRecExpr:
463
273k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
2.43M
      case scSMaxExpr:
465
1.17k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
2.43M
      case scUMaxExpr:
467
813
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
2.43M
      case scUnknown:
469
1.20M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
2.43M
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
2.43M
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
2.43M
      }
475
2.43M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
11.1M
    RetVal visit(const SCEV *S) {
447
11.1M
      switch (S->getSCEVType()) {
448
11.1M
      case scConstant:
449
3.96M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
11.1M
      case scTruncate:
451
30.4k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
11.1M
      case scZeroExtend:
453
108k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
11.1M
      case scSignExtend:
455
409k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
11.1M
      case scAddExpr:
457
1.38M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
11.1M
      case scMulExpr:
459
549k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
11.1M
      case scUDivExpr:
461
43.5k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
11.1M
      case scAddRecExpr:
463
2.33M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
11.1M
      case scSMaxExpr:
465
7.84k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
11.1M
      case scUMaxExpr:
467
11.7k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
11.1M
      case scUnknown:
469
2.30M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
11.1M
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
11.1M
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
11.1M
      }
475
11.1M
    }
StackSafetyAnalysis.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
556
    RetVal visit(const SCEV *S) {
447
556
      switch (S->getSCEVType()) {
448
556
      case scConstant:
449
0
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
556
      case scTruncate:
451
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
556
      case scZeroExtend:
453
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
556
      case scSignExtend:
455
0
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
556
      case scAddExpr:
457
136
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
556
      case scMulExpr:
459
0
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
556
      case scUDivExpr:
461
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
556
      case scAddRecExpr:
463
8
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
556
      case scSMaxExpr:
465
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
556
      case scUMaxExpr:
467
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
556
      case scUnknown:
469
412
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
556
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
556
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
556
      }
475
556
    }
SafeStack.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
196
    RetVal visit(const SCEV *S) {
447
196
      switch (S->getSCEVType()) {
448
196
      case scConstant:
449
31
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
196
      case scTruncate:
451
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
196
      case scZeroExtend:
453
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
196
      case scSignExtend:
455
3
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
196
      case scAddExpr:
457
34
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
196
      case scMulExpr:
459
6
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
196
      case scUDivExpr:
461
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
196
      case scAddRecExpr:
463
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
196
      case scSMaxExpr:
465
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
196
      case scUMaxExpr:
467
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
196
      case scUnknown:
469
122
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
196
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
196
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
196
      }
475
196
    }
ScopDetection.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVRemoveMax, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
12.0k
    RetVal visit(const SCEV *S) {
447
12.0k
      switch (S->getSCEVType()) {
448
12.0k
      case scConstant:
449
2.84k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
12.0k
      case scTruncate:
451
4
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
12.0k
      case scZeroExtend:
453
54
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
12.0k
      case scSignExtend:
455
188
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
12.0k
      case scAddExpr:
457
576
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
12.0k
      case scMulExpr:
459
2.62k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
12.0k
      case scUDivExpr:
461
12
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
12.0k
      case scAddRecExpr:
463
3.27k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
12.0k
      case scSMaxExpr:
465
68
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
12.0k
      case scUMaxExpr:
467
16
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
12.0k
      case scUnknown:
469
2.41k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
12.0k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
12.0k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
12.0k
      }
475
12.0k
    }
ScopInfo.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
14.2k
    RetVal visit(const SCEV *S) {
447
14.2k
      switch (S->getSCEVType()) {
448
14.2k
      case scConstant:
449
6.39k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
14.2k
      case scTruncate:
451
77
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
14.2k
      case scZeroExtend:
453
151
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
14.2k
      case scSignExtend:
455
335
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
14.2k
      case scAddExpr:
457
306
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
14.2k
      case scMulExpr:
459
202
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
14.2k
      case scUDivExpr:
461
145
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
14.2k
      case scAddRecExpr:
463
316
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
14.2k
      case scSMaxExpr:
465
61
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
14.2k
      case scUMaxExpr:
467
15
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
14.2k
      case scUnknown:
469
6.29k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
14.2k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
14.2k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
14.2k
      }
475
14.2k
    }
llvm::SCEVVisitor<llvm::SCEVLoopAddRecRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
2.37k
    RetVal visit(const SCEV *S) {
447
2.37k
      switch (S->getSCEVType()) {
448
2.37k
      case scConstant:
449
869
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
2.37k
      case scTruncate:
451
2
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
2.37k
      case scZeroExtend:
453
11
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
2.37k
      case scSignExtend:
455
28
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
2.37k
      case scAddExpr:
457
124
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
2.37k
      case scMulExpr:
459
67
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
2.37k
      case scUDivExpr:
461
5
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
2.37k
      case scAddRecExpr:
463
664
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
2.37k
      case scSMaxExpr:
465
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
2.37k
      case scUMaxExpr:
467
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
2.37k
      case scUnknown:
469
605
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
2.37k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
2.37k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
2.37k
      }
475
2.37k
    }
llvm::SCEVVisitor<polly::SCEVAffinator, std::__1::pair<isl::noexceptions::pw_aff, isl::noexceptions::set> >::visit(llvm::SCEV const*)
Line
Count
Source
446
10.6k
    RetVal visit(const SCEV *S) {
447
10.6k
      switch (S->getSCEVType()) {
448
10.6k
      case scConstant:
449
5.32k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
10.6k
      case scTruncate:
451
51
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
10.6k
      case scZeroExtend:
453
112
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
10.6k
      case scSignExtend:
455
376
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
10.6k
      case scAddExpr:
457
268
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
10.6k
      case scMulExpr:
459
1
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
10.6k
      case scUDivExpr:
461
53
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
10.6k
      case scAddRecExpr:
463
4.27k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
10.6k
      case scSMaxExpr:
465
69
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
10.6k
      case scUMaxExpr:
467
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
10.6k
      case scUnknown:
469
93
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
10.6k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
10.6k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
10.6k
      }
475
10.6k
    }
llvm::SCEVVisitor<SCEVValidator, ValidatorResult>::visit(llvm::SCEV const*)
Line
Count
Source
446
145k
    RetVal visit(const SCEV *S) {
447
145k
      switch (S->getSCEVType()) {
448
145k
      case scConstant:
449
84.7k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
145k
      case scTruncate:
451
283
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
145k
      case scZeroExtend:
453
818
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
145k
      case scSignExtend:
455
2.68k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
145k
      case scAddExpr:
457
3.32k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
145k
      case scMulExpr:
459
4.45k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
145k
      case scUDivExpr:
461
410
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
145k
      case scAddRecExpr:
463
30.1k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
145k
      case scSMaxExpr:
465
1.41k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
145k
      case scUMaxExpr:
467
39
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
145k
      case scUnknown:
469
16.9k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
145k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
145k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
145k
      }
475
145k
    }
llvm::SCEVVisitor<ScopExpander, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
446
3.75k
    RetVal visit(const SCEV *S) {
447
3.75k
      switch (S->getSCEVType()) {
448
3.75k
      case scConstant:
449
920
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
450
3.75k
      case scTruncate:
451
74
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
452
3.75k
      case scZeroExtend:
453
22
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
454
3.75k
      case scSignExtend:
455
36
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
456
3.75k
      case scAddExpr:
457
503
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
458
3.75k
      case scMulExpr:
459
559
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
460
3.75k
      case scUDivExpr:
461
13
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
462
3.75k
      case scAddRecExpr:
463
38
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
464
3.75k
      case scSMaxExpr:
465
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
466
3.75k
      case scUMaxExpr:
467
2
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
468
3.75k
      case scUnknown:
469
1.58k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
470
3.75k
      case scCouldNotCompute:
471
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
472
3.75k
      default:
473
0
        llvm_unreachable("Unknown SCEV type!");
474
3.75k
      }
475
3.75k
    }
476
477
0
    RetVal visitCouldNotCompute(const SCEVCouldNotCompute *S) {
478
0
      llvm_unreachable("Invalid use of SCEVCouldNotCompute!");
479
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*)
480
  };
481
482
  /// Visit all nodes in the expression tree using worklist traversal.
483
  ///
484
  /// Visitor implements:
485
  ///   // return true to follow this node.
486
  ///   bool follow(const SCEV *S);
487
  ///   // return true to terminate the search.
488
  ///   bool isDone();
489
  template<typename SV>
490
  class SCEVTraversal {
491
    SV &Visitor;
492
    SmallVector<const SCEV *, 8> Worklist;
493
    SmallPtrSet<const SCEV *, 8> Visited;
494
495
351M
    void push(const SCEV *S) {
496
351M
      if (Visited.insert(S).second && 
Visitor.follow(S)316M
)
497
312M
        Worklist.push_back(S);
498
351M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::push(llvm::SCEV const*)
Line
Count
Source
495
5.76M
    void push(const SCEV *S) {
496
5.76M
      if (Visited.insert(S).second && 
Visitor.follow(S)5.76M
)
497
2.30M
        Worklist.push_back(S);
498
5.76M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::push(llvm::SCEV const*)
Line
Count
Source
495
480k
    void push(const SCEV *S) {
496
480k
      if (Visited.insert(S).second && 
Visitor.follow(S)463k
)
497
248k
        Worklist.push_back(S);
498
480k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::push(llvm::SCEV const*)
Line
Count
Source
495
181
    void push(const SCEV *S) {
496
181
      if (Visited.insert(S).second && 
Visitor.follow(S)175
)
497
175
        Worklist.push_back(S);
498
181
    }
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
495
3.69k
    void push(const SCEV *S) {
496
3.69k
      if (Visited.insert(S).second && 
Visitor.follow(S)3.68k
)
497
3.66k
        Worklist.push_back(S);
498
3.69k
    }
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
495
115M
    void push(const SCEV *S) {
496
115M
      if (Visited.insert(S).second && 
Visitor.follow(S)109M
)
497
109M
        Worklist.push_back(S);
498
115M
    }
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
495
2.65M
    void push(const SCEV *S) {
496
2.65M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.61M
)
497
2.37M
        Worklist.push_back(S);
498
2.65M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::push(llvm::SCEV const*)
Line
Count
Source
495
17.0k
    void push(const SCEV *S) {
496
17.0k
      if (Visited.insert(S).second && 
Visitor.follow(S)14.8k
)
497
14.8k
        Worklist.push_back(S);
498
17.0k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::push(llvm::SCEV const*)
Line
Count
Source
495
4.64k
    void push(const SCEV *S) {
496
4.64k
      if (Visited.insert(S).second && 
Visitor.follow(S)4.63k
)
497
3.59k
        Worklist.push_back(S);
498
4.64k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::push(llvm::SCEV const*)
Line
Count
Source
495
13.2k
    void push(const SCEV *S) {
496
13.2k
      if (Visited.insert(S).second && 
Visitor.follow(S)12.8k
)
497
11.4k
        Worklist.push_back(S);
498
13.2k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::push(llvm::SCEV const*)
Line
Count
Source
495
2.61k
    void push(const SCEV *S) {
496
2.61k
      if (Visited.insert(S).second && 
Visitor.follow(S)2.60k
)
497
2.53k
        Worklist.push_back(S);
498
2.61k
    }
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
495
113M
    void push(const SCEV *S) {
496
113M
      if (Visited.insert(S).second && 
Visitor.follow(S)107M
)
497
106M
        Worklist.push_back(S);
498
113M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::push(llvm::SCEV const*)
Line
Count
Source
495
108M
    void push(const SCEV *S) {
496
108M
      if (Visited.insert(S).second && 
Visitor.follow(S)86.4M
)
497
86.4M
        Worklist.push_back(S);
498
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
495
1.98M
    void push(const SCEV *S) {
496
1.98M
      if (Visited.insert(S).second && 
Visitor.follow(S)1.94M
)
497
1.94M
        Worklist.push_back(S);
498
1.98M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::push(llvm::SCEV const*)
Line
Count
Source
495
2.70M
    void push(const SCEV *S) {
496
2.70M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.60M
)
497
2.60M
        Worklist.push_back(S);
498
2.70M
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::push(llvm::SCEV const*)
Line
Count
Source
495
20.9k
    void push(const SCEV *S) {
496
20.9k
      if (Visited.insert(S).second && 
Visitor.follow(S)20.7k
)
497
15.1k
        Worklist.push_back(S);
498
20.9k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::push(llvm::SCEV const*)
Line
Count
Source
495
45.0k
    void push(const SCEV *S) {
496
45.0k
      if (Visited.insert(S).second && 
Visitor.follow(S)41.7k
)
497
41.7k
        Worklist.push_back(S);
498
45.0k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::push(llvm::SCEV const*)
Line
Count
Source
495
52.5k
    void push(const SCEV *S) {
496
52.5k
      if (Visited.insert(S).second && 
Visitor.follow(S)46.3k
)
497
39.3k
        Worklist.push_back(S);
498
52.5k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::push(llvm::SCEV const*)
Line
Count
Source
495
27.6k
    void push(const SCEV *S) {
496
27.6k
      if (Visited.insert(S).second && 
Visitor.follow(S)26.8k
)
497
26.8k
        Worklist.push_back(S);
498
27.6k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::push(llvm::SCEV const*)
Line
Count
Source
495
78.4k
    void push(const SCEV *S) {
496
78.4k
      if (Visited.insert(S).second && 
Visitor.follow(S)71.8k
)
497
61.1k
        Worklist.push_back(S);
498
78.4k
    }
499
500
  public:
501
129M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::SCEVTraversal(containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain&)
Line
Count
Source
501
1.76M
    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
501
247k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::SCEVTraversal(sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize&)
Line
Count
Source
501
64
    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
501
1.03k
    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
501
38.5M
    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
501
1.60M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::SCEVTraversal((anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
501
2.96k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::SCEVTraversal((anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
501
4.50k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::SCEVTraversal((anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
501
2.96k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::SCEVTraversal((anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
501
1.90k
    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
501
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
501
15.3M
    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
501
403k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::SCEVTraversal((anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
501
528k
    SCEVTraversal(SV& V): Visitor(V) {}
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::SCEVTraversal((anonymous namespace)::SCEVFindInsideScop&)
Line
Count
Source
501
17.3k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindLoops>::SCEVTraversal(polly::SCEVFindLoops&)
Line
Count
Source
501
15.8k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindValues>::SCEVTraversal(polly::SCEVFindValues&)
Line
Count
Source
501
19.7k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVHasIVParams>::SCEVTraversal(SCEVHasIVParams&)
Line
Count
Source
501
11.7k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVInRegionDependences>::SCEVTraversal(SCEVInRegionDependences&)
Line
Count
Source
501
24.5k
    SCEVTraversal(SV& V): Visitor(V) {}
502
503
129M
    void visitAll(const SCEV *Root) {
504
129M
      push(Root);
505
441M
      while (!Worklist.empty() && 
!Visitor.isDone()312M
) {
506
311M
        const SCEV *S = Worklist.pop_back_val();
507
311M
508
311M
        switch (S->getSCEVType()) {
509
311M
        case scConstant:
510
197M
        case scUnknown:
511
197M
          break;
512
197M
        case scTruncate:
513
22.1M
        case scZeroExtend:
514
22.1M
        case scSignExtend:
515
22.1M
          push(cast<SCEVCastExpr>(S)->getOperand());
516
22.1M
          break;
517
86.9M
        case scAddExpr:
518
86.9M
        case scMulExpr:
519
86.9M
        case scSMaxExpr:
520
86.9M
        case scUMaxExpr:
521
86.9M
        case scAddRecExpr:
522
86.9M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
189M
            push(Op);
524
86.9M
          break;
525
86.9M
        case scUDivExpr: {
526
5.46M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
5.46M
          push(UDiv->getLHS());
528
5.46M
          push(UDiv->getRHS());
529
5.46M
          break;
530
86.9M
        }
531
86.9M
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
86.9M
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
311M
        }
536
311M
      }
537
129M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
1.76M
    void visitAll(const SCEV *Root) {
504
1.76M
      push(Root);
505
3.76M
      while (!Worklist.empty() && 
!Visitor.isDone()2.29M
) {
506
1.99M
        const SCEV *S = Worklist.pop_back_val();
507
1.99M
508
1.99M
        switch (S->getSCEVType()) {
509
1.99M
        case scConstant:
510
0
        case scUnknown:
511
0
          break;
512
0
        case scTruncate:
513
0
        case scZeroExtend:
514
0
        case scSignExtend:
515
0
          push(cast<SCEVCastExpr>(S)->getOperand());
516
0
          break;
517
1.99M
        case scAddExpr:
518
1.99M
        case scMulExpr:
519
1.99M
        case scSMaxExpr:
520
1.99M
        case scUMaxExpr:
521
1.99M
        case scAddRecExpr:
522
1.99M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
3.99M
            push(Op);
524
1.99M
          break;
525
1.99M
        case scUDivExpr: {
526
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
0
          push(UDiv->getLHS());
528
0
          push(UDiv->getRHS());
529
0
          break;
530
1.99M
        }
531
1.99M
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
1.99M
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
1.99M
        }
536
1.99M
      }
537
1.76M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
247k
    void visitAll(const SCEV *Root) {
504
247k
      push(Root);
505
473k
      while (!Worklist.empty() && 
!Visitor.isDone()244k
) {
506
226k
        const SCEV *S = Worklist.pop_back_val();
507
226k
508
226k
        switch (S->getSCEVType()) {
509
226k
        case scConstant:
510
95.8k
        case scUnknown:
511
95.8k
          break;
512
95.8k
        case scTruncate:
513
37.5k
        case scZeroExtend:
514
37.5k
        case scSignExtend:
515
37.5k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
37.5k
          break;
517
93.0k
        case scAddExpr:
518
93.0k
        case scMulExpr:
519
93.0k
        case scSMaxExpr:
520
93.0k
        case scUMaxExpr:
521
93.0k
        case scAddRecExpr:
522
93.0k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
196k
            push(Op);
524
93.0k
          break;
525
93.0k
        case scUDivExpr: {
526
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
0
          push(UDiv->getLHS());
528
0
          push(UDiv->getRHS());
529
0
          break;
530
93.0k
        }
531
93.0k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
93.0k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
226k
        }
536
226k
      }
537
247k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
64
    void visitAll(const SCEV *Root) {
504
64
      push(Root);
505
239
      while (!Worklist.empty() && 
!Visitor.isDone()175
) {
506
175
        const SCEV *S = Worklist.pop_back_val();
507
175
508
175
        switch (S->getSCEVType()) {
509
175
        case scConstant:
510
118
        case scUnknown:
511
118
          break;
512
118
        case scTruncate:
513
0
        case scZeroExtend:
514
0
        case scSignExtend:
515
0
          push(cast<SCEVCastExpr>(S)->getOperand());
516
0
          break;
517
51
        case scAddExpr:
518
51
        case scMulExpr:
519
51
        case scSMaxExpr:
520
51
        case scUMaxExpr:
521
51
        case scAddRecExpr:
522
51
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
105
            push(Op);
524
51
          break;
525
51
        case scUDivExpr: {
526
6
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
6
          push(UDiv->getLHS());
528
6
          push(UDiv->getRHS());
529
6
          break;
530
51
        }
531
51
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
51
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
175
        }
536
175
      }
537
64
    }
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
503
1.03k
    void visitAll(const SCEV *Root) {
504
1.03k
      push(Root);
505
4.68k
      while (!Worklist.empty() && 
!Visitor.isDone()3.66k
) {
506
3.64k
        const SCEV *S = Worklist.pop_back_val();
507
3.64k
508
3.64k
        switch (S->getSCEVType()) {
509
3.64k
        case scConstant:
510
2.55k
        case scUnknown:
511
2.55k
          break;
512
2.55k
        case scTruncate:
513
61
        case scZeroExtend:
514
61
        case scSignExtend:
515
61
          push(cast<SCEVCastExpr>(S)->getOperand());
516
61
          break;
517
1.03k
        case scAddExpr:
518
1.03k
        case scMulExpr:
519
1.03k
        case scSMaxExpr:
520
1.03k
        case scUMaxExpr:
521
1.03k
        case scAddRecExpr:
522
1.03k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
2.59k
            push(Op);
524
1.03k
          break;
525
1.03k
        case scUDivExpr: {
526
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
0
          push(UDiv->getLHS());
528
0
          push(UDiv->getRHS());
529
0
          break;
530
1.03k
        }
531
1.03k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
1.03k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
3.64k
        }
536
3.64k
      }
537
1.03k
    }
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
503
38.5M
    void visitAll(const SCEV *Root) {
504
38.5M
      push(Root);
505
147M
      while (!Worklist.empty() && 
!Visitor.isDone()109M
) {
506
109M
        const SCEV *S = Worklist.pop_back_val();
507
109M
508
109M
        switch (S->getSCEVType()) {
509
109M
        case scConstant:
510
68.7M
        case scUnknown:
511
68.7M
          break;
512
68.7M
        case scTruncate:
513
7.67M
        case scZeroExtend:
514
7.67M
        case scSignExtend:
515
7.67M
          push(cast<SCEVCastExpr>(S)->getOperand());
516
7.67M
          break;
517
32.5M
        case scAddExpr:
518
32.5M
        case scMulExpr:
519
32.5M
        case scSMaxExpr:
520
32.5M
        case scUMaxExpr:
521
32.5M
        case scAddRecExpr:
522
32.5M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
68.5M
            push(Op);
524
32.5M
          break;
525
32.5M
        case scUDivExpr: {
526
505k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
505k
          push(UDiv->getLHS());
528
505k
          push(UDiv->getRHS());
529
505k
          break;
530
32.5M
        }
531
32.5M
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
32.5M
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
109M
        }
536
109M
      }
537
38.5M
    }
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
503
1.60M
    void visitAll(const SCEV *Root) {
504
1.60M
      push(Root);
505
3.96M
      while (!Worklist.empty() && 
!Visitor.isDone()2.36M
) {
506
2.36M
        const SCEV *S = Worklist.pop_back_val();
507
2.36M
508
2.36M
        switch (S->getSCEVType()) {
509
2.36M
        case scConstant:
510
1.82M
        case scUnknown:
511
1.82M
          break;
512
1.82M
        case scTruncate:
513
58.4k
        case scZeroExtend:
514
58.4k
        case scSignExtend:
515
58.4k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
58.4k
          break;
517
466k
        case scAddExpr:
518
466k
        case scMulExpr:
519
466k
        case scSMaxExpr:
520
466k
        case scUMaxExpr:
521
466k
        case scAddRecExpr:
522
466k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
954k
            push(Op);
524
466k
          break;
525
466k
        case scUDivExpr: {
526
17.6k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
17.6k
          push(UDiv->getLHS());
528
17.6k
          push(UDiv->getRHS());
529
17.6k
          break;
530
466k
        }
531
466k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
466k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
2.36M
        }
536
2.36M
      }
537
1.60M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
2.96k
    void visitAll(const SCEV *Root) {
504
2.96k
      push(Root);
505
17.7k
      while (!Worklist.empty() && 
!Visitor.isDone()14.8k
) {
506
14.8k
        const SCEV *S = Worklist.pop_back_val();
507
14.8k
508
14.8k
        switch (S->getSCEVType()) {
509
14.8k
        case scConstant:
510
8.06k
        case scUnknown:
511
8.06k
          break;
512
8.06k
        case scTruncate:
513
171
        case scZeroExtend:
514
171
        case scSignExtend:
515
171
          push(cast<SCEVCastExpr>(S)->getOperand());
516
171
          break;
517
6.56k
        case scAddExpr:
518
6.56k
        case scMulExpr:
519
6.56k
        case scSMaxExpr:
520
6.56k
        case scUMaxExpr:
521
6.56k
        case scAddRecExpr:
522
6.56k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
13.8k
            push(Op);
524
6.56k
          break;
525
6.56k
        case scUDivExpr: {
526
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
8
          push(UDiv->getLHS());
528
8
          push(UDiv->getRHS());
529
8
          break;
530
6.56k
        }
531
6.56k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
6.56k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
14.8k
        }
536
14.8k
      }
537
2.96k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
4.50k
    void visitAll(const SCEV *Root) {
504
4.50k
      push(Root);
505
8.09k
      while (!Worklist.empty() && 
!Visitor.isDone()3.59k
) {
506
3.59k
        const SCEV *S = Worklist.pop_back_val();
507
3.59k
508
3.59k
        switch (S->getSCEVType()) {
509
3.59k
        case scConstant:
510
3.52k
        case scUnknown:
511
3.52k
          break;
512
3.52k
        case scTruncate:
513
2
        case scZeroExtend:
514
2
        case scSignExtend:
515
2
          push(cast<SCEVCastExpr>(S)->getOperand());
516
2
          break;
517
69
        case scAddExpr:
518
69
        case scMulExpr:
519
69
        case scSMaxExpr:
520
69
        case scUMaxExpr:
521
69
        case scAddRecExpr:
522
69
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
138
            push(Op);
524
69
          break;
525
69
        case scUDivExpr: {
526
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
0
          push(UDiv->getLHS());
528
0
          push(UDiv->getRHS());
529
0
          break;
530
69
        }
531
69
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
69
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
3.59k
        }
536
3.59k
      }
537
4.50k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
2.96k
    void visitAll(const SCEV *Root) {
504
2.96k
      push(Root);
505
14.4k
      while (!Worklist.empty() && 
!Visitor.isDone()11.4k
) {
506
11.4k
        const SCEV *S = Worklist.pop_back_val();
507
11.4k
508
11.4k
        switch (S->getSCEVType()) {
509
11.4k
        case scConstant:
510
6.26k
        case scUnknown:
511
6.26k
          break;
512
6.26k
        case scTruncate:
513
171
        case scZeroExtend:
514
171
        case scSignExtend:
515
171
          push(cast<SCEVCastExpr>(S)->getOperand());
516
171
          break;
517
5.00k
        case scAddExpr:
518
5.00k
        case scMulExpr:
519
5.00k
        case scSMaxExpr:
520
5.00k
        case scUMaxExpr:
521
5.00k
        case scAddRecExpr:
522
5.00k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
10.0k
            push(Op);
524
5.00k
          break;
525
5.00k
        case scUDivExpr: {
526
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
8
          push(UDiv->getLHS());
528
8
          push(UDiv->getRHS());
529
8
          break;
530
5.00k
        }
531
5.00k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
5.00k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
11.4k
        }
536
11.4k
      }
537
2.96k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
1.90k
    void visitAll(const SCEV *Root) {
504
1.90k
      push(Root);
505
4.44k
      while (!Worklist.empty() && 
!Visitor.isDone()2.53k
) {
506
2.53k
        const SCEV *S = Worklist.pop_back_val();
507
2.53k
508
2.53k
        switch (S->getSCEVType()) {
509
2.53k
        case scConstant:
510
2.09k
        case scUnknown:
511
2.09k
          break;
512
2.09k
        case scTruncate:
513
181
        case scZeroExtend:
514
181
        case scSignExtend:
515
181
          push(cast<SCEVCastExpr>(S)->getOperand());
516
181
          break;
517
257
        case scAddExpr:
518
257
        case scMulExpr:
519
257
        case scSMaxExpr:
520
257
        case scUMaxExpr:
521
257
        case scAddRecExpr:
522
257
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
517
            push(Op);
524
257
          break;
525
257
        case scUDivExpr: {
526
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
8
          push(UDiv->getLHS());
528
8
          push(UDiv->getRHS());
529
8
          break;
530
257
        }
531
257
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
257
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
2.53k
        }
536
2.53k
      }
537
1.90k
    }
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
503
70.6M
    void visitAll(const SCEV *Root) {
504
70.6M
      push(Root);
505
177M
      while (!Worklist.empty() && 
!Visitor.isDone()106M
) {
506
106M
        const SCEV *S = Worklist.pop_back_val();
507
106M
508
106M
        switch (S->getSCEVType()) {
509
106M
        case scConstant:
510
83.4M
        case scUnknown:
511
83.4M
          break;
512
83.4M
        case scTruncate:
513
5.68M
        case scZeroExtend:
514
5.68M
        case scSignExtend:
515
5.68M
          push(cast<SCEVCastExpr>(S)->getOperand());
516
5.68M
          break;
517
14.0M
        case scAddExpr:
518
14.0M
        case scMulExpr:
519
14.0M
        case scSMaxExpr:
520
14.0M
        case scUMaxExpr:
521
14.0M
        case scAddRecExpr:
522
14.0M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
30.4M
            push(Op);
524
14.0M
          break;
525
14.0M
        case scUDivExpr: {
526
3.39M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
3.39M
          push(UDiv->getLHS());
528
3.39M
          push(UDiv->getRHS());
529
3.39M
          break;
530
14.0M
        }
531
14.0M
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
14.0M
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
106M
        }
536
106M
      }
537
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
503
15.3M
    void visitAll(const SCEV *Root) {
504
15.3M
      push(Root);
505
101M
      while (!Worklist.empty() && 
!Visitor.isDone()86.4M
) {
506
86.4M
        const SCEV *S = Worklist.pop_back_val();
507
86.4M
508
86.4M
        switch (S->getSCEVType()) {
509
86.4M
        case scConstant:
510
40.5M
        case scUnknown:
511
40.5M
          break;
512
40.5M
        case scTruncate:
513
8.41M
        case scZeroExtend:
514
8.41M
        case scSignExtend:
515
8.41M
          push(cast<SCEVCastExpr>(S)->getOperand());
516
8.41M
          break;
517
36.0M
        case scAddExpr:
518
36.0M
        case scMulExpr:
519
36.0M
        case scSMaxExpr:
520
36.0M
        case scUMaxExpr:
521
36.0M
        case scAddRecExpr:
522
36.0M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
81.8M
            push(Op);
524
36.0M
          break;
525
36.0M
        case scUDivExpr: {
526
1.52M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
1.52M
          push(UDiv->getLHS());
528
1.52M
          push(UDiv->getRHS());
529
1.52M
          break;
530
36.0M
        }
531
36.0M
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
36.0M
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
86.4M
        }
536
86.4M
      }
537
15.3M
    }
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
503
403k
    void visitAll(const SCEV *Root) {
504
403k
      push(Root);
505
2.34M
      while (!Worklist.empty() && 
!Visitor.isDone()1.94M
) {
506
1.94M
        const SCEV *S = Worklist.pop_back_val();
507
1.94M
508
1.94M
        switch (S->getSCEVType()) {
509
1.94M
        case scConstant:
510
1.11M
        case scUnknown:
511
1.11M
          break;
512
1.11M
        case scTruncate:
513
102k
        case scZeroExtend:
514
102k
        case scSignExtend:
515
102k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
102k
          break;
517
729k
        case scAddExpr:
518
729k
        case scMulExpr:
519
729k
        case scSMaxExpr:
520
729k
        case scUMaxExpr:
521
729k
        case scAddRecExpr:
522
729k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
1.47M
            push(Op);
524
729k
          break;
525
729k
        case scUDivExpr: {
526
2.32k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
2.32k
          push(UDiv->getLHS());
528
2.32k
          push(UDiv->getRHS());
529
2.32k
          break;
530
729k
        }
531
729k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
729k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
1.94M
        }
536
1.94M
      }
537
403k
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
528k
    void visitAll(const SCEV *Root) {
504
528k
      push(Root);
505
3.13M
      while (!Worklist.empty() && 
!Visitor.isDone()2.60M
) {
506
2.60M
        const SCEV *S = Worklist.pop_back_val();
507
2.60M
508
2.60M
        switch (S->getSCEVType()) {
509
2.60M
        case scConstant:
510
1.46M
        case scUnknown:
511
1.46M
          break;
512
1.46M
        case scTruncate:
513
164k
        case scZeroExtend:
514
164k
        case scSignExtend:
515
164k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
164k
          break;
517
950k
        case scAddExpr:
518
950k
        case scMulExpr:
519
950k
        case scSMaxExpr:
520
950k
        case scUMaxExpr:
521
950k
        case scAddRecExpr:
522
950k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
1.96M
            push(Op);
524
950k
          break;
525
950k
        case scUDivExpr: {
526
23.5k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
23.5k
          push(UDiv->getLHS());
528
23.5k
          push(UDiv->getRHS());
529
23.5k
          break;
530
950k
        }
531
950k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
950k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
2.60M
        }
536
2.60M
      }
537
528k
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
17.3k
    void visitAll(const SCEV *Root) {
504
17.3k
      push(Root);
505
32.2k
      while (!Worklist.empty() && 
!Visitor.isDone()15.0k
) {
506
14.9k
        const SCEV *S = Worklist.pop_back_val();
507
14.9k
508
14.9k
        switch (S->getSCEVType()) {
509
14.9k
        case scConstant:
510
12.8k
        case scUnknown:
511
12.8k
          break;
512
12.8k
        case scTruncate:
513
794
        case scZeroExtend:
514
794
        case scSignExtend:
515
794
          push(cast<SCEVCastExpr>(S)->getOperand());
516
794
          break;
517
1.18k
        case scAddExpr:
518
1.18k
        case scMulExpr:
519
1.18k
        case scSMaxExpr:
520
1.18k
        case scUMaxExpr:
521
1.18k
        case scAddRecExpr:
522
1.18k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
2.47k
            push(Op);
524
1.18k
          break;
525
1.18k
        case scUDivExpr: {
526
163
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
163
          push(UDiv->getLHS());
528
163
          push(UDiv->getRHS());
529
163
          break;
530
1.18k
        }
531
1.18k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
1.18k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
14.9k
        }
536
14.9k
      }
537
17.3k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
15.8k
    void visitAll(const SCEV *Root) {
504
15.8k
      push(Root);
505
57.6k
      while (!Worklist.empty() && 
!Visitor.isDone()41.7k
) {
506
41.7k
        const SCEV *S = Worklist.pop_back_val();
507
41.7k
508
41.7k
        switch (S->getSCEVType()) {
509
41.7k
        case scConstant:
510
26.9k
        case scUnknown:
511
26.9k
          break;
512
26.9k
        case scTruncate:
513
1.41k
        case scZeroExtend:
514
1.41k
        case scSignExtend:
515
1.41k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
1.41k
          break;
517
13.3k
        case scAddExpr:
518
13.3k
        case scMulExpr:
519
13.3k
        case scSMaxExpr:
520
13.3k
        case scUMaxExpr:
521
13.3k
        case scAddRecExpr:
522
13.3k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
27.6k
            push(Op);
524
13.3k
          break;
525
13.3k
        case scUDivExpr: {
526
89
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
89
          push(UDiv->getLHS());
528
89
          push(UDiv->getRHS());
529
89
          break;
530
13.3k
        }
531
13.3k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
13.3k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
41.7k
        }
536
41.7k
      }
537
15.8k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
19.8k
    void visitAll(const SCEV *Root) {
504
19.8k
      push(Root);
505
59.1k
      while (!Worklist.empty() && 
!Visitor.isDone()39.3k
) {
506
39.3k
        const SCEV *S = Worklist.pop_back_val();
507
39.3k
508
39.3k
        switch (S->getSCEVType()) {
509
39.3k
        case scConstant:
510
22.6k
        case scUnknown:
511
22.6k
          break;
512
22.6k
        case scTruncate:
513
1.00k
        case scZeroExtend:
514
1.00k
        case scSignExtend:
515
1.00k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
1.00k
          break;
517
15.6k
        case scAddExpr:
518
15.6k
        case scMulExpr:
519
15.6k
        case scSMaxExpr:
520
15.6k
        case scUMaxExpr:
521
15.6k
        case scAddRecExpr:
522
15.6k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
31.4k
            push(Op);
524
15.6k
          break;
525
15.6k
        case scUDivExpr: {
526
143
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
143
          push(UDiv->getLHS());
528
143
          push(UDiv->getRHS());
529
143
          break;
530
15.6k
        }
531
15.6k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
15.6k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
39.3k
        }
536
39.3k
      }
537
19.8k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
11.7k
    void visitAll(const SCEV *Root) {
504
11.7k
      push(Root);
505
38.5k
      while (!Worklist.empty() && 
!Visitor.isDone()26.8k
) {
506
26.8k
        const SCEV *S = Worklist.pop_back_val();
507
26.8k
508
26.8k
        switch (S->getSCEVType()) {
509
26.8k
        case scConstant:
510
18.4k
        case scUnknown:
511
18.4k
          break;
512
18.4k
        case scTruncate:
513
938
        case scZeroExtend:
514
938
        case scSignExtend:
515
938
          push(cast<SCEVCastExpr>(S)->getOperand());
516
938
          break;
517
7.38k
        case scAddExpr:
518
7.38k
        case scMulExpr:
519
7.38k
        case scSMaxExpr:
520
7.38k
        case scUMaxExpr:
521
7.38k
        case scAddRecExpr:
522
7.38k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
14.8k
            push(Op);
524
7.38k
          break;
525
7.38k
        case scUDivExpr: {
526
65
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
65
          push(UDiv->getLHS());
528
65
          push(UDiv->getRHS());
529
65
          break;
530
7.38k
        }
531
7.38k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
7.38k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
26.8k
        }
536
26.8k
      }
537
11.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::visitAll(llvm::SCEV const*)
Line
Count
Source
503
24.5k
    void visitAll(const SCEV *Root) {
504
24.5k
      push(Root);
505
85.6k
      while (!Worklist.empty() && 
!Visitor.isDone()61.1k
) {
506
61.1k
        const SCEV *S = Worklist.pop_back_val();
507
61.1k
508
61.1k
        switch (S->getSCEVType()) {
509
61.1k
        case scConstant:
510
33.6k
        case scUnknown:
511
33.6k
          break;
512
33.6k
        case scTruncate:
513
2.89k
        case scZeroExtend:
514
2.89k
        case scSignExtend:
515
2.89k
          push(cast<SCEVCastExpr>(S)->getOperand());
516
2.89k
          break;
517
23.9k
        case scAddExpr:
518
23.9k
        case scMulExpr:
519
23.9k
        case scSMaxExpr:
520
23.9k
        case scUMaxExpr:
521
23.9k
        case scAddRecExpr:
522
23.9k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
523
49.7k
            push(Op);
524
23.9k
          break;
525
23.9k
        case scUDivExpr: {
526
637
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
527
637
          push(UDiv->getLHS());
528
637
          push(UDiv->getRHS());
529
637
          break;
530
23.9k
        }
531
23.9k
        case scCouldNotCompute:
532
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
533
23.9k
        default:
534
0
          llvm_unreachable("Unknown SCEV kind!");
535
61.1k
        }
536
61.1k
      }
537
24.5k
    }
538
  };
539
540
  /// Use SCEVTraversal to visit all nodes in the given expression tree.
541
  template<typename SV>
542
111M
  void visitAll(const SCEV *Root, SV& Visitor) {
543
111M
    SCEVTraversal<SV> T(Visitor);
544
111M
    T.visitAll(Root);
545
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
542
1.03k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
1.03k
    SCEVTraversal<SV> T(Visitor);
544
1.03k
    T.visitAll(Root);
545
1.03k
  }
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
542
38.5M
  void visitAll(const SCEV *Root, SV& Visitor) {
543
38.5M
    SCEVTraversal<SV> T(Visitor);
544
38.5M
    T.visitAll(Root);
545
38.5M
  }
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
542
1.60M
  void visitAll(const SCEV *Root, SV& Visitor) {
543
1.60M
    SCEVTraversal<SV> T(Visitor);
544
1.60M
    T.visitAll(Root);
545
1.60M
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectStrides>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
542
2.96k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
2.96k
    SCEVTraversal<SV> T(Visitor);
544
2.96k
    T.visitAll(Root);
545
2.96k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectTerms>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
542
4.50k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
4.50k
    SCEVTraversal<SV> T(Visitor);
544
4.50k
    T.visitAll(Root);
545
4.50k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectAddRecMultiplies>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
542
2.96k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
2.96k
    SCEVTraversal<SV> T(Visitor);
544
2.96k
    T.visitAll(Root);
545
2.96k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVHasAddRec>(llvm::SCEV const*, (anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
542
1.90k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
1.90k
    SCEVTraversal<SV> T(Visitor);
544
1.90k
    T.visitAll(Root);
545
1.90k
  }
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
542
70.6M
  void visitAll(const SCEV *Root, SV& Visitor) {
543
70.6M
    SCEVTraversal<SV> T(Visitor);
544
70.6M
    T.visitAll(Root);
545
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
542
403k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
403k
    SCEVTraversal<SV> T(Visitor);
544
403k
    T.visitAll(Root);
545
403k
  }
ScalarEvolutionExpander.cpp:void llvm::visitAll<(anonymous namespace)::SCEVFindUnsafe>(llvm::SCEV const*, (anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
542
528k
  void visitAll(const SCEV *Root, SV& Visitor) {
543
528k
    SCEVTraversal<SV> T(Visitor);
544
528k
    T.visitAll(Root);
545
528k
  }
546
547
  /// Return true if any node in \p Root satisfies the predicate \p Pred.
548
  template <typename PredTy>
549
111M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
550
111M
    struct FindClosure {
551
111M
      bool Found = false;
552
111M
      PredTy Pred;
553
111M
554
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
554
1.03k
      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
554
38.5M
      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
554
1.60M
      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
554
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
554
403k
      FindClosure(PredTy Pred) : Pred(Pred) {}
555
111M
556
221M
      bool follow(const SCEV *S) {
557
221M
        if (!Pred(S))
558
220M
          return true;
559
485k
560
485k
        Found = true;
561
485k
        return false;
562
485k
      }
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
556
3.68k
      bool follow(const SCEV *S) {
557
3.68k
        if (!Pred(S))
558
3.66k
          return true;
559
18
560
18
        Found = true;
561
18
        return false;
562
18
      }
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
556
109M
      bool follow(const SCEV *S) {
557
109M
        if (!Pred(S))
558
109M
          return true;
559
0
560
0
        Found = true;
561
0
        return false;
562
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
556
2.61M
      bool follow(const SCEV *S) {
557
2.61M
        if (!Pred(S))
558
2.37M
          return true;
559
249k
560
249k
        Found = true;
561
249k
        return false;
562
249k
      }
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
556
107M
      bool follow(const SCEV *S) {
557
107M
        if (!Pred(S))
558
106M
          return true;
559
236k
560
236k
        Found = true;
561
236k
        return false;
562
236k
      }
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
556
1.94M
      bool follow(const SCEV *S) {
557
1.94M
        if (!Pred(S))
558
1.94M
          return true;
559
16
560
16
        Found = true;
561
16
        return false;
562
16
      }
563
111M
564
220M
      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
564
3.66k
      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
564
109M
      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
564
2.36M
      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
564
106M
      bool isDone() const { return Found; }
ScalarEvolutionExpander.cpp:bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure::isDone() const
Line
Count
Source
564
1.94M
      bool isDone() const { return Found; }
565
111M
    };
566
111M
567
111M
    FindClosure FC(Pred);
568
111M
    visitAll(Root, FC);
569
111M
    return FC.Found;
570
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
549
1.03k
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
550
1.03k
    struct FindClosure {
551
1.03k
      bool Found = false;
552
1.03k
      PredTy Pred;
553
1.03k
554
1.03k
      FindClosure(PredTy Pred) : Pred(Pred) {}
555
1.03k
556
1.03k
      bool follow(const SCEV *S) {
557
1.03k
        if (!Pred(S))
558
1.03k
          return true;
559
1.03k
560
1.03k
        Found = true;
561
1.03k
        return false;
562
1.03k
      }
563
1.03k
564
1.03k
      bool isDone() const { return Found; }
565
1.03k
    };
566
1.03k
567
1.03k
    FindClosure FC(Pred);
568
1.03k
    visitAll(Root, FC);
569
1.03k
    return FC.Found;
570
1.03k
  }
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
549
38.5M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
550
38.5M
    struct FindClosure {
551
38.5M
      bool Found = false;
552
38.5M
      PredTy Pred;
553
38.5M
554
38.5M
      FindClosure(PredTy Pred) : Pred(Pred) {}
555
38.5M
556
38.5M
      bool follow(const SCEV *S) {
557
38.5M
        if (!Pred(S))
558
38.5M
          return true;
559
38.5M
560
38.5M
        Found = true;
561
38.5M
        return false;
562
38.5M
      }
563
38.5M
564
38.5M
      bool isDone() const { return Found; }
565
38.5M
    };
566
38.5M
567
38.5M
    FindClosure FC(Pred);
568
38.5M
    visitAll(Root, FC);
569
38.5M
    return FC.Found;
570
38.5M
  }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))
Line
Count
Source
549
1.60M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
550
1.60M
    struct FindClosure {
551
1.60M
      bool Found = false;
552
1.60M
      PredTy Pred;
553
1.60M
554
1.60M
      FindClosure(PredTy Pred) : Pred(Pred) {}
555
1.60M
556
1.60M
      bool follow(const SCEV *S) {
557
1.60M
        if (!Pred(S))
558
1.60M
          return true;
559
1.60M
560
1.60M
        Found = true;
561
1.60M
        return false;
562
1.60M
      }
563
1.60M
564
1.60M
      bool isDone() const { return Found; }
565
1.60M
    };
566
1.60M
567
1.60M
    FindClosure FC(Pred);
568
1.60M
    visitAll(Root, FC);
569
1.60M
    return FC.Found;
570
1.60M
  }
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
549
70.6M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
550
70.6M
    struct FindClosure {
551
70.6M
      bool Found = false;
552
70.6M
      PredTy Pred;
553
70.6M
554
70.6M
      FindClosure(PredTy Pred) : Pred(Pred) {}
555
70.6M
556
70.6M
      bool follow(const SCEV *S) {
557
70.6M
        if (!Pred(S))
558
70.6M
          return true;
559
70.6M
560
70.6M
        Found = true;
561
70.6M
        return false;
562
70.6M
      }
563
70.6M
564
70.6M
      bool isDone() const { return Found; }
565
70.6M
    };
566
70.6M
567
70.6M
    FindClosure FC(Pred);
568
70.6M
    visitAll(Root, FC);
569
70.6M
    return FC.Found;
570
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
549
403k
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
550
403k
    struct FindClosure {
551
403k
      bool Found = false;
552
403k
      PredTy Pred;
553
403k
554
403k
      FindClosure(PredTy Pred) : Pred(Pred) {}
555
403k
556
403k
      bool follow(const SCEV *S) {
557
403k
        if (!Pred(S))
558
403k
          return true;
559
403k
560
403k
        Found = true;
561
403k
        return false;
562
403k
      }
563
403k
564
403k
      bool isDone() const { return Found; }
565
403k
    };
566
403k
567
403k
    FindClosure FC(Pred);
568
403k
    visitAll(Root, FC);
569
403k
    return FC.Found;
570
403k
  }
571
572
  /// This visitor recursively visits a SCEV expression and re-writes it.
573
  /// The result from each visit is cached, so it will return the same
574
  /// SCEV for the same input.
575
  template<typename SC>
576
  class SCEVRewriteVisitor : public SCEVVisitor<SC, const SCEV *> {
577
  protected:
578
    ScalarEvolution &SE;
579
    // Memoize the result of each visit so that we only compute once for
580
    // the same input SCEV. This is to avoid redundant computations when
581
    // a SCEV is referenced by multiple SCEVs. Without memoization, this
582
    // visit algorithm would have exponential time complexity in the worst
583
    // case, causing the compiler to hang on certain tests.
584
    DenseMap<const SCEV *, const SCEV *> RewriteResults;
585
586
  public:
587
5.60M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
226k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
312k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
1.33M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
957k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
277
    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
587
380k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
2.38M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
400
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
113
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
1.43k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
11.7k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
587
688
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
588
589
17.6M
    const SCEV *visit(const SCEV *S) {
590
17.6M
      auto It = RewriteResults.find(S);
591
17.6M
      if (It != RewriteResults.end())
592
822k
        return It->second;
593
16.8M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
16.8M
      auto Result = RewriteResults.try_emplace(S, Visited);
595
16.8M
      assert(Result.second && "Should insert a new entry");
596
16.8M
      return Result.first->second;
597
16.8M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visit(llvm::SCEV const*)
Line
Count
Source
589
366k
    const SCEV *visit(const SCEV *S) {
590
366k
      auto It = RewriteResults.find(S);
591
366k
      if (It != RewriteResults.end())
592
25.5k
        return It->second;
593
340k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
340k
      auto Result = RewriteResults.try_emplace(S, Visited);
595
340k
      assert(Result.second && "Should insert a new entry");
596
340k
      return Result.first->second;
597
340k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
397k
    const SCEV *visit(const SCEV *S) {
590
397k
      auto It = RewriteResults.find(S);
591
397k
      if (It != RewriteResults.end())
592
4.73k
        return It->second;
593
393k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
393k
      auto Result = RewriteResults.try_emplace(S, Visited);
595
393k
      assert(Result.second && "Should insert a new entry");
596
393k
      return Result.first->second;
597
393k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
1.75M
    const SCEV *visit(const SCEV *S) {
590
1.75M
      auto It = RewriteResults.find(S);
591
1.75M
      if (It != RewriteResults.end())
592
21.4k
        return It->second;
593
1.73M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
1.73M
      auto Result = RewriteResults.try_emplace(S, Visited);
595
1.73M
      assert(Result.second && "Should insert a new entry");
596
1.73M
      return Result.first->second;
597
1.73M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
1.31M
    const SCEV *visit(const SCEV *S) {
590
1.31M
      auto It = RewriteResults.find(S);
591
1.31M
      if (It != RewriteResults.end())
592
20.3k
        return It->second;
593
1.29M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
1.29M
      auto Result = RewriteResults.try_emplace(S, Visited);
595
1.29M
      assert(Result.second && "Should insert a new entry");
596
1.29M
      return Result.first->second;
597
1.29M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
389
    const SCEV *visit(const SCEV *S) {
590
389
      auto It = RewriteResults.find(S);
591
389
      if (It != RewriteResults.end())
592
6
        return It->second;
593
383
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
383
      auto Result = RewriteResults.try_emplace(S, Visited);
595
383
      assert(Result.second && "Should insert a new entry");
596
383
      return Result.first->second;
597
383
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
1.98M
    const SCEV *visit(const SCEV *S) {
590
1.98M
      auto It = RewriteResults.find(S);
591
1.98M
      if (It != RewriteResults.end())
592
61.1k
        return It->second;
593
1.92M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
1.92M
      auto Result = RewriteResults.try_emplace(S, Visited);
595
1.92M
      assert(Result.second && "Should insert a new entry");
596
1.92M
      return Result.first->second;
597
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
589
11.8M
    const SCEV *visit(const SCEV *S) {
590
11.8M
      auto It = RewriteResults.find(S);
591
11.8M
      if (It != RewriteResults.end())
592
684k
        return It->second;
593
11.1M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
11.1M
      auto Result = RewriteResults.try_emplace(S, Visited);
595
11.1M
      assert(Result.second && "Should insert a new entry");
596
11.1M
      return Result.first->second;
597
11.1M
    }
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
556
    const SCEV *visit(const SCEV *S) {
590
556
      auto It = RewriteResults.find(S);
591
556
      if (It != RewriteResults.end())
592
0
        return It->second;
593
556
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
556
      auto Result = RewriteResults.try_emplace(S, Visited);
595
556
      assert(Result.second && "Should insert a new entry");
596
556
      return Result.first->second;
597
556
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
196
    const SCEV *visit(const SCEV *S) {
590
196
      auto It = RewriteResults.find(S);
591
196
      if (It != RewriteResults.end())
592
0
        return It->second;
593
196
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
196
      auto Result = RewriteResults.try_emplace(S, Visited);
595
196
      assert(Result.second && "Should insert a new entry");
596
196
      return Result.first->second;
597
196
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visit(llvm::SCEV const*)
Line
Count
Source
589
16.4k
    const SCEV *visit(const SCEV *S) {
590
16.4k
      auto It = RewriteResults.find(S);
591
16.4k
      if (It != RewriteResults.end())
592
4.40k
        return It->second;
593
12.0k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
12.0k
      auto Result = RewriteResults.try_emplace(S, Visited);
595
12.0k
      assert(Result.second && "Should insert a new entry");
596
12.0k
      return Result.first->second;
597
12.0k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
14.4k
    const SCEV *visit(const SCEV *S) {
590
14.4k
      auto It = RewriteResults.find(S);
591
14.4k
      if (It != RewriteResults.end())
592
115
        return It->second;
593
14.2k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
14.2k
      auto Result = RewriteResults.try_emplace(S, Visited);
595
14.2k
      assert(Result.second && "Should insert a new entry");
596
14.2k
      return Result.first->second;
597
14.2k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
589
2.47k
    const SCEV *visit(const SCEV *S) {
590
2.47k
      auto It = RewriteResults.find(S);
591
2.47k
      if (It != RewriteResults.end())
592
97
        return It->second;
593
2.37k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
594
2.37k
      auto Result = RewriteResults.try_emplace(S, Visited);
595
2.37k
      assert(Result.second && "Should insert a new entry");
596
2.37k
      return Result.first->second;
597
2.37k
    }
598
599
5.52M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
5.52M
      return Constant;
601
5.52M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
210k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
210k
      return Constant;
601
210k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
33.8k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
33.8k
      return Constant;
601
33.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
369k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
369k
      return Constant;
601
369k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
353k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
353k
      return Constant;
601
353k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
267
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
267
      return Constant;
601
267
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
587k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
587k
      return Constant;
601
587k
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
3.96M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
3.96M
      return Constant;
601
3.96M
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitConstant(llvm::SCEVConstant const*)
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
31
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
31
      return Constant;
601
31
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
2.84k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
2.84k
      return Constant;
601
2.84k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
6.39k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
6.39k
      return Constant;
601
6.39k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
599
869
    const SCEV *visitConstant(const SCEVConstant *Constant) {
600
869
      return Constant;
601
869
    }
602
603
48.9k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
48.9k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
48.9k
      return Operand == Expr->getOperand()
606
48.9k
                 ? 
Expr47.4k
607
48.9k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())1.54k
;
608
48.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
765
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
765
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
765
      return Operand == Expr->getOperand()
606
765
                 ? Expr
607
765
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
608
765
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
1.24k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
1.24k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
1.24k
      return Operand == Expr->getOperand()
606
1.24k
                 ? Expr
607
1.24k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
608
1.24k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
6.48k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
6.48k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
6.48k
      return Operand == Expr->getOperand()
606
6.48k
                 ? 
Expr6.11k
607
6.48k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())370
;
608
6.48k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
4.99k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
4.99k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
4.99k
      return Operand == Expr->getOperand()
606
4.99k
                 ? 
Expr4.62k
607
4.99k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())364
;
608
4.99k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
4.98k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
4.98k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
4.98k
      return Operand == Expr->getOperand()
606
4.98k
                 ? 
Expr4.93k
607
4.98k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())53
;
608
4.98k
    }
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
603
30.4k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
30.4k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
30.4k
      return Operand == Expr->getOperand()
606
30.4k
                 ? 
Expr29.6k
607
30.4k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())752
;
608
30.4k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
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
603
4
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
4
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
4
      return Operand == Expr->getOperand()
606
4
                 ? Expr
607
4
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
608
4
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
77
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
77
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
77
      return Operand == Expr->getOperand()
606
77
                 ? 
Expr75
607
77
                 : 
SE.getTruncateExpr(Operand, Expr->getType())2
;
608
77
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
603
2
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
604
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
605
2
      return Operand == Expr->getOperand()
606
2
                 ? 
Expr0
607
2
                 : SE.getTruncateExpr(Operand, Expr->getType());
608
2
    }
609
610
224k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
224k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
224k
      return Operand == Expr->getOperand()
613
224k
                 ? 
Expr219k
614
224k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())5.34k
;
615
224k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
4.28k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
4.28k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
4.28k
      return Operand == Expr->getOperand()
613
4.28k
                 ? 
Expr4.28k
614
4.28k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())4
;
615
4.28k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
6.36k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
6.36k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
6.36k
      return Operand == Expr->getOperand()
613
6.36k
                 ? 
Expr5.44k
614
6.36k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())917
;
615
6.36k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
58.2k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
58.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
58.2k
      return Operand == Expr->getOperand()
613
58.2k
                 ? 
Expr56.1k
614
58.2k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())2.07k
;
615
58.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
47.1k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
47.1k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
47.1k
      return Operand == Expr->getOperand()
613
47.1k
                 ? 
Expr45.9k
614
47.1k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.14k
;
615
47.1k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
2
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
2
      return Operand == Expr->getOperand()
613
2
                 ? Expr
614
2
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
615
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
610
108k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
108k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
108k
      return Operand == Expr->getOperand()
613
108k
                 ? 
Expr107k
614
108k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.20k
;
615
108k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
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
610
54
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
54
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
54
      return Operand == Expr->getOperand()
613
54
                 ? Expr
614
54
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
615
54
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
151
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
151
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
151
      return Operand == Expr->getOperand()
613
151
                 ? 
Expr150
614
151
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
615
151
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
610
11
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
611
11
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
612
11
      return Operand == Expr->getOperand()
613
11
                 ? 
Expr10
614
11
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
615
11
    }
616
617
527k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
527k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
527k
      return Operand == Expr->getOperand()
620
527k
                 ? 
Expr525k
621
527k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2.67k
;
622
527k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
23.9k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
23.9k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
23.9k
      return Operand == Expr->getOperand()
620
23.9k
                 ? 
Expr23.9k
621
23.9k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())5
;
622
23.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
974
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
974
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
974
      return Operand == Expr->getOperand()
620
974
                 ? 
Expr931
621
974
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())43
;
622
974
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
55.2k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
55.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
55.2k
      return Operand == Expr->getOperand()
620
55.2k
                 ? 
Expr54.1k
621
55.2k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())1.18k
;
622
55.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
37.4k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
37.4k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
37.4k
      return Operand == Expr->getOperand()
620
37.4k
                 ? 
Expr36.4k
621
37.4k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())963
;
622
37.4k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
2
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
2
      return Operand == Expr->getOperand()
620
2
                 ? Expr
621
2
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
622
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
617
409k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
409k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
409k
      return Operand == Expr->getOperand()
620
409k
                 ? 
Expr409k
621
409k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())477
;
622
409k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
3
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
3
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
3
      return Operand == Expr->getOperand()
620
3
                 ? Expr
621
3
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
622
3
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
188
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
188
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
188
      return Operand == Expr->getOperand()
620
188
                 ? Expr
621
188
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
622
188
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
335
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
335
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
335
      return Operand == Expr->getOperand()
620
335
                 ? 
Expr331
621
335
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())4
;
622
335
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
617
28
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
618
28
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
619
28
      return Operand == Expr->getOperand()
620
28
                 ? 
Expr26
621
28
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2
;
622
28
    }
623
624
1.74M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
1.74M
      SmallVector<const SCEV *, 2> Operands;
626
1.74M
      bool Changed = false;
627
3.81M
      for (auto *Op : Expr->operands()) {
628
3.81M
        Operands.push_back(((SC*)this)->visit(Op));
629
3.81M
        Changed |= Op != Operands.back();
630
3.81M
      }
631
1.74M
      return !Changed ? 
Expr1.72M
:
SE.getAddExpr(Operands)18.9k
;
632
1.74M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
7.40k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
7.40k
      SmallVector<const SCEV *, 2> Operands;
626
7.40k
      bool Changed = false;
627
36.5k
      for (auto *Op : Expr->operands()) {
628
36.5k
        Operands.push_back(((SC*)this)->visit(Op));
629
36.5k
        Changed |= Op != Operands.back();
630
36.5k
      }
631
7.40k
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
632
7.40k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
1.89k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
1.89k
      SmallVector<const SCEV *, 2> Operands;
626
1.89k
      bool Changed = false;
627
4.09k
      for (auto *Op : Expr->operands()) {
628
4.09k
        Operands.push_back(((SC*)this)->visit(Op));
629
4.09k
        Changed |= Op != Operands.back();
630
4.09k
      }
631
1.89k
      return !Changed ? 
Expr1.84k
:
SE.getAddExpr(Operands)49
;
632
1.89k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
70.4k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
70.4k
      SmallVector<const SCEV *, 2> Operands;
626
70.4k
      bool Changed = false;
627
148k
      for (auto *Op : Expr->operands()) {
628
148k
        Operands.push_back(((SC*)this)->visit(Op));
629
148k
        Changed |= Op != Operands.back();
630
148k
      }
631
70.4k
      return !Changed ? 
Expr66.3k
:
SE.getAddExpr(Operands)4.14k
;
632
70.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
55.6k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
55.6k
      SmallVector<const SCEV *, 2> Operands;
626
55.6k
      bool Changed = false;
627
118k
      for (auto *Op : Expr->operands()) {
628
118k
        Operands.push_back(((SC*)this)->visit(Op));
629
118k
        Changed |= Op != Operands.back();
630
118k
      }
631
55.6k
      return !Changed ? 
Expr52.4k
:
SE.getAddExpr(Operands)3.20k
;
632
55.6k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
13
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
13
      SmallVector<const SCEV *, 2> Operands;
626
13
      bool Changed = false;
627
26
      for (auto *Op : Expr->operands()) {
628
26
        Operands.push_back(((SC*)this)->visit(Op));
629
26
        Changed |= Op != Operands.back();
630
26
      }
631
13
      return !Changed ? 
Expr9
:
SE.getAddExpr(Operands)4
;
632
13
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
223k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
223k
      SmallVector<const SCEV *, 2> Operands;
626
223k
      bool Changed = false;
627
511k
      for (auto *Op : Expr->operands()) {
628
511k
        Operands.push_back(((SC*)this)->visit(Op));
629
511k
        Changed |= Op != Operands.back();
630
511k
      }
631
223k
      return !Changed ? 
Expr221k
:
SE.getAddExpr(Operands)2.01k
;
632
223k
    }
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
624
1.38M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
1.38M
      SmallVector<const SCEV *, 2> Operands;
626
1.38M
      bool Changed = false;
627
2.98M
      for (auto *Op : Expr->operands()) {
628
2.98M
        Operands.push_back(((SC*)this)->visit(Op));
629
2.98M
        Changed |= Op != Operands.back();
630
2.98M
      }
631
1.38M
      return !Changed ? 
Expr1.37M
:
SE.getAddExpr(Operands)9.28k
;
632
1.38M
    }
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
136
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
136
      SmallVector<const SCEV *, 2> Operands;
626
136
      bool Changed = false;
627
272
      for (auto *Op : Expr->operands()) {
628
272
        Operands.push_back(((SC*)this)->visit(Op));
629
272
        Changed |= Op != Operands.back();
630
272
      }
631
136
      return !Changed ? 
Expr12
:
SE.getAddExpr(Operands)124
;
632
136
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
34
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
34
      SmallVector<const SCEV *, 2> Operands;
626
34
      bool Changed = false;
627
68
      for (auto *Op : Expr->operands()) {
628
68
        Operands.push_back(((SC*)this)->visit(Op));
629
68
        Changed |= Op != Operands.back();
630
68
      }
631
34
      return !Changed ? 
Expr0
: SE.getAddExpr(Operands);
632
34
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
576
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
576
      SmallVector<const SCEV *, 2> Operands;
626
576
      bool Changed = false;
627
1.15k
      for (auto *Op : Expr->operands()) {
628
1.15k
        Operands.push_back(((SC*)this)->visit(Op));
629
1.15k
        Changed |= Op != Operands.back();
630
1.15k
      }
631
576
      return !Changed ? 
Expr516
:
SE.getAddExpr(Operands)60
;
632
576
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
306
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
306
      SmallVector<const SCEV *, 2> Operands;
626
306
      bool Changed = false;
627
642
      for (auto *Op : Expr->operands()) {
628
642
        Operands.push_back(((SC*)this)->visit(Op));
629
642
        Changed |= Op != Operands.back();
630
642
      }
631
306
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
632
306
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
624
124
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
625
124
      SmallVector<const SCEV *, 2> Operands;
626
124
      bool Changed = false;
627
262
      for (auto *Op : Expr->operands()) {
628
262
        Operands.push_back(((SC*)this)->visit(Op));
629
262
        Changed |= Op != Operands.back();
630
262
      }
631
124
      return !Changed ? 
Expr112
:
SE.getAddExpr(Operands)12
;
632
124
    }
633
634
848k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
848k
      SmallVector<const SCEV *, 2> Operands;
636
848k
      bool Changed = false;
637
1.70M
      for (auto *Op : Expr->operands()) {
638
1.70M
        Operands.push_back(((SC*)this)->visit(Op));
639
1.70M
        Changed |= Op != Operands.back();
640
1.70M
      }
641
848k
      return !Changed ? 
Expr835k
:
SE.getMulExpr(Operands)13.0k
;
642
848k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
33.9k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
33.9k
      SmallVector<const SCEV *, 2> Operands;
636
33.9k
      bool Changed = false;
637
68.4k
      for (auto *Op : Expr->operands()) {
638
68.4k
        Operands.push_back(((SC*)this)->visit(Op));
639
68.4k
        Changed |= Op != Operands.back();
640
68.4k
      }
641
33.9k
      return !Changed ? 
Expr33.9k
:
SE.getMulExpr(Operands)4
;
642
33.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
16.4k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
16.4k
      SmallVector<const SCEV *, 2> Operands;
636
16.4k
      bool Changed = false;
637
37.2k
      for (auto *Op : Expr->operands()) {
638
37.2k
        Operands.push_back(((SC*)this)->visit(Op));
639
37.2k
        Changed |= Op != Operands.back();
640
37.2k
      }
641
16.4k
      return !Changed ? 
Expr16.4k
:
SE.getMulExpr(Operands)19
;
642
16.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
42.7k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
42.7k
      SmallVector<const SCEV *, 2> Operands;
636
42.7k
      bool Changed = false;
637
85.8k
      for (auto *Op : Expr->operands()) {
638
85.8k
        Operands.push_back(((SC*)this)->visit(Op));
639
85.8k
        Changed |= Op != Operands.back();
640
85.8k
      }
641
42.7k
      return !Changed ? 
Expr39.1k
:
SE.getMulExpr(Operands)3.67k
;
642
42.7k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
40.4k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
40.4k
      SmallVector<const SCEV *, 2> Operands;
636
40.4k
      bool Changed = false;
637
81.1k
      for (auto *Op : Expr->operands()) {
638
81.1k
        Operands.push_back(((SC*)this)->visit(Op));
639
81.1k
        Changed |= Op != Operands.back();
640
81.1k
      }
641
40.4k
      return !Changed ? 
Expr36.9k
:
SE.getMulExpr(Operands)3.46k
;
642
40.4k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
35
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
35
      SmallVector<const SCEV *, 2> Operands;
636
35
      bool Changed = false;
637
70
      for (auto *Op : Expr->operands()) {
638
70
        Operands.push_back(((SC*)this)->visit(Op));
639
70
        Changed |= Op != Operands.back();
640
70
      }
641
35
      return !Changed ? 
Expr28
:
SE.getMulExpr(Operands)7
;
642
35
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
162k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
162k
      SmallVector<const SCEV *, 2> Operands;
636
162k
      bool Changed = false;
637
325k
      for (auto *Op : Expr->operands()) {
638
325k
        Operands.push_back(((SC*)this)->visit(Op));
639
325k
        Changed |= Op != Operands.back();
640
325k
      }
641
162k
      return !Changed ? 
Expr159k
:
SE.getMulExpr(Operands)3.17k
;
642
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
634
549k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
549k
      SmallVector<const SCEV *, 2> Operands;
636
549k
      bool Changed = false;
637
1.10M
      for (auto *Op : Expr->operands()) {
638
1.10M
        Operands.push_back(((SC*)this)->visit(Op));
639
1.10M
        Changed |= Op != Operands.back();
640
1.10M
      }
641
549k
      return !Changed ? 
Expr546k
:
SE.getMulExpr(Operands)2.62k
;
642
549k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
6
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
6
      SmallVector<const SCEV *, 2> Operands;
636
6
      bool Changed = false;
637
12
      for (auto *Op : Expr->operands()) {
638
12
        Operands.push_back(((SC*)this)->visit(Op));
639
12
        Changed |= Op != Operands.back();
640
12
      }
641
6
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
642
6
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
2.62k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
2.62k
      SmallVector<const SCEV *, 2> Operands;
636
2.62k
      bool Changed = false;
637
6.89k
      for (auto *Op : Expr->operands()) {
638
6.89k
        Operands.push_back(((SC*)this)->visit(Op));
639
6.89k
        Changed |= Op != Operands.back();
640
6.89k
      }
641
2.62k
      return !Changed ? 
Expr2.50k
:
SE.getMulExpr(Operands)120
;
642
2.62k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
202
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
202
      SmallVector<const SCEV *, 2> Operands;
636
202
      bool Changed = false;
637
417
      for (auto *Op : Expr->operands()) {
638
417
        Operands.push_back(((SC*)this)->visit(Op));
639
417
        Changed |= Op != Operands.back();
640
417
      }
641
202
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
642
202
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
634
67
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
635
67
      SmallVector<const SCEV *, 2> Operands;
636
67
      bool Changed = false;
637
140
      for (auto *Op : Expr->operands()) {
638
140
        Operands.push_back(((SC*)this)->visit(Op));
639
140
        Changed |= Op != Operands.back();
640
140
      }
641
67
      return !Changed ? 
Expr64
:
SE.getMulExpr(Operands)3
;
642
67
    }
643
644
82.4k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
82.4k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
82.4k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
82.4k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()79.9k
;
648
82.4k
      return !Changed ? 
Expr79.9k
:
SE.getUDivExpr(LHS, RHS)2.54k
;
649
82.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
1.12k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
1.12k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
1.12k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
1.12k
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
648
1.12k
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
649
1.12k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
16.2k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
16.2k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
16.2k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
16.2k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()16.2k
;
648
16.2k
      return !Changed ? 
Expr16.2k
:
SE.getUDivExpr(LHS, RHS)3
;
649
16.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
8.73k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
8.73k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
8.73k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
8.73k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.53k
;
648
8.73k
      return !Changed ? 
Expr8.53k
:
SE.getUDivExpr(LHS, RHS)199
;
649
8.73k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
8.28k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
8.28k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
8.28k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
8.28k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.12k
;
648
8.28k
      return !Changed ? 
Expr8.12k
:
SE.getUDivExpr(LHS, RHS)161
;
649
8.28k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
6
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
6
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
6
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
6
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
648
6
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
649
6
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
4.41k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
4.41k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
4.41k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
4.41k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4.40k
;
648
4.41k
      return !Changed ? 
Expr4.40k
:
SE.getUDivExpr(LHS, RHS)13
;
649
4.41k
    }
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
644
43.5k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
43.5k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
43.5k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
43.5k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()41.3k
;
648
43.5k
      return !Changed ? 
Expr41.3k
:
SE.getUDivExpr(LHS, RHS)2.14k
;
649
43.5k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
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
644
12
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
12
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
12
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
12
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()0
;
648
12
      return !Changed ? 
Expr0
: SE.getUDivExpr(LHS, RHS);
649
12
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
145
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
145
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
145
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
145
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()142
;
648
145
      return !Changed ? 
Expr142
:
SE.getUDivExpr(LHS, RHS)3
;
649
145
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
644
5
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
645
5
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
646
5
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
647
5
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4
;
648
5
      return !Changed ? 
Expr3
:
SE.getUDivExpr(LHS, RHS)2
;
649
5
    }
650
651
302k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
652
302k
      SmallVector<const SCEV *, 2> Operands;
653
302k
      bool Changed = false;
654
605k
      for (auto *Op : Expr->operands()) {
655
605k
        Operands.push_back(((SC*)this)->visit(Op));
656
605k
        Changed |= Op != Operands.back();
657
605k
      }
658
302k
      return !Changed ? 
Expr301k
659
302k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
660
1.55k
                                         Expr->getNoWrapFlags());
661
302k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
651
471
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
652
471
      SmallVector<const SCEV *, 2> Operands;
653
471
      bool Changed = false;
654
1.04k
      for (auto *Op : Expr->operands()) {
655
1.04k
        Operands.push_back(((SC*)this)->visit(Op));
656
1.04k
        Changed |= Op != Operands.back();
657
1.04k
      }
658
471
      return !Changed ? Expr
659
471
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
660
0
                                         Expr->getNoWrapFlags());
661
471
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
651
298k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
652
298k
      SmallVector<const SCEV *, 2> Operands;
653
298k
      bool Changed = false;
654
597k
      for (auto *Op : Expr->operands()) {
655
597k
        Operands.push_back(((SC*)this)->visit(Op));
656
597k
        Changed |= Op != Operands.back();
657
597k
      }
658
298k
      return !Changed ? 
Expr297k
659
298k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
660
1.45k
                                         Expr->getNoWrapFlags());
661
298k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
651
8
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
652
8
      SmallVector<const SCEV *, 2> Operands;
653
8
      bool Changed = false;
654
16
      for (auto *Op : Expr->operands()) {
655
16
        Operands.push_back(((SC*)this)->visit(Op));
656
16
        Changed |= Op != Operands.back();
657
16
      }
658
8
      return !Changed ? 
Expr0
659
8
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
660
8
                                         Expr->getNoWrapFlags());
661
8
    }
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
651
3.27k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
652
3.27k
      SmallVector<const SCEV *, 2> Operands;
653
3.27k
      bool Changed = false;
654
6.63k
      for (auto *Op : Expr->operands()) {
655
6.63k
        Operands.push_back(((SC*)this)->visit(Op));
656
6.63k
        Changed |= Op != Operands.back();
657
6.63k
      }
658
3.27k
      return !Changed ? 
Expr3.19k
659
3.27k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
660
88
                                         Expr->getNoWrapFlags());
661
3.27k
    }
662
663
55.9k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
55.9k
      SmallVector<const SCEV *, 2> Operands;
665
55.9k
      bool Changed = false;
666
113k
      for (auto *Op : Expr->operands()) {
667
113k
        Operands.push_back(((SC *)this)->visit(Op));
668
113k
        Changed |= Op != Operands.back();
669
113k
      }
670
55.9k
      return !Changed ? 
Expr50.8k
:
SE.getSMaxExpr(Operands)5.08k
;
671
55.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
663
785
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
785
      SmallVector<const SCEV *, 2> Operands;
665
785
      bool Changed = false;
666
1.58k
      for (auto *Op : Expr->operands()) {
667
1.58k
        Operands.push_back(((SC *)this)->visit(Op));
668
1.58k
        Changed |= Op != Operands.back();
669
1.58k
      }
670
785
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
671
785
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
663
775
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
775
      SmallVector<const SCEV *, 2> Operands;
665
775
      bool Changed = false;
666
1.68k
      for (auto *Op : Expr->operands()) {
667
1.68k
        Operands.push_back(((SC *)this)->visit(Op));
668
1.68k
        Changed |= Op != Operands.back();
669
1.68k
      }
670
775
      return !Changed ? 
Expr722
:
SE.getSMaxExpr(Operands)53
;
671
775
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
663
21.0k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
21.0k
      SmallVector<const SCEV *, 2> Operands;
665
21.0k
      bool Changed = false;
666
42.5k
      for (auto *Op : Expr->operands()) {
667
42.5k
        Operands.push_back(((SC *)this)->visit(Op));
668
42.5k
        Changed |= Op != Operands.back();
669
42.5k
      }
670
21.0k
      return !Changed ? 
Expr18.6k
:
SE.getSMaxExpr(Operands)2.40k
;
671
21.0k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
663
20.8k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
20.8k
      SmallVector<const SCEV *, 2> Operands;
665
20.8k
      bool Changed = false;
666
42.1k
      for (auto *Op : Expr->operands()) {
667
42.1k
        Operands.push_back(((SC *)this)->visit(Op));
668
42.1k
        Changed |= Op != Operands.back();
669
42.1k
      }
670
20.8k
      return !Changed ? 
Expr18.5k
:
SE.getSMaxExpr(Operands)2.31k
;
671
20.8k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
663
4.56k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
4.56k
      SmallVector<const SCEV *, 2> Operands;
665
4.56k
      bool Changed = false;
666
9.15k
      for (auto *Op : Expr->operands()) {
667
9.15k
        Operands.push_back(((SC *)this)->visit(Op));
668
9.15k
        Changed |= Op != Operands.back();
669
9.15k
      }
670
4.56k
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
671
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
663
7.84k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
7.84k
      SmallVector<const SCEV *, 2> Operands;
665
7.84k
      bool Changed = false;
666
15.9k
      for (auto *Op : Expr->operands()) {
667
15.9k
        Operands.push_back(((SC *)this)->visit(Op));
668
15.9k
        Changed |= Op != Operands.back();
669
15.9k
      }
670
7.84k
      return !Changed ? 
Expr7.52k
:
SE.getSMaxExpr(Operands)320
;
671
7.84k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
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
663
61
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
664
61
      SmallVector<const SCEV *, 2> Operands;
665
61
      bool Changed = false;
666
132
      for (auto *Op : Expr->operands()) {
667
132
        Operands.push_back(((SC *)this)->visit(Op));
668
132
        Changed |= Op != Operands.back();
669
132
      }
670
61
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
671
61
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
672
673
24.3k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
24.3k
      SmallVector<const SCEV *, 2> Operands;
675
24.3k
      bool Changed = false;
676
49.0k
      for (auto *Op : Expr->operands()) {
677
49.0k
        Operands.push_back(((SC*)this)->visit(Op));
678
49.0k
        Changed |= Op != Operands.back();
679
49.0k
      }
680
24.3k
      return !Changed ? 
Expr23.9k
:
SE.getUMaxExpr(Operands)372
;
681
24.3k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
673
602
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
602
      SmallVector<const SCEV *, 2> Operands;
675
602
      bool Changed = false;
676
1.22k
      for (auto *Op : Expr->operands()) {
677
1.22k
        Operands.push_back(((SC*)this)->visit(Op));
678
1.22k
        Changed |= Op != Operands.back();
679
1.22k
      }
680
602
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
681
602
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
673
389
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
389
      SmallVector<const SCEV *, 2> Operands;
675
389
      bool Changed = false;
676
878
      for (auto *Op : Expr->operands()) {
677
878
        Operands.push_back(((SC*)this)->visit(Op));
678
878
        Changed |= Op != Operands.back();
679
878
      }
680
389
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
681
389
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
673
3.81k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
3.81k
      SmallVector<const SCEV *, 2> Operands;
675
3.81k
      bool Changed = false;
676
7.69k
      for (auto *Op : Expr->operands()) {
677
7.69k
        Operands.push_back(((SC*)this)->visit(Op));
678
7.69k
        Changed |= Op != Operands.back();
679
7.69k
      }
680
3.81k
      return !Changed ? 
Expr3.80k
:
SE.getUMaxExpr(Operands)6
;
681
3.81k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
673
3.78k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
3.78k
      SmallVector<const SCEV *, 2> Operands;
675
3.78k
      bool Changed = false;
676
7.63k
      for (auto *Op : Expr->operands()) {
677
7.63k
        Operands.push_back(((SC*)this)->visit(Op));
678
7.63k
        Changed |= Op != Operands.back();
679
7.63k
      }
680
3.78k
      return !Changed ? 
Expr3.77k
:
SE.getUMaxExpr(Operands)4
;
681
3.78k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
673
4.00k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
4.00k
      SmallVector<const SCEV *, 2> Operands;
675
4.00k
      bool Changed = false;
676
8.00k
      for (auto *Op : Expr->operands()) {
677
8.00k
        Operands.push_back(((SC*)this)->visit(Op));
678
8.00k
        Changed |= Op != Operands.back();
679
8.00k
      }
680
4.00k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
681
4.00k
    }
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
673
11.7k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
11.7k
      SmallVector<const SCEV *, 2> Operands;
675
11.7k
      bool Changed = false;
676
23.5k
      for (auto *Op : Expr->operands()) {
677
23.5k
        Operands.push_back(((SC*)this)->visit(Op));
678
23.5k
        Changed |= Op != Operands.back();
679
23.5k
      }
680
11.7k
      return !Changed ? 
Expr11.3k
:
SE.getUMaxExpr(Operands)362
;
681
11.7k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
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
673
16
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
16
      SmallVector<const SCEV *, 2> Operands;
675
16
      bool Changed = false;
676
32
      for (auto *Op : Expr->operands()) {
677
32
        Operands.push_back(((SC*)this)->visit(Op));
678
32
        Changed |= Op != Operands.back();
679
32
      }
680
16
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
681
16
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
673
15
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
674
15
      SmallVector<const SCEV *, 2> Operands;
675
15
      bool Changed = false;
676
30
      for (auto *Op : Expr->operands()) {
677
30
        Operands.push_back(((SC*)this)->visit(Op));
678
30
        Changed |= Op != Operands.back();
679
30
      }
680
15
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
681
15
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
682
683
2.30M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
684
2.30M
      return Expr;
685
2.30M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
683
2.30M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
684
2.30M
      return Expr;
685
2.30M
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
683
2.41k
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
684
2.41k
      return Expr;
685
2.41k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
683
605
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
684
605
      return Expr;
685
605
    }
686
687
301k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
688
301k
      return Expr;
689
301k
    }
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
687
301k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
688
301k
      return Expr;
689
301k
    }
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: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::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*)
690
  };
691
692
  using ValueToValueMap = DenseMap<const Value *, Value *>;
693
694
  /// The SCEVParameterRewriter takes a scalar evolution expression and updates
695
  /// the SCEVUnknown components following the Map (Value -> Value).
696
  class SCEVParameterRewriter : public SCEVRewriteVisitor<SCEVParameterRewriter> {
697
  public:
698
    static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
699
                               ValueToValueMap &Map,
700
277
                               bool InterpretConsts = false) {
701
277
      SCEVParameterRewriter Rewriter(SE, Map, InterpretConsts);
702
277
      return Rewriter.visit(Scev);
703
277
    }
704
705
    SCEVParameterRewriter(ScalarEvolution &SE, ValueToValueMap &M, bool C)
706
277
      : SCEVRewriteVisitor(SE), Map(M), InterpretConsts(C) {}
707
708
58
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
709
58
      Value *V = Expr->getValue();
710
58
      if (Map.count(V)) {
711
6
        Value *NV = Map[V];
712
6
        if (InterpretConsts && 
isa<ConstantInt>(NV)4
)
713
4
          return SE.getConstant(cast<ConstantInt>(NV));
714
2
        return SE.getUnknown(NV);
715
2
      }
716
52
      return Expr;
717
52
    }
718
719
  private:
720
    ValueToValueMap &Map;
721
    bool InterpretConsts;
722
  };
723
724
  using LoopToScevMapT = DenseMap<const Loop *, const SCEV *>;
725
726
  /// The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies
727
  /// the Map (Loop -> SCEV) to all AddRecExprs.
728
  class SCEVLoopAddRecRewriter
729
      : public SCEVRewriteVisitor<SCEVLoopAddRecRewriter> {
730
  public:
731
    SCEVLoopAddRecRewriter(ScalarEvolution &SE, LoopToScevMapT &M)
732
688
        : SCEVRewriteVisitor(SE), Map(M) {}
733
734
    static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
735
688
                               ScalarEvolution &SE) {
736
688
      SCEVLoopAddRecRewriter Rewriter(SE, Map);
737
688
      return Rewriter.visit(Scev);
738
688
    }
739
740
664
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
741
664
      SmallVector<const SCEV *, 2> Operands;
742
664
      for (const SCEV *Op : Expr->operands())
743
1.33k
        Operands.push_back(visit(Op));
744
664
745
664
      const Loop *L = Expr->getLoop();
746
664
      const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags());
747
664
748
664
      if (0 == Map.count(L))
749
1
        return Res;
750
663
751
663
      const SCEVAddRecExpr *Rec = cast<SCEVAddRecExpr>(Res);
752
663
      return Rec->evaluateAtIteration(Map[L], SE);
753
663
    }
754
755
  private:
756
    LoopToScevMapT &Map;
757
  };
758
759
} // end namespace llvm
760
761
#endif // LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H