Coverage Report

Created: 2019-03-24 22:13

/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.47M
      SCEV(ID, scConstant, 1), V(v) {}
54
55
  public:
56
350M
    ConstantInt *getValue() const { return V; }
57
211M
    const APInt &getAPInt() const { return getValue()->getValue(); }
58
59
103M
    Type *getType() const { return V->getType(); }
60
61
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
62
558M
    static bool classof(const SCEV *S) {
63
558M
      return S->getSCEVType() == scConstant;
64
558M
    }
65
  };
66
67
13.8M
  static unsigned short computeExpressionSize(ArrayRef<const SCEV *> Args) {
68
13.8M
    APInt Size(16, 1);
69
13.8M
    for (auto *Arg : Args)
70
27.6M
      Size = Size.uadd_sat(APInt(16, Arg->getExpressionSize()));
71
13.8M
    return (unsigned short)Size.getZExtValue();
72
13.8M
  }
73
74
  /// This is the base class for unary cast operator classes.
75
  class SCEVCastExpr : public SCEV {
76
  protected:
77
    const SCEV *Op;
78
    Type *Ty;
79
80
    SCEVCastExpr(const FoldingSetNodeIDRef ID,
81
                 unsigned SCEVTy, const SCEV *op, Type *ty);
82
83
  public:
84
35.5M
    const SCEV *getOperand() const { return Op; }
85
10.8M
    Type *getType() const { return Ty; }
86
87
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
88
28.6M
    static bool classof(const SCEV *S) {
89
28.6M
      return S->getSCEVType() == scTruncate ||
90
28.6M
             
S->getSCEVType() == scZeroExtend28.3M
||
91
28.6M
             
S->getSCEVType() == scSignExtend27.2M
;
92
28.6M
    }
93
  };
94
95
  /// This class represents a truncation of an integer value to a
96
  /// smaller integer value.
97
  class SCEVTruncateExpr : public SCEVCastExpr {
98
    friend class ScalarEvolution;
99
100
    SCEVTruncateExpr(const FoldingSetNodeIDRef ID,
101
                     const SCEV *op, Type *ty);
102
103
  public:
104
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
105
61.5M
    static bool classof(const SCEV *S) {
106
61.5M
      return S->getSCEVType() == scTruncate;
107
61.5M
    }
108
  };
109
110
  /// This class represents a zero extension of a small integer value
111
  /// to a larger integer value.
112
  class SCEVZeroExtendExpr : public SCEVCastExpr {
113
    friend class ScalarEvolution;
114
115
    SCEVZeroExtendExpr(const FoldingSetNodeIDRef ID,
116
                       const SCEV *op, Type *ty);
117
118
  public:
119
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
120
31.4M
    static bool classof(const SCEV *S) {
121
31.4M
      return S->getSCEVType() == scZeroExtend;
122
31.4M
    }
123
  };
124
125
  /// This class represents a sign extension of a small integer value
126
  /// to a larger integer value.
127
  class SCEVSignExtendExpr : public SCEVCastExpr {
128
    friend class ScalarEvolution;
129
130
    SCEVSignExtendExpr(const FoldingSetNodeIDRef ID,
131
                       const SCEV *op, Type *ty);
132
133
  public:
134
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
135
31.5M
    static bool classof(const SCEV *S) {
136
31.5M
      return S->getSCEVType() == scSignExtend;
137
31.5M
    }
138
  };
139
140
  /// This node is a base class providing common functionality for
141
  /// n'ary operators.
142
  class SCEVNAryExpr : public SCEV {
143
  protected:
144
    // Since SCEVs are immutable, ScalarEvolution allocates operand
145
    // arrays with its SCEVAllocator, so this class just needs a simple
146
    // pointer rather than a more elaborate vector-like data structure.
147
    // This also avoids the need for a non-trivial destructor.
148
    const SCEV *const *Operands;
149
    size_t NumOperands;
150
151
    SCEVNAryExpr(const FoldingSetNodeIDRef ID, enum SCEVTypes T,
152
                 const SCEV *const *O, size_t N)
153
        : SCEV(ID, T, computeExpressionSize(makeArrayRef(O, N))), Operands(O),
154
12.0M
          NumOperands(N) {}
155
156
  public:
157
163M
    size_t getNumOperands() const { return NumOperands; }
158
159
291M
    const SCEV *getOperand(unsigned i) const {
160
291M
      assert(i < NumOperands && "Operand index out of range!");
161
291M
      return Operands[i];
162
291M
    }
163
164
    using op_iterator = const SCEV *const *;
165
    using op_range = iterator_range<op_iterator>;
166
167
151M
    op_iterator op_begin() const { return Operands; }
168
151M
    op_iterator op_end() const { return Operands + NumOperands; }
169
93.4M
    op_range operands() const {
170
93.4M
      return make_range(op_begin(), op_end());
171
93.4M
    }
172
173
63.2M
    Type *getType() const { return getOperand(0)->getType(); }
174
175
35.6M
    NoWrapFlags getNoWrapFlags(NoWrapFlags Mask = NoWrapMask) const {
176
35.6M
      return (NoWrapFlags)(SubclassData & Mask);
177
35.6M
    }
178
179
10.1M
    bool hasNoUnsignedWrap() const {
180
10.1M
      return getNoWrapFlags(FlagNUW) != FlagAnyWrap;
181
10.1M
    }
182
183
11.0M
    bool hasNoSignedWrap() const {
184
11.0M
      return getNoWrapFlags(FlagNSW) != FlagAnyWrap;
185
11.0M
    }
186
187
67.0k
    bool hasNoSelfWrap() const {
188
67.0k
      return getNoWrapFlags(FlagNW) != FlagAnyWrap;
189
67.0k
    }
190
191
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
192
21.1M
    static bool classof(const SCEV *S) {
193
21.1M
      return S->getSCEVType() == scAddExpr ||
194
21.1M
             
S->getSCEVType() == scMulExpr10.7M
||
195
21.1M
             
S->getSCEVType() == scSMaxExpr3.68M
||
196
21.1M
             
S->getSCEVType() == scUMaxExpr3.53M
||
197
21.1M
             
S->getSCEVType() == scAddRecExpr3.38M
;
198
21.1M
    }
199
  };
200
201
  /// This node is the base class for n'ary commutative operators.
202
  class SCEVCommutativeExpr : public SCEVNAryExpr {
203
  protected:
204
    SCEVCommutativeExpr(const FoldingSetNodeIDRef ID,
205
                        enum SCEVTypes T, const SCEV *const *O, size_t N)
206
6.59M
      : SCEVNAryExpr(ID, T, O, N) {}
207
208
  public:
209
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
210
2.55M
    static bool classof(const SCEV *S) {
211
2.55M
      return S->getSCEVType() == scAddExpr ||
212
2.55M
             
S->getSCEVType() == scMulExpr1.69M
||
213
2.55M
             
S->getSCEVType() == scSMaxExpr1.35M
||
214
2.55M
             
S->getSCEVType() == scUMaxExpr1.32M
;
215
2.55M
    }
216
217
    /// Set flags for a non-recurrence without clearing previously set flags.
218
21.4M
    void setNoWrapFlags(NoWrapFlags Flags) {
219
21.4M
      SubclassData |= Flags;
220
21.4M
    }
221
  };
222
223
  /// This node represents an addition of some number of SCEVs.
224
  class SCEVAddExpr : public SCEVCommutativeExpr {
225
    friend class ScalarEvolution;
226
227
    SCEVAddExpr(const FoldingSetNodeIDRef ID,
228
                const SCEV *const *O, size_t N)
229
5.05M
      : SCEVCommutativeExpr(ID, scAddExpr, O, N) {}
230
231
  public:
232
29.7M
    Type *getType() const {
233
29.7M
      // Use the type of the last operand, which is likely to be a pointer
234
29.7M
      // type, if there is one. This doesn't usually matter, but it can help
235
29.7M
      // reduce casts when the expressions are expanded.
236
29.7M
      return getOperand(getNumOperands() - 1)->getType();
237
29.7M
    }
238
239
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
240
188M
    static bool classof(const SCEV *S) {
241
188M
      return S->getSCEVType() == scAddExpr;
242
188M
    }
243
  };
244
245
  /// This node represents multiplication of some number of SCEVs.
246
  class SCEVMulExpr : public SCEVCommutativeExpr {
247
    friend class ScalarEvolution;
248
249
    SCEVMulExpr(const FoldingSetNodeIDRef ID,
250
                const SCEV *const *O, size_t N)
251
1.43M
      : SCEVCommutativeExpr(ID, scMulExpr, O, N) {}
252
253
  public:
254
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
255
162M
    static bool classof(const SCEV *S) {
256
162M
      return S->getSCEVType() == scMulExpr;
257
162M
    }
258
  };
259
260
  /// This class represents a binary unsigned division operation.
261
  class SCEVUDivExpr : public SCEV {
262
    friend class ScalarEvolution;
263
264
    const SCEV *LHS;
265
    const SCEV *RHS;
266
267
    SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs)
268
        : SCEV(ID, scUDivExpr, computeExpressionSize({lhs, rhs})), LHS(lhs),
269
186k
          RHS(rhs) {}
270
271
  public:
272
7.40M
    const SCEV *getLHS() const { return LHS; }
273
8.51M
    const SCEV *getRHS() const { return RHS; }
274
275
1.07M
    Type *getType() const {
276
1.07M
      // In most cases the types of LHS and RHS will be the same, but in some
277
1.07M
      // crazy cases one or the other may be a pointer. ScalarEvolution doesn't
278
1.07M
      // depend on the type for correctness, but handling types carefully can
279
1.07M
      // avoid extra casts in the SCEVExpander. The LHS is more likely to be
280
1.07M
      // a pointer type than the RHS, so use the RHS' type here.
281
1.07M
      return getRHS()->getType();
282
1.07M
    }
283
284
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
285
27.1M
    static bool classof(const SCEV *S) {
286
27.1M
      return S->getSCEVType() == scUDivExpr;
287
27.1M
    }
288
  };
289
290
  /// This node represents a polynomial recurrence on the trip count
291
  /// of the specified loop.  This is the primary focus of the
292
  /// ScalarEvolution framework; all the other SCEV subclasses are
293
  /// mostly just supporting infrastructure to allow SCEVAddRecExpr
294
  /// expressions to be created and analyzed.
295
  ///
296
  /// All operands of an AddRec are required to be loop invariant.
297
  ///
298
  class SCEVAddRecExpr : public SCEVNAryExpr {
299
    friend class ScalarEvolution;
300
301
    const Loop *L;
302
303
    SCEVAddRecExpr(const FoldingSetNodeIDRef ID,
304
                   const SCEV *const *O, size_t N, const Loop *l)
305
5.40M
      : SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {}
306
307
  public:
308
41.3M
    const SCEV *getStart() const { return Operands[0]; }
309
74.5M
    const Loop *getLoop() const { return L; }
310
311
    /// Constructs and returns the recurrence indicating how much this
312
    /// expression steps by.  If this is a polynomial of degree N, it
313
    /// returns a chrec of degree N-1.  We cannot determine whether
314
    /// the step recurrence has self-wraparound.
315
21.3M
    const SCEV *getStepRecurrence(ScalarEvolution &SE) const {
316
21.3M
      if (isAffine()) 
return getOperand(1)21.3M
;
317
134
      return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1,
318
134
                                                           op_end()),
319
134
                              getLoop(), FlagAnyWrap);
320
134
    }
321
322
    /// Return true if this represents an expression A + B*x where A
323
    /// and B are loop invariant values.
324
44.4M
    bool isAffine() const {
325
44.4M
      // We know that the start value is invariant.  This expression is thus
326
44.4M
      // affine iff the step is also invariant.
327
44.4M
      return getNumOperands() == 2;
328
44.4M
    }
329
330
    /// Return true if this represents an expression A + B*x + C*x^2
331
    /// where A, B and C are loop invariant values.  This corresponds
332
    /// to an addrec of the form {L,+,M,+,N}
333
206k
    bool isQuadratic() const {
334
206k
      return getNumOperands() == 3;
335
206k
    }
336
337
    /// Set flags for a recurrence without clearing any previously set flags.
338
    /// For AddRec, either NUW or NSW implies NW. Keep track of this fact here
339
    /// to make it easier to propagate flags.
340
20.5M
    void setNoWrapFlags(NoWrapFlags Flags) {
341
20.5M
      if (Flags & (FlagNUW | FlagNSW))
342
5.18M
        Flags = ScalarEvolution::setFlags(Flags, FlagNW);
343
20.5M
      SubclassData |= Flags;
344
20.5M
    }
345
346
    /// Return the value of this chain of recurrences at the specified
347
    /// iteration number.
348
    const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const;
349
350
    /// Return the number of iterations of this loop that produce
351
    /// values in the specified constant range.  Another way of
352
    /// looking at this is that it returns the first iteration number
353
    /// where the value is not in the condition, thus computing the
354
    /// exit count.  If the iteration count can't be computed, an
355
    /// instance of SCEVCouldNotCompute is returned.
356
    const SCEV *getNumIterationsInRange(const ConstantRange &Range,
357
                                        ScalarEvolution &SE) const;
358
359
    /// Return an expression representing the value of this expression
360
    /// one iteration of the loop ahead.
361
    const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const;
362
363
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
364
280M
    static bool classof(const SCEV *S) {
365
280M
      return S->getSCEVType() == scAddRecExpr;
366
280M
    }
367
  };
368
369
  /// This class represents a signed maximum selection.
370
  class SCEVSMaxExpr : public SCEVCommutativeExpr {
371
    friend class ScalarEvolution;
372
373
    SCEVSMaxExpr(const FoldingSetNodeIDRef ID,
374
                 const SCEV *const *O, size_t N)
375
51.5k
      : SCEVCommutativeExpr(ID, scSMaxExpr, O, N) {
376
51.5k
      // Max never overflows.
377
51.5k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
378
51.5k
    }
379
380
  public:
381
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
382
18.3M
    static bool classof(const SCEV *S) {
383
18.3M
      return S->getSCEVType() == scSMaxExpr;
384
18.3M
    }
385
  };
386
387
  /// This class represents an unsigned maximum selection.
388
  class SCEVUMaxExpr : public SCEVCommutativeExpr {
389
    friend class ScalarEvolution;
390
391
    SCEVUMaxExpr(const FoldingSetNodeIDRef ID,
392
                 const SCEV *const *O, size_t N)
393
52.5k
      : SCEVCommutativeExpr(ID, scUMaxExpr, O, N) {
394
52.5k
      // Max never overflows.
395
52.5k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
396
52.5k
    }
397
398
  public:
399
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
400
17.0M
    static bool classof(const SCEV *S) {
401
17.0M
      return S->getSCEVType() == scUMaxExpr;
402
17.0M
    }
403
  };
404
405
  /// This means that we are dealing with an entirely unknown SCEV
406
  /// value, and only represent it as its LLVM Value.  This is the
407
  /// "bottom" value for the analysis.
408
  class SCEVUnknown final : public SCEV, private CallbackVH {
409
    friend class ScalarEvolution;
410
411
    /// The parent ScalarEvolution value. This is used to update the
412
    /// parent's maps when the value associated with a SCEVUnknown is
413
    /// deleted or RAUW'd.
414
    ScalarEvolution *SE;
415
416
    /// The next pointer in the linked list of all SCEVUnknown
417
    /// instances owned by a ScalarEvolution.
418
    SCEVUnknown *Next;
419
420
    SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V,
421
                ScalarEvolution *se, SCEVUnknown *next) :
422
3.65M
      SCEV(ID, scUnknown, 1), CallbackVH(V), SE(se), Next(next) {}
423
424
    // Implement CallbackVH.
425
    void deleted() override;
426
    void allUsesReplacedWith(Value *New) override;
427
428
  public:
429
63.1M
    Value *getValue() const { return getValPtr(); }
430
431
    /// @{
432
    /// Test whether this is a special constant representing a type
433
    /// size, alignment, or field offset in a target-independent
434
    /// manner, and hasn't happened to have been folded with other
435
    /// operations into something unrecognizable. This is mainly only
436
    /// useful for pretty-printing and other situations where it isn't
437
    /// absolutely required for these to succeed.
438
    bool isSizeOf(Type *&AllocTy) const;
439
    bool isAlignOf(Type *&AllocTy) const;
440
    bool isOffsetOf(Type *&STy, Constant *&FieldNo) const;
441
    /// @}
442
443
46.7M
    Type *getType() const { return getValPtr()->getType(); }
444
445
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
446
257M
    static bool classof(const SCEV *S) {
447
257M
      return S->getSCEVType() == scUnknown;
448
257M
    }
449
  };
450
451
  /// This class defines a simple visitor class that may be used for
452
  /// various SCEV analysis purposes.
453
  template<typename SC, typename RetVal=void>
454
  struct SCEVVisitor {
455
19.6M
    RetVal visit(const SCEV *S) {
456
19.6M
      switch (S->getSCEVType()) {
457
19.6M
      case scConstant:
458
6.18M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
19.6M
      case scTruncate:
460
50.5k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
19.6M
      case scZeroExtend:
462
245k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
19.6M
      case scSignExtend:
464
655k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
19.6M
      case scAddExpr:
466
2.19M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
19.6M
      case scMulExpr:
468
891k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
19.6M
      case scUDivExpr:
470
92.2k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
19.6M
      case scAddRecExpr:
472
4.04M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
19.6M
      case scSMaxExpr:
474
58.5k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
19.6M
      case scUMaxExpr:
476
25.2k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
19.6M
      case scUnknown:
478
4.93M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
19.6M
      case scCouldNotCompute:
480
302k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
19.6M
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
19.6M
      }
484
19.6M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
339k
    RetVal visit(const SCEV *S) {
456
339k
      switch (S->getSCEVType()) {
457
339k
      case scConstant:
458
215k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
339k
      case scTruncate:
460
762
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
339k
      case scZeroExtend:
462
4.36k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
339k
      case scSignExtend:
464
24.1k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
339k
      case scAddExpr:
466
4.63k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
339k
      case scMulExpr:
468
30.8k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
339k
      case scUDivExpr:
470
934
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
339k
      case scAddRecExpr:
472
470
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
339k
      case scSMaxExpr:
474
785
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
339k
      case scUMaxExpr:
476
682
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
339k
      case scUnknown:
478
56.3k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
339k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
339k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
339k
      }
484
339k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVShiftRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
394k
    RetVal visit(const SCEV *S) {
456
394k
      switch (S->getSCEVType()) {
457
394k
      case scConstant:
458
33.8k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
394k
      case scTruncate:
460
1.25k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
394k
      case scZeroExtend:
462
6.36k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
394k
      case scSignExtend:
464
980
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
394k
      case scAddExpr:
466
1.87k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
394k
      case scMulExpr:
468
16.4k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
394k
      case scUDivExpr:
470
16.1k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
394k
      case scAddRecExpr:
472
11.1k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
394k
      case scSMaxExpr:
474
769
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
394k
      case scUMaxExpr:
476
394
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
394k
      case scUnknown:
478
305k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
394k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
394k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
394k
      }
484
394k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVInitRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
1.74M
    RetVal visit(const SCEV *S) {
456
1.74M
      switch (S->getSCEVType()) {
457
1.74M
      case scConstant:
458
370k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
1.74M
      case scTruncate:
460
6.54k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
1.74M
      case scZeroExtend:
462
58.2k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
1.74M
      case scSignExtend:
464
55.3k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
1.74M
      case scAddExpr:
466
70.9k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
1.74M
      case scMulExpr:
468
42.9k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
1.74M
      case scUDivExpr:
470
8.74k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
1.74M
      case scAddRecExpr:
472
529k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
1.74M
      case scSMaxExpr:
474
21.1k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
1.74M
      case scUMaxExpr:
476
3.80k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
1.74M
      case scUnknown:
478
271k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
1.74M
      case scCouldNotCompute:
480
302k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
1.74M
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
1.74M
      }
484
1.74M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPostIncRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
1.29M
    RetVal visit(const SCEV *S) {
456
1.29M
      switch (S->getSCEVType()) {
457
1.29M
      case scConstant:
458
354k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
1.29M
      case scTruncate:
460
5.05k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
1.29M
      case scZeroExtend:
462
47.1k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
1.29M
      case scSignExtend:
464
37.4k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
1.29M
      case scAddExpr:
466
56.1k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
1.29M
      case scMulExpr:
468
40.6k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
1.29M
      case scUDivExpr:
470
8.28k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
1.29M
      case scAddRecExpr:
472
518k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
1.29M
      case scSMaxExpr:
474
20.9k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
1.29M
      case scUMaxExpr:
476
3.77k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
1.29M
      case scUnknown:
478
207k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
1.29M
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
1.29M
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
1.29M
      }
484
1.29M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVDivision, void>::visit(llvm::SCEV const*)
Line
Count
Source
455
14.5k
    RetVal visit(const SCEV *S) {
456
14.5k
      switch (S->getSCEVType()) {
457
14.5k
      case scConstant:
458
2.39k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
14.5k
      case scTruncate:
460
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
14.5k
      case scZeroExtend:
462
20
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
14.5k
      case scSignExtend:
464
62
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
14.5k
      case scAddExpr:
466
623
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
14.5k
      case scMulExpr:
468
4.25k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
14.5k
      case scUDivExpr:
470
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
14.5k
      case scAddRecExpr:
472
5.60k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
14.5k
      case scSMaxExpr:
474
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
14.5k
      case scUMaxExpr:
476
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
14.5k
      case scUnknown:
478
1.62k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
14.5k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
14.5k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
14.5k
      }
484
14.5k
    }
llvm::SCEVVisitor<llvm::SCEVParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
383
    RetVal visit(const SCEV *S) {
456
383
      switch (S->getSCEVType()) {
457
383
      case scConstant:
458
267
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
383
      case scTruncate:
460
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
383
      case scZeroExtend:
462
2
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
383
      case scSignExtend:
464
2
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
383
      case scAddExpr:
466
13
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
383
      case scMulExpr:
468
35
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
383
      case scUDivExpr:
470
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
383
      case scAddRecExpr:
472
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
383
      case scSMaxExpr:
474
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
383
      case scUMaxExpr:
476
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
383
      case scUnknown:
478
58
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
383
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
383
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
383
      }
484
383
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPredicateRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
1.93M
    RetVal visit(const SCEV *S) {
456
1.93M
      switch (S->getSCEVType()) {
457
1.93M
      case scConstant:
458
593k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
1.93M
      case scTruncate:
460
4.76k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
1.93M
      case scZeroExtend:
462
14.3k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
1.93M
      case scSignExtend:
464
120k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
1.93M
      case scAddExpr:
466
225k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
1.93M
      case scMulExpr:
468
164k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
1.93M
      case scUDivExpr:
470
4.47k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
1.93M
      case scAddRecExpr:
472
302k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
1.93M
      case scSMaxExpr:
474
4.40k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
1.93M
      case scUMaxExpr:
476
4.01k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
1.93M
      case scUnknown:
478
499k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
1.93M
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
1.93M
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
1.93M
      }
484
1.93M
    }
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
455
2.46M
    RetVal visit(const SCEV *S) {
456
2.46M
      switch (S->getSCEVType()) {
457
2.46M
      case scConstant:
458
501k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
2.46M
      case scTruncate:
460
937
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
2.46M
      case scZeroExtend:
462
4.03k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
2.46M
      case scSignExtend:
464
3.84k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
2.46M
      case scAddExpr:
466
420k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
2.46M
      case scMulExpr:
468
25.4k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
2.46M
      case scUDivExpr:
470
5.23k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
2.46M
      case scAddRecExpr:
472
275k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
2.46M
      case scSMaxExpr:
474
1.25k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
2.46M
      case scUMaxExpr:
476
808
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
2.46M
      case scUnknown:
478
1.22M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
2.46M
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
2.46M
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
2.46M
      }
484
2.46M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
11.3M
    RetVal visit(const SCEV *S) {
456
11.3M
      switch (S->getSCEVType()) {
457
11.3M
      case scConstant:
458
4.01M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
11.3M
      case scTruncate:
460
30.7k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
11.3M
      case scZeroExtend:
462
109k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
11.3M
      case scSignExtend:
464
409k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
11.3M
      case scAddExpr:
466
1.40M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
11.3M
      case scMulExpr:
468
558k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
11.3M
      case scUDivExpr:
470
47.6k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
11.3M
      case scAddRecExpr:
472
2.36M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
11.3M
      case scSMaxExpr:
474
7.70k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
11.3M
      case scUMaxExpr:
476
11.6k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
11.3M
      case scUnknown:
478
2.34M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
11.3M
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
11.3M
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
11.3M
      }
484
11.3M
    }
StackSafetyAnalysis.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
556
    RetVal visit(const SCEV *S) {
456
556
      switch (S->getSCEVType()) {
457
556
      case scConstant:
458
0
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
556
      case scTruncate:
460
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
556
      case scZeroExtend:
462
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
556
      case scSignExtend:
464
0
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
556
      case scAddExpr:
466
136
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
556
      case scMulExpr:
468
0
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
556
      case scUDivExpr:
470
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
556
      case scAddRecExpr:
472
8
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
556
      case scSMaxExpr:
474
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
556
      case scUMaxExpr:
476
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
556
      case scUnknown:
478
412
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
556
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
556
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
556
      }
484
556
    }
SafeStack.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
196
    RetVal visit(const SCEV *S) {
456
196
      switch (S->getSCEVType()) {
457
196
      case scConstant:
458
31
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
196
      case scTruncate:
460
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
196
      case scZeroExtend:
462
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
196
      case scSignExtend:
464
3
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
196
      case scAddExpr:
466
34
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
196
      case scMulExpr:
468
6
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
196
      case scUDivExpr:
470
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
196
      case scAddRecExpr:
472
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
196
      case scSMaxExpr:
474
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
196
      case scUMaxExpr:
476
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
196
      case scUnknown:
478
122
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
196
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
196
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
196
      }
484
196
    }
ScopDetection.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVRemoveMax, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
12.0k
    RetVal visit(const SCEV *S) {
456
12.0k
      switch (S->getSCEVType()) {
457
12.0k
      case scConstant:
458
2.84k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
12.0k
      case scTruncate:
460
4
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
12.0k
      case scZeroExtend:
462
54
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
12.0k
      case scSignExtend:
464
188
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
12.0k
      case scAddExpr:
466
576
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
12.0k
      case scMulExpr:
468
2.62k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
12.0k
      case scUDivExpr:
470
12
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
12.0k
      case scAddRecExpr:
472
3.27k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
12.0k
      case scSMaxExpr:
474
68
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
12.0k
      case scUMaxExpr:
476
16
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
12.0k
      case scUnknown:
478
2.41k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
12.0k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
12.0k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
12.0k
      }
484
12.0k
    }
ScopInfo.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
14.3k
    RetVal visit(const SCEV *S) {
456
14.3k
      switch (S->getSCEVType()) {
457
14.3k
      case scConstant:
458
6.44k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
14.3k
      case scTruncate:
460
77
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
14.3k
      case scZeroExtend:
462
151
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
14.3k
      case scSignExtend:
464
335
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
14.3k
      case scAddExpr:
466
306
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
14.3k
      case scMulExpr:
468
202
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
14.3k
      case scUDivExpr:
470
145
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
14.3k
      case scAddRecExpr:
472
316
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
14.3k
      case scSMaxExpr:
474
61
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
14.3k
      case scUMaxExpr:
476
15
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
14.3k
      case scUnknown:
478
6.29k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
14.3k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
14.3k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
14.3k
      }
484
14.3k
    }
llvm::SCEVVisitor<llvm::SCEVLoopAddRecRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
2.41k
    RetVal visit(const SCEV *S) {
456
2.41k
      switch (S->getSCEVType()) {
457
2.41k
      case scConstant:
458
883
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
2.41k
      case scTruncate:
460
2
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
2.41k
      case scZeroExtend:
462
11
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
2.41k
      case scSignExtend:
464
28
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
2.41k
      case scAddExpr:
466
124
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
2.41k
      case scMulExpr:
468
67
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
2.41k
      case scUDivExpr:
470
5
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
2.41k
      case scAddRecExpr:
472
678
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
2.41k
      case scSMaxExpr:
474
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
2.41k
      case scUMaxExpr:
476
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
2.41k
      case scUnknown:
478
616
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
2.41k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
2.41k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
2.41k
      }
484
2.41k
    }
llvm::SCEVVisitor<polly::SCEVAffinator, std::__1::pair<isl::noexceptions::pw_aff, isl::noexceptions::set> >::visit(llvm::SCEV const*)
Line
Count
Source
455
10.7k
    RetVal visit(const SCEV *S) {
456
10.7k
      switch (S->getSCEVType()) {
457
10.7k
      case scConstant:
458
5.37k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
10.7k
      case scTruncate:
460
51
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
10.7k
      case scZeroExtend:
462
112
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
10.7k
      case scSignExtend:
464
376
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
10.7k
      case scAddExpr:
466
268
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
10.7k
      case scMulExpr:
468
1
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
10.7k
      case scUDivExpr:
470
53
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
10.7k
      case scAddRecExpr:
472
4.31k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
10.7k
      case scSMaxExpr:
474
69
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
10.7k
      case scUMaxExpr:
476
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
10.7k
      case scUnknown:
478
93
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
10.7k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
10.7k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
10.7k
      }
484
10.7k
    }
llvm::SCEVVisitor<SCEVValidator, ValidatorResult>::visit(llvm::SCEV const*)
Line
Count
Source
455
145k
    RetVal visit(const SCEV *S) {
456
145k
      switch (S->getSCEVType()) {
457
145k
      case scConstant:
458
85.2k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
145k
      case scTruncate:
460
283
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
145k
      case scZeroExtend:
462
818
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
145k
      case scSignExtend:
464
2.68k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
145k
      case scAddExpr:
466
3.32k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
145k
      case scMulExpr:
468
4.45k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
145k
      case scUDivExpr:
470
410
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
145k
      case scAddRecExpr:
472
30.3k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
145k
      case scSMaxExpr:
474
1.41k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
145k
      case scUMaxExpr:
476
39
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
145k
      case scUnknown:
478
16.9k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
145k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
145k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
145k
      }
484
145k
    }
llvm::SCEVVisitor<ScopExpander, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
455
3.82k
    RetVal visit(const SCEV *S) {
456
3.82k
      switch (S->getSCEVType()) {
457
3.82k
      case scConstant:
458
934
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
459
3.82k
      case scTruncate:
460
74
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
461
3.82k
      case scZeroExtend:
462
22
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
463
3.82k
      case scSignExtend:
464
36
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
465
3.82k
      case scAddExpr:
466
514
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
467
3.82k
      case scMulExpr:
468
573
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
469
3.82k
      case scUDivExpr:
470
13
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
471
3.82k
      case scAddRecExpr:
472
38
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
473
3.82k
      case scSMaxExpr:
474
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
475
3.82k
      case scUMaxExpr:
476
2
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
477
3.82k
      case scUnknown:
478
1.61k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
479
3.82k
      case scCouldNotCompute:
480
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
481
3.82k
      default:
482
0
        llvm_unreachable("Unknown SCEV type!");
483
3.82k
      }
484
3.82k
    }
485
486
0
    RetVal visitCouldNotCompute(const SCEVCouldNotCompute *S) {
487
0
      llvm_unreachable("Invalid use of SCEVCouldNotCompute!");
488
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*)
489
  };
490
491
  /// Visit all nodes in the expression tree using worklist traversal.
492
  ///
493
  /// Visitor implements:
494
  ///   // return true to follow this node.
495
  ///   bool follow(const SCEV *S);
496
  ///   // return true to terminate the search.
497
  ///   bool isDone();
498
  template<typename SV>
499
  class SCEVTraversal {
500
    SV &Visitor;
501
    SmallVector<const SCEV *, 8> Worklist;
502
    SmallPtrSet<const SCEV *, 8> Visited;
503
504
334M
    void push(const SCEV *S) {
505
334M
      if (Visited.insert(S).second && 
Visitor.follow(S)315M
)
506
311M
        Worklist.push_back(S);
507
334M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::push(llvm::SCEV const*)
Line
Count
Source
504
5.76M
    void push(const SCEV *S) {
505
5.76M
      if (Visited.insert(S).second && 
Visitor.follow(S)5.76M
)
506
2.30M
        Worklist.push_back(S);
507
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
504
482k
    void push(const SCEV *S) {
505
482k
      if (Visited.insert(S).second && 
Visitor.follow(S)466k
)
506
247k
        Worklist.push_back(S);
507
482k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::push(llvm::SCEV const*)
Line
Count
Source
504
181
    void push(const SCEV *S) {
505
181
      if (Visited.insert(S).second && 
Visitor.follow(S)175
)
506
175
        Worklist.push_back(S);
507
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
504
3.69k
    void push(const SCEV *S) {
505
3.69k
      if (Visited.insert(S).second && 
Visitor.follow(S)3.68k
)
506
3.66k
        Worklist.push_back(S);
507
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
504
116M
    void push(const SCEV *S) {
505
116M
      if (Visited.insert(S).second && 
Visitor.follow(S)110M
)
506
110M
        Worklist.push_back(S);
507
116M
    }
llvm::SCEVTraversal<bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
504
2.68M
    void push(const SCEV *S) {
505
2.68M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.65M
)
506
2.40M
        Worklist.push_back(S);
507
2.68M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::push(llvm::SCEV const*)
Line
Count
Source
504
17.0k
    void push(const SCEV *S) {
505
17.0k
      if (Visited.insert(S).second && 
Visitor.follow(S)14.8k
)
506
14.8k
        Worklist.push_back(S);
507
17.0k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::push(llvm::SCEV const*)
Line
Count
Source
504
4.64k
    void push(const SCEV *S) {
505
4.64k
      if (Visited.insert(S).second && 
Visitor.follow(S)4.63k
)
506
3.59k
        Worklist.push_back(S);
507
4.64k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::push(llvm::SCEV const*)
Line
Count
Source
504
13.2k
    void push(const SCEV *S) {
505
13.2k
      if (Visited.insert(S).second && 
Visitor.follow(S)12.8k
)
506
11.4k
        Worklist.push_back(S);
507
13.2k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::push(llvm::SCEV const*)
Line
Count
Source
504
2.61k
    void push(const SCEV *S) {
505
2.61k
      if (Visited.insert(S).second && 
Visitor.follow(S)2.60k
)
506
2.53k
        Worklist.push_back(S);
507
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
504
115M
    void push(const SCEV *S) {
505
115M
      if (Visited.insert(S).second && 
Visitor.follow(S)108M
)
506
108M
        Worklist.push_back(S);
507
115M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::push(llvm::SCEV const*)
Line
Count
Source
504
83.7M
    void push(const SCEV *S) {
505
83.7M
      if (Visited.insert(S).second && 
Visitor.follow(S)77.4M
)
506
77.4M
        Worklist.push_back(S);
507
83.7M
    }
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
504
7.35M
    void push(const SCEV *S) {
505
7.35M
      if (Visited.insert(S).second && 
Visitor.follow(S)7.11M
)
506
7.11M
        Worklist.push_back(S);
507
7.35M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::push(llvm::SCEV const*)
Line
Count
Source
504
2.73M
    void push(const SCEV *S) {
505
2.73M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.62M
)
506
2.62M
        Worklist.push_back(S);
507
2.73M
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::push(llvm::SCEV const*)
Line
Count
Source
504
21.0k
    void push(const SCEV *S) {
505
21.0k
      if (Visited.insert(S).second && 
Visitor.follow(S)20.8k
)
506
15.1k
        Worklist.push_back(S);
507
21.0k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::push(llvm::SCEV const*)
Line
Count
Source
504
45.3k
    void push(const SCEV *S) {
505
45.3k
      if (Visited.insert(S).second && 
Visitor.follow(S)41.9k
)
506
41.9k
        Worklist.push_back(S);
507
45.3k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::push(llvm::SCEV const*)
Line
Count
Source
504
52.9k
    void push(const SCEV *S) {
505
52.9k
      if (Visited.insert(S).second && 
Visitor.follow(S)46.6k
)
506
39.6k
        Worklist.push_back(S);
507
52.9k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::push(llvm::SCEV const*)
Line
Count
Source
504
27.7k
    void push(const SCEV *S) {
505
27.7k
      if (Visited.insert(S).second && 
Visitor.follow(S)26.9k
)
506
26.9k
        Worklist.push_back(S);
507
27.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::push(llvm::SCEV const*)
Line
Count
Source
504
78.9k
    void push(const SCEV *S) {
505
78.9k
      if (Visited.insert(S).second && 
Visitor.follow(S)72.3k
)
506
61.6k
        Worklist.push_back(S);
507
78.9k
    }
508
509
  public:
510
133M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::SCEVTraversal(containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain&)
Line
Count
Source
510
1.77M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::SCEVTraversal(IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable&)
Line
Count
Source
510
251k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::SCEVTraversal(sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize&)
Line
Count
Source
510
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
510
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
510
38.8M
    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
510
1.62M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::SCEVTraversal((anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
510
2.96k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::SCEVTraversal((anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
510
4.50k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::SCEVTraversal((anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
510
2.96k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::SCEVTraversal((anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
510
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
510
70.9M
    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
510
15.4M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure&)
Line
Count
Source
510
3.53M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::SCEVTraversal((anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
510
533k
    SCEVTraversal(SV& V): Visitor(V) {}
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::SCEVTraversal((anonymous namespace)::SCEVFindInsideScop&)
Line
Count
Source
510
17.4k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindLoops>::SCEVTraversal(polly::SCEVFindLoops&)
Line
Count
Source
510
15.9k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindValues>::SCEVTraversal(polly::SCEVFindValues&)
Line
Count
Source
510
19.8k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVHasIVParams>::SCEVTraversal(SCEVHasIVParams&)
Line
Count
Source
510
11.7k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVInRegionDependences>::SCEVTraversal(SCEVInRegionDependences&)
Line
Count
Source
510
24.6k
    SCEVTraversal(SV& V): Visitor(V) {}
511
512
133M
    void visitAll(const SCEV *Root) {
513
133M
      push(Root);
514
443M
      while (!Worklist.empty() && 
!Visitor.isDone()311M
) {
515
310M
        const SCEV *S = Worklist.pop_back_val();
516
310M
517
310M
        switch (S->getSCEVType()) {
518
310M
        case scConstant:
519
203M
        case scUnknown:
520
203M
          break;
521
203M
        case scTruncate:
522
22.1M
        case scZeroExtend:
523
22.1M
        case scSignExtend:
524
22.1M
          push(cast<SCEVCastExpr>(S)->getOperand());
525
22.1M
          break;
526
79.4M
        case scAddExpr:
527
79.4M
        case scMulExpr:
528
79.4M
        case scSMaxExpr:
529
79.4M
        case scUMaxExpr:
530
79.4M
        case scAddRecExpr:
531
79.4M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
167M
            push(Op);
533
79.4M
          break;
534
79.4M
        case scUDivExpr: {
535
5.68M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
5.68M
          push(UDiv->getLHS());
537
5.68M
          push(UDiv->getRHS());
538
5.68M
          break;
539
79.4M
        }
540
79.4M
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
79.4M
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
310M
        }
545
310M
      }
546
133M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
1.77M
    void visitAll(const SCEV *Root) {
513
1.77M
      push(Root);
514
3.76M
      while (!Worklist.empty() && 
!Visitor.isDone()2.29M
) {
515
1.99M
        const SCEV *S = Worklist.pop_back_val();
516
1.99M
517
1.99M
        switch (S->getSCEVType()) {
518
1.99M
        case scConstant:
519
0
        case scUnknown:
520
0
          break;
521
0
        case scTruncate:
522
0
        case scZeroExtend:
523
0
        case scSignExtend:
524
0
          push(cast<SCEVCastExpr>(S)->getOperand());
525
0
          break;
526
1.99M
        case scAddExpr:
527
1.99M
        case scMulExpr:
528
1.99M
        case scSMaxExpr:
529
1.99M
        case scUMaxExpr:
530
1.99M
        case scAddRecExpr:
531
1.99M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
3.99M
            push(Op);
533
1.99M
          break;
534
1.99M
        case scUDivExpr: {
535
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
0
          push(UDiv->getLHS());
537
0
          push(UDiv->getRHS());
538
0
          break;
539
1.99M
        }
540
1.99M
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
1.99M
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
1.99M
        }
545
1.99M
      }
546
1.77M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
251k
    void visitAll(const SCEV *Root) {
513
251k
      push(Root);
514
475k
      while (!Worklist.empty() && 
!Visitor.isDone()243k
) {
515
224k
        const SCEV *S = Worklist.pop_back_val();
516
224k
517
224k
        switch (S->getSCEVType()) {
518
224k
        case scConstant:
519
95.5k
        case scUnknown:
520
95.5k
          break;
521
95.5k
        case scTruncate:
522
36.3k
        case scZeroExtend:
523
36.3k
        case scSignExtend:
524
36.3k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
36.3k
          break;
526
92.7k
        case scAddExpr:
527
92.7k
        case scMulExpr:
528
92.7k
        case scSMaxExpr:
529
92.7k
        case scUMaxExpr:
530
92.7k
        case scAddRecExpr:
531
92.7k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
195k
            push(Op);
533
92.7k
          break;
534
92.7k
        case scUDivExpr: {
535
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
0
          push(UDiv->getLHS());
537
0
          push(UDiv->getRHS());
538
0
          break;
539
92.7k
        }
540
92.7k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
92.7k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
224k
        }
545
224k
      }
546
251k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
64
    void visitAll(const SCEV *Root) {
513
64
      push(Root);
514
239
      while (!Worklist.empty() && 
!Visitor.isDone()175
) {
515
175
        const SCEV *S = Worklist.pop_back_val();
516
175
517
175
        switch (S->getSCEVType()) {
518
175
        case scConstant:
519
118
        case scUnknown:
520
118
          break;
521
118
        case scTruncate:
522
0
        case scZeroExtend:
523
0
        case scSignExtend:
524
0
          push(cast<SCEVCastExpr>(S)->getOperand());
525
0
          break;
526
51
        case scAddExpr:
527
51
        case scMulExpr:
528
51
        case scSMaxExpr:
529
51
        case scUMaxExpr:
530
51
        case scAddRecExpr:
531
51
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
105
            push(Op);
533
51
          break;
534
51
        case scUDivExpr: {
535
6
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
6
          push(UDiv->getLHS());
537
6
          push(UDiv->getRHS());
538
6
          break;
539
51
        }
540
51
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
51
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
175
        }
545
175
      }
546
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
512
1.03k
    void visitAll(const SCEV *Root) {
513
1.03k
      push(Root);
514
4.68k
      while (!Worklist.empty() && 
!Visitor.isDone()3.66k
) {
515
3.64k
        const SCEV *S = Worklist.pop_back_val();
516
3.64k
517
3.64k
        switch (S->getSCEVType()) {
518
3.64k
        case scConstant:
519
2.55k
        case scUnknown:
520
2.55k
          break;
521
2.55k
        case scTruncate:
522
61
        case scZeroExtend:
523
61
        case scSignExtend:
524
61
          push(cast<SCEVCastExpr>(S)->getOperand());
525
61
          break;
526
1.03k
        case scAddExpr:
527
1.03k
        case scMulExpr:
528
1.03k
        case scSMaxExpr:
529
1.03k
        case scUMaxExpr:
530
1.03k
        case scAddRecExpr:
531
1.03k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
2.59k
            push(Op);
533
1.03k
          break;
534
1.03k
        case scUDivExpr: {
535
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
0
          push(UDiv->getLHS());
537
0
          push(UDiv->getRHS());
538
0
          break;
539
1.03k
        }
540
1.03k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
1.03k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
3.64k
        }
545
3.64k
      }
546
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
512
38.8M
    void visitAll(const SCEV *Root) {
513
38.8M
      push(Root);
514
149M
      while (!Worklist.empty() && 
!Visitor.isDone()110M
) {
515
110M
        const SCEV *S = Worklist.pop_back_val();
516
110M
517
110M
        switch (S->getSCEVType()) {
518
110M
        case scConstant:
519
69.4M
        case scUnknown:
520
69.4M
          break;
521
69.4M
        case scTruncate:
522
7.69M
        case scZeroExtend:
523
7.69M
        case scSignExtend:
524
7.69M
          push(cast<SCEVCastExpr>(S)->getOperand());
525
7.69M
          break;
526
32.5M
        case scAddExpr:
527
32.5M
        case scMulExpr:
528
32.5M
        case scSMaxExpr:
529
32.5M
        case scUMaxExpr:
530
32.5M
        case scAddRecExpr:
531
32.5M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
68.3M
            push(Op);
533
32.5M
          break;
534
32.5M
        case scUDivExpr: {
535
537k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
537k
          push(UDiv->getLHS());
537
537k
          push(UDiv->getRHS());
538
537k
          break;
539
32.5M
        }
540
32.5M
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
32.5M
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
110M
        }
545
110M
      }
546
38.8M
    }
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
512
1.62M
    void visitAll(const SCEV *Root) {
513
1.62M
      push(Root);
514
4.02M
      while (!Worklist.empty() && 
!Visitor.isDone()2.39M
) {
515
2.39M
        const SCEV *S = Worklist.pop_back_val();
516
2.39M
517
2.39M
        switch (S->getSCEVType()) {
518
2.39M
        case scConstant:
519
1.84M
        case scUnknown:
520
1.84M
          break;
521
1.84M
        case scTruncate:
522
55.9k
        case scZeroExtend:
523
55.9k
        case scSignExtend:
524
55.9k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
55.9k
          break;
526
472k
        case scAddExpr:
527
472k
        case scMulExpr:
528
472k
        case scSMaxExpr:
529
472k
        case scUMaxExpr:
530
472k
        case scAddRecExpr:
531
472k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
966k
            push(Op);
533
472k
          break;
534
472k
        case scUDivExpr: {
535
18.3k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
18.3k
          push(UDiv->getLHS());
537
18.3k
          push(UDiv->getRHS());
538
18.3k
          break;
539
472k
        }
540
472k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
472k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
2.39M
        }
545
2.39M
      }
546
1.62M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
2.96k
    void visitAll(const SCEV *Root) {
513
2.96k
      push(Root);
514
17.7k
      while (!Worklist.empty() && 
!Visitor.isDone()14.8k
) {
515
14.8k
        const SCEV *S = Worklist.pop_back_val();
516
14.8k
517
14.8k
        switch (S->getSCEVType()) {
518
14.8k
        case scConstant:
519
8.06k
        case scUnknown:
520
8.06k
          break;
521
8.06k
        case scTruncate:
522
171
        case scZeroExtend:
523
171
        case scSignExtend:
524
171
          push(cast<SCEVCastExpr>(S)->getOperand());
525
171
          break;
526
6.56k
        case scAddExpr:
527
6.56k
        case scMulExpr:
528
6.56k
        case scSMaxExpr:
529
6.56k
        case scUMaxExpr:
530
6.56k
        case scAddRecExpr:
531
6.56k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
13.8k
            push(Op);
533
6.56k
          break;
534
6.56k
        case scUDivExpr: {
535
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
8
          push(UDiv->getLHS());
537
8
          push(UDiv->getRHS());
538
8
          break;
539
6.56k
        }
540
6.56k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
6.56k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
14.8k
        }
545
14.8k
      }
546
2.96k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
4.50k
    void visitAll(const SCEV *Root) {
513
4.50k
      push(Root);
514
8.09k
      while (!Worklist.empty() && 
!Visitor.isDone()3.59k
) {
515
3.59k
        const SCEV *S = Worklist.pop_back_val();
516
3.59k
517
3.59k
        switch (S->getSCEVType()) {
518
3.59k
        case scConstant:
519
3.52k
        case scUnknown:
520
3.52k
          break;
521
3.52k
        case scTruncate:
522
2
        case scZeroExtend:
523
2
        case scSignExtend:
524
2
          push(cast<SCEVCastExpr>(S)->getOperand());
525
2
          break;
526
69
        case scAddExpr:
527
69
        case scMulExpr:
528
69
        case scSMaxExpr:
529
69
        case scUMaxExpr:
530
69
        case scAddRecExpr:
531
69
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
138
            push(Op);
533
69
          break;
534
69
        case scUDivExpr: {
535
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
0
          push(UDiv->getLHS());
537
0
          push(UDiv->getRHS());
538
0
          break;
539
69
        }
540
69
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
69
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
3.59k
        }
545
3.59k
      }
546
4.50k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
2.96k
    void visitAll(const SCEV *Root) {
513
2.96k
      push(Root);
514
14.4k
      while (!Worklist.empty() && 
!Visitor.isDone()11.4k
) {
515
11.4k
        const SCEV *S = Worklist.pop_back_val();
516
11.4k
517
11.4k
        switch (S->getSCEVType()) {
518
11.4k
        case scConstant:
519
6.26k
        case scUnknown:
520
6.26k
          break;
521
6.26k
        case scTruncate:
522
171
        case scZeroExtend:
523
171
        case scSignExtend:
524
171
          push(cast<SCEVCastExpr>(S)->getOperand());
525
171
          break;
526
5.00k
        case scAddExpr:
527
5.00k
        case scMulExpr:
528
5.00k
        case scSMaxExpr:
529
5.00k
        case scUMaxExpr:
530
5.00k
        case scAddRecExpr:
531
5.00k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
10.0k
            push(Op);
533
5.00k
          break;
534
5.00k
        case scUDivExpr: {
535
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
8
          push(UDiv->getLHS());
537
8
          push(UDiv->getRHS());
538
8
          break;
539
5.00k
        }
540
5.00k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
5.00k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
11.4k
        }
545
11.4k
      }
546
2.96k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
1.90k
    void visitAll(const SCEV *Root) {
513
1.90k
      push(Root);
514
4.44k
      while (!Worklist.empty() && 
!Visitor.isDone()2.53k
) {
515
2.53k
        const SCEV *S = Worklist.pop_back_val();
516
2.53k
517
2.53k
        switch (S->getSCEVType()) {
518
2.53k
        case scConstant:
519
2.09k
        case scUnknown:
520
2.09k
          break;
521
2.09k
        case scTruncate:
522
181
        case scZeroExtend:
523
181
        case scSignExtend:
524
181
          push(cast<SCEVCastExpr>(S)->getOperand());
525
181
          break;
526
257
        case scAddExpr:
527
257
        case scMulExpr:
528
257
        case scSMaxExpr:
529
257
        case scUMaxExpr:
530
257
        case scAddRecExpr:
531
257
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
517
            push(Op);
533
257
          break;
534
257
        case scUDivExpr: {
535
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
8
          push(UDiv->getLHS());
537
8
          push(UDiv->getRHS());
538
8
          break;
539
257
        }
540
257
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
257
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
2.53k
        }
545
2.53k
      }
546
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
512
70.9M
    void visitAll(const SCEV *Root) {
513
70.9M
      push(Root);
514
179M
      while (!Worklist.empty() && 
!Visitor.isDone()108M
) {
515
108M
        const SCEV *S = Worklist.pop_back_val();
516
108M
517
108M
        switch (S->getSCEVType()) {
518
108M
        case scConstant:
519
84.5M
        case scUnknown:
520
84.5M
          break;
521
84.5M
        case scTruncate:
522
5.73M
        case scZeroExtend:
523
5.73M
        case scSignExtend:
524
5.73M
          push(cast<SCEVCastExpr>(S)->getOperand());
525
5.73M
          break;
526
14.4M
        case scAddExpr:
527
14.4M
        case scMulExpr:
528
14.4M
        case scSMaxExpr:
529
14.4M
        case scUMaxExpr:
530
14.4M
        case scAddRecExpr:
531
14.4M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
31.3M
            push(Op);
533
14.4M
          break;
534
14.4M
        case scUDivExpr: {
535
3.61M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
3.61M
          push(UDiv->getLHS());
537
3.61M
          push(UDiv->getRHS());
538
3.61M
          break;
539
14.4M
        }
540
14.4M
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
14.4M
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
108M
        }
545
108M
      }
546
70.9M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
15.4M
    void visitAll(const SCEV *Root) {
513
15.4M
      push(Root);
514
92.9M
      while (!Worklist.empty() && 
!Visitor.isDone()77.4M
) {
515
77.4M
        const SCEV *S = Worklist.pop_back_val();
516
77.4M
517
77.4M
        switch (S->getSCEVType()) {
518
77.4M
        case scConstant:
519
40.7M
        case scUnknown:
520
40.7M
          break;
521
40.7M
        case scTruncate:
522
8.21M
        case scZeroExtend:
523
8.21M
        case scSignExtend:
524
8.21M
          push(cast<SCEVCastExpr>(S)->getOperand());
525
8.21M
          break;
526
27.0M
        case scAddExpr:
527
27.0M
        case scMulExpr:
528
27.0M
        case scSMaxExpr:
529
27.0M
        case scUMaxExpr:
530
27.0M
        case scAddRecExpr:
531
27.0M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
57.1M
            push(Op);
533
27.0M
          break;
534
27.0M
        case scUDivExpr: {
535
1.43M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
1.43M
          push(UDiv->getLHS());
537
1.43M
          push(UDiv->getRHS());
538
1.43M
          break;
539
27.0M
        }
540
27.0M
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
27.0M
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
77.4M
        }
545
77.4M
      }
546
15.4M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, llvm::SCEVExpander::expand(llvm::SCEV const*)::$_3::operator()(llvm::SCEV const*) const::'lambda'(llvm::SCEV const*))::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
3.53M
    void visitAll(const SCEV *Root) {
513
3.53M
      push(Root);
514
10.6M
      while (!Worklist.empty() && 
!Visitor.isDone()7.11M
) {
515
7.10M
        const SCEV *S = Worklist.pop_back_val();
516
7.10M
517
7.10M
        switch (S->getSCEVType()) {
518
7.10M
        case scConstant:
519
5.11M
        case scUnknown:
520
5.11M
          break;
521
5.11M
        case scTruncate:
522
250k
        case scZeroExtend:
523
250k
        case scSignExtend:
524
250k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
250k
          break;
526
1.69M
        case scAddExpr:
527
1.69M
        case scMulExpr:
528
1.69M
        case scSMaxExpr:
529
1.69M
        case scUMaxExpr:
530
1.69M
        case scAddRecExpr:
531
1.69M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
3.46M
            push(Op);
533
1.69M
          break;
534
1.69M
        case scUDivExpr: {
535
55.8k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
55.8k
          push(UDiv->getLHS());
537
55.8k
          push(UDiv->getRHS());
538
55.8k
          break;
539
1.69M
        }
540
1.69M
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
1.69M
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
7.10M
        }
545
7.10M
      }
546
3.53M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
533k
    void visitAll(const SCEV *Root) {
513
533k
      push(Root);
514
3.16M
      while (!Worklist.empty() && 
!Visitor.isDone()2.62M
) {
515
2.62M
        const SCEV *S = Worklist.pop_back_val();
516
2.62M
517
2.62M
        switch (S->getSCEVType()) {
518
2.62M
        case scConstant:
519
1.47M
        case scUnknown:
520
1.47M
          break;
521
1.47M
        case scTruncate:
522
164k
        case scZeroExtend:
523
164k
        case scSignExtend:
524
164k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
164k
          break;
526
961k
        case scAddExpr:
527
961k
        case scMulExpr:
528
961k
        case scSMaxExpr:
529
961k
        case scUMaxExpr:
530
961k
        case scAddRecExpr:
531
961k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
1.98M
            push(Op);
533
961k
          break;
534
961k
        case scUDivExpr: {
535
25.0k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
25.0k
          push(UDiv->getLHS());
537
25.0k
          push(UDiv->getRHS());
538
25.0k
          break;
539
961k
        }
540
961k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
961k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
2.62M
        }
545
2.62M
      }
546
533k
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
17.4k
    void visitAll(const SCEV *Root) {
513
17.4k
      push(Root);
514
32.4k
      while (!Worklist.empty() && 
!Visitor.isDone()15.1k
) {
515
14.9k
        const SCEV *S = Worklist.pop_back_val();
516
14.9k
517
14.9k
        switch (S->getSCEVType()) {
518
14.9k
        case scConstant:
519
12.8k
        case scUnknown:
520
12.8k
          break;
521
12.8k
        case scTruncate:
522
794
        case scZeroExtend:
523
794
        case scSignExtend:
524
794
          push(cast<SCEVCastExpr>(S)->getOperand());
525
794
          break;
526
1.18k
        case scAddExpr:
527
1.18k
        case scMulExpr:
528
1.18k
        case scSMaxExpr:
529
1.18k
        case scUMaxExpr:
530
1.18k
        case scAddRecExpr:
531
1.18k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
2.47k
            push(Op);
533
1.18k
          break;
534
1.18k
        case scUDivExpr: {
535
163
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
163
          push(UDiv->getLHS());
537
163
          push(UDiv->getRHS());
538
163
          break;
539
1.18k
        }
540
1.18k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
1.18k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
14.9k
        }
545
14.9k
      }
546
17.4k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
15.9k
    void visitAll(const SCEV *Root) {
513
15.9k
      push(Root);
514
57.9k
      while (!Worklist.empty() && 
!Visitor.isDone()41.9k
) {
515
41.9k
        const SCEV *S = Worklist.pop_back_val();
516
41.9k
517
41.9k
        switch (S->getSCEVType()) {
518
41.9k
        case scConstant:
519
27.0k
        case scUnknown:
520
27.0k
          break;
521
27.0k
        case scTruncate:
522
1.41k
        case scZeroExtend:
523
1.41k
        case scSignExtend:
524
1.41k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
1.41k
          break;
526
13.4k
        case scAddExpr:
527
13.4k
        case scMulExpr:
528
13.4k
        case scSMaxExpr:
529
13.4k
        case scUMaxExpr:
530
13.4k
        case scAddRecExpr:
531
13.4k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
27.7k
            push(Op);
533
13.4k
          break;
534
13.4k
        case scUDivExpr: {
535
89
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
89
          push(UDiv->getLHS());
537
89
          push(UDiv->getRHS());
538
89
          break;
539
13.4k
        }
540
13.4k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
13.4k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
41.9k
        }
545
41.9k
      }
546
15.9k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
19.9k
    void visitAll(const SCEV *Root) {
513
19.9k
      push(Root);
514
59.6k
      while (!Worklist.empty() && 
!Visitor.isDone()39.6k
) {
515
39.6k
        const SCEV *S = Worklist.pop_back_val();
516
39.6k
517
39.6k
        switch (S->getSCEVType()) {
518
39.6k
        case scConstant:
519
22.7k
        case scUnknown:
520
22.7k
          break;
521
22.7k
        case scTruncate:
522
1.00k
        case scZeroExtend:
523
1.00k
        case scSignExtend:
524
1.00k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
1.00k
          break;
526
15.7k
        case scAddExpr:
527
15.7k
        case scMulExpr:
528
15.7k
        case scSMaxExpr:
529
15.7k
        case scUMaxExpr:
530
15.7k
        case scAddRecExpr:
531
15.7k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
31.6k
            push(Op);
533
15.7k
          break;
534
15.7k
        case scUDivExpr: {
535
143
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
143
          push(UDiv->getLHS());
537
143
          push(UDiv->getRHS());
538
143
          break;
539
15.7k
        }
540
15.7k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
15.7k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
39.6k
        }
545
39.6k
      }
546
19.9k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
11.7k
    void visitAll(const SCEV *Root) {
513
11.7k
      push(Root);
514
38.7k
      while (!Worklist.empty() && 
!Visitor.isDone()26.9k
) {
515
26.9k
        const SCEV *S = Worklist.pop_back_val();
516
26.9k
517
26.9k
        switch (S->getSCEVType()) {
518
26.9k
        case scConstant:
519
18.5k
        case scUnknown:
520
18.5k
          break;
521
18.5k
        case scTruncate:
522
938
        case scZeroExtend:
523
938
        case scSignExtend:
524
938
          push(cast<SCEVCastExpr>(S)->getOperand());
525
938
          break;
526
7.42k
        case scAddExpr:
527
7.42k
        case scMulExpr:
528
7.42k
        case scSMaxExpr:
529
7.42k
        case scUMaxExpr:
530
7.42k
        case scAddRecExpr:
531
7.42k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
14.9k
            push(Op);
533
7.42k
          break;
534
7.42k
        case scUDivExpr: {
535
65
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
65
          push(UDiv->getLHS());
537
65
          push(UDiv->getRHS());
538
65
          break;
539
7.42k
        }
540
7.42k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
7.42k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
26.9k
        }
545
26.9k
      }
546
11.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::visitAll(llvm::SCEV const*)
Line
Count
Source
512
24.6k
    void visitAll(const SCEV *Root) {
513
24.6k
      push(Root);
514
86.3k
      while (!Worklist.empty() && 
!Visitor.isDone()61.6k
) {
515
61.6k
        const SCEV *S = Worklist.pop_back_val();
516
61.6k
517
61.6k
        switch (S->getSCEVType()) {
518
61.6k
        case scConstant:
519
33.9k
        case scUnknown:
520
33.9k
          break;
521
33.9k
        case scTruncate:
522
2.89k
        case scZeroExtend:
523
2.89k
        case scSignExtend:
524
2.89k
          push(cast<SCEVCastExpr>(S)->getOperand());
525
2.89k
          break;
526
24.1k
        case scAddExpr:
527
24.1k
        case scMulExpr:
528
24.1k
        case scSMaxExpr:
529
24.1k
        case scUMaxExpr:
530
24.1k
        case scAddRecExpr:
531
24.1k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
532
50.0k
            push(Op);
533
24.1k
          break;
534
24.1k
        case scUDivExpr: {
535
637
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
536
637
          push(UDiv->getLHS());
537
637
          push(UDiv->getRHS());
538
637
          break;
539
24.1k
        }
540
24.1k
        case scCouldNotCompute:
541
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
542
24.1k
        default:
543
0
          llvm_unreachable("Unknown SCEV kind!");
544
61.6k
        }
545
61.6k
      }
546
24.6k
    }
547
  };
548
549
  /// Use SCEVTraversal to visit all nodes in the given expression tree.
550
  template<typename SV>
551
115M
  void visitAll(const SCEV *Root, SV& Visitor) {
552
115M
    SCEVTraversal<SV> T(Visitor);
553
115M
    T.visitAll(Root);
554
115M
  }
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
551
1.03k
  void visitAll(const SCEV *Root, SV& Visitor) {
552
1.03k
    SCEVTraversal<SV> T(Visitor);
553
1.03k
    T.visitAll(Root);
554
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
551
38.8M
  void visitAll(const SCEV *Root, SV& Visitor) {
552
38.8M
    SCEVTraversal<SV> T(Visitor);
553
38.8M
    T.visitAll(Root);
554
38.8M
  }
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
551
1.62M
  void visitAll(const SCEV *Root, SV& Visitor) {
552
1.62M
    SCEVTraversal<SV> T(Visitor);
553
1.62M
    T.visitAll(Root);
554
1.62M
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectStrides>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
551
2.96k
  void visitAll(const SCEV *Root, SV& Visitor) {
552
2.96k
    SCEVTraversal<SV> T(Visitor);
553
2.96k
    T.visitAll(Root);
554
2.96k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectTerms>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
551
4.50k
  void visitAll(const SCEV *Root, SV& Visitor) {
552
4.50k
    SCEVTraversal<SV> T(Visitor);
553
4.50k
    T.visitAll(Root);
554
4.50k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectAddRecMultiplies>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
551
2.96k
  void visitAll(const SCEV *Root, SV& Visitor) {
552
2.96k
    SCEVTraversal<SV> T(Visitor);
553
2.96k
    T.visitAll(Root);
554
2.96k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVHasAddRec>(llvm::SCEV const*, (anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
551
1.90k
  void visitAll(const SCEV *Root, SV& Visitor) {
552
1.90k
    SCEVTraversal<SV> T(Visitor);
553
1.90k
    T.visitAll(Root);
554
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
551
70.9M
  void visitAll(const SCEV *Root, SV& Visitor) {
552
70.9M
    SCEVTraversal<SV> T(Visitor);
553
70.9M
    T.visitAll(Root);
554
70.9M
  }
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
551
3.53M
  void visitAll(const SCEV *Root, SV& Visitor) {
552
3.53M
    SCEVTraversal<SV> T(Visitor);
553
3.53M
    T.visitAll(Root);
554
3.53M
  }
ScalarEvolutionExpander.cpp:void llvm::visitAll<(anonymous namespace)::SCEVFindUnsafe>(llvm::SCEV const*, (anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
551
533k
  void visitAll(const SCEV *Root, SV& Visitor) {
552
533k
    SCEVTraversal<SV> T(Visitor);
553
533k
    T.visitAll(Root);
554
533k
  }
555
556
  /// Return true if any node in \p Root satisfies the predicate \p Pred.
557
  template <typename PredTy>
558
115M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
559
115M
    struct FindClosure {
560
115M
      bool Found = false;
561
115M
      PredTy Pred;
562
115M
563
115M
      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
563
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
563
38.8M
      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
563
1.62M
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure::FindClosure(llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)
Line
Count
Source
563
70.9M
      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
563
3.53M
      FindClosure(PredTy Pred) : Pred(Pred) {}
564
115M
565
228M
      bool follow(const SCEV *S) {
566
228M
        if (!Pred(S))
567
228M
          return true;
568
495k
569
495k
        Found = true;
570
495k
        return false;
571
495k
      }
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
565
3.68k
      bool follow(const SCEV *S) {
566
3.68k
        if (!Pred(S))
567
3.66k
          return true;
568
18
569
18
        Found = true;
570
18
        return false;
571
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
565
110M
      bool follow(const SCEV *S) {
566
110M
        if (!Pred(S))
567
110M
          return true;
568
0
569
0
        Found = true;
570
0
        return false;
571
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
565
2.65M
      bool follow(const SCEV *S) {
566
2.65M
        if (!Pred(S))
567
2.40M
          return true;
568
251k
569
251k
        Found = true;
570
251k
        return false;
571
251k
      }
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
565
108M
      bool follow(const SCEV *S) {
566
108M
        if (!Pred(S))
567
108M
          return true;
568
243k
569
243k
        Found = true;
570
243k
        return false;
571
243k
      }
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
565
7.11M
      bool follow(const SCEV *S) {
566
7.11M
        if (!Pred(S))
567
7.11M
          return true;
568
382
569
382
        Found = true;
570
382
        return false;
571
382
      }
572
115M
573
228M
      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
573
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
573
110M
      bool isDone() const { return Found; }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))::FindClosure::isDone() const
Line
Count
Source
573
2.39M
      bool isDone() const { return Found; }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)::FindClosure::isDone() const
Line
Count
Source
573
108M
      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
573
7.11M
      bool isDone() const { return Found; }
574
115M
    };
575
115M
576
115M
    FindClosure FC(Pred);
577
115M
    visitAll(Root, FC);
578
115M
    return FC.Found;
579
115M
  }
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
558
1.03k
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
559
1.03k
    struct FindClosure {
560
1.03k
      bool Found = false;
561
1.03k
      PredTy Pred;
562
1.03k
563
1.03k
      FindClosure(PredTy Pred) : Pred(Pred) {}
564
1.03k
565
1.03k
      bool follow(const SCEV *S) {
566
1.03k
        if (!Pred(S))
567
1.03k
          return true;
568
1.03k
569
1.03k
        Found = true;
570
1.03k
        return false;
571
1.03k
      }
572
1.03k
573
1.03k
      bool isDone() const { return Found; }
574
1.03k
    };
575
1.03k
576
1.03k
    FindClosure FC(Pred);
577
1.03k
    visitAll(Root, FC);
578
1.03k
    return FC.Found;
579
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
558
38.8M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
559
38.8M
    struct FindClosure {
560
38.8M
      bool Found = false;
561
38.8M
      PredTy Pred;
562
38.8M
563
38.8M
      FindClosure(PredTy Pred) : Pred(Pred) {}
564
38.8M
565
38.8M
      bool follow(const SCEV *S) {
566
38.8M
        if (!Pred(S))
567
38.8M
          return true;
568
38.8M
569
38.8M
        Found = true;
570
38.8M
        return false;
571
38.8M
      }
572
38.8M
573
38.8M
      bool isDone() const { return Found; }
574
38.8M
    };
575
38.8M
576
38.8M
    FindClosure FC(Pred);
577
38.8M
    visitAll(Root, FC);
578
38.8M
    return FC.Found;
579
38.8M
  }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))
Line
Count
Source
558
1.62M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
559
1.62M
    struct FindClosure {
560
1.62M
      bool Found = false;
561
1.62M
      PredTy Pred;
562
1.62M
563
1.62M
      FindClosure(PredTy Pred) : Pred(Pred) {}
564
1.62M
565
1.62M
      bool follow(const SCEV *S) {
566
1.62M
        if (!Pred(S))
567
1.62M
          return true;
568
1.62M
569
1.62M
        Found = true;
570
1.62M
        return false;
571
1.62M
      }
572
1.62M
573
1.62M
      bool isDone() const { return Found; }
574
1.62M
    };
575
1.62M
576
1.62M
    FindClosure FC(Pred);
577
1.62M
    visitAll(Root, FC);
578
1.62M
    return FC.Found;
579
1.62M
  }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_31)
Line
Count
Source
558
70.9M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
559
70.9M
    struct FindClosure {
560
70.9M
      bool Found = false;
561
70.9M
      PredTy Pred;
562
70.9M
563
70.9M
      FindClosure(PredTy Pred) : Pred(Pred) {}
564
70.9M
565
70.9M
      bool follow(const SCEV *S) {
566
70.9M
        if (!Pred(S))
567
70.9M
          return true;
568
70.9M
569
70.9M
        Found = true;
570
70.9M
        return false;
571
70.9M
      }
572
70.9M
573
70.9M
      bool isDone() const { return Found; }
574
70.9M
    };
575
70.9M
576
70.9M
    FindClosure FC(Pred);
577
70.9M
    visitAll(Root, FC);
578
70.9M
    return FC.Found;
579
70.9M
  }
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
558
3.53M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
559
3.53M
    struct FindClosure {
560
3.53M
      bool Found = false;
561
3.53M
      PredTy Pred;
562
3.53M
563
3.53M
      FindClosure(PredTy Pred) : Pred(Pred) {}
564
3.53M
565
3.53M
      bool follow(const SCEV *S) {
566
3.53M
        if (!Pred(S))
567
3.53M
          return true;
568
3.53M
569
3.53M
        Found = true;
570
3.53M
        return false;
571
3.53M
      }
572
3.53M
573
3.53M
      bool isDone() const { return Found; }
574
3.53M
    };
575
3.53M
576
3.53M
    FindClosure FC(Pred);
577
3.53M
    visitAll(Root, FC);
578
3.53M
    return FC.Found;
579
3.53M
  }
580
581
  /// This visitor recursively visits a SCEV expression and re-writes it.
582
  /// The result from each visit is cached, so it will return the same
583
  /// SCEV for the same input.
584
  template<typename SC>
585
  class SCEVRewriteVisitor : public SCEVVisitor<SC, const SCEV *> {
586
  protected:
587
    ScalarEvolution &SE;
588
    // Memoize the result of each visit so that we only compute once for
589
    // the same input SCEV. This is to avoid redundant computations when
590
    // a SCEV is referenced by multiple SCEVs. Without memoization, this
591
    // visit algorithm would have exponential time complexity in the worst
592
    // case, causing the compiler to hang on certain tests.
593
    DenseMap<const SCEV *, const SCEV *> RewriteResults;
594
595
  public:
596
5.66M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
231k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
314k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
1.34M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
963k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
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
596
383k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
2.41M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
400
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
113
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
1.43k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
11.7k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
596
699
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
597
598
17.8M
    const SCEV *visit(const SCEV *S) {
599
17.8M
      auto It = RewriteResults.find(S);
600
17.8M
      if (It != RewriteResults.end())
601
812k
        return It->second;
602
17.0M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
17.0M
      auto Result = RewriteResults.try_emplace(S, Visited);
604
17.0M
      assert(Result.second && "Should insert a new entry");
605
17.0M
      return Result.first->second;
606
17.0M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visit(llvm::SCEV const*)
Line
Count
Source
598
344k
    const SCEV *visit(const SCEV *S) {
599
344k
      auto It = RewriteResults.find(S);
600
344k
      if (It != RewriteResults.end())
601
4.54k
        return It->second;
602
339k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
339k
      auto Result = RewriteResults.try_emplace(S, Visited);
604
339k
      assert(Result.second && "Should insert a new entry");
605
339k
      return Result.first->second;
606
339k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
396k
    const SCEV *visit(const SCEV *S) {
599
396k
      auto It = RewriteResults.find(S);
600
396k
      if (It != RewriteResults.end())
601
1.70k
        return It->second;
602
394k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
394k
      auto Result = RewriteResults.try_emplace(S, Visited);
604
394k
      assert(Result.second && "Should insert a new entry");
605
394k
      return Result.first->second;
606
394k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
1.76M
    const SCEV *visit(const SCEV *S) {
599
1.76M
      auto It = RewriteResults.find(S);
600
1.76M
      if (It != RewriteResults.end())
601
21.5k
        return It->second;
602
1.74M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
1.74M
      auto Result = RewriteResults.try_emplace(S, Visited);
604
1.74M
      assert(Result.second && "Should insert a new entry");
605
1.74M
      return Result.first->second;
606
1.74M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
1.32M
    const SCEV *visit(const SCEV *S) {
599
1.32M
      auto It = RewriteResults.find(S);
600
1.32M
      if (It != RewriteResults.end())
601
20.4k
        return It->second;
602
1.29M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
1.29M
      auto Result = RewriteResults.try_emplace(S, Visited);
604
1.29M
      assert(Result.second && "Should insert a new entry");
605
1.29M
      return Result.first->second;
606
1.29M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
389
    const SCEV *visit(const SCEV *S) {
599
389
      auto It = RewriteResults.find(S);
600
389
      if (It != RewriteResults.end())
601
6
        return It->second;
602
383
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
383
      auto Result = RewriteResults.try_emplace(S, Visited);
604
383
      assert(Result.second && "Should insert a new entry");
605
383
      return Result.first->second;
606
383
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
1.99M
    const SCEV *visit(const SCEV *S) {
599
1.99M
      auto It = RewriteResults.find(S);
600
1.99M
      if (It != RewriteResults.end())
601
62.1k
        return It->second;
602
1.93M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
1.93M
      auto Result = RewriteResults.try_emplace(S, Visited);
604
1.93M
      assert(Result.second && "Should insert a new entry");
605
1.93M
      return Result.first->second;
606
1.93M
    }
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
598
12.0M
    const SCEV *visit(const SCEV *S) {
599
12.0M
      auto It = RewriteResults.find(S);
600
12.0M
      if (It != RewriteResults.end())
601
697k
        return It->second;
602
11.3M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
11.3M
      auto Result = RewriteResults.try_emplace(S, Visited);
604
11.3M
      assert(Result.second && "Should insert a new entry");
605
11.3M
      return Result.first->second;
606
11.3M
    }
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
556
    const SCEV *visit(const SCEV *S) {
599
556
      auto It = RewriteResults.find(S);
600
556
      if (It != RewriteResults.end())
601
0
        return It->second;
602
556
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
556
      auto Result = RewriteResults.try_emplace(S, Visited);
604
556
      assert(Result.second && "Should insert a new entry");
605
556
      return Result.first->second;
606
556
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
196
    const SCEV *visit(const SCEV *S) {
599
196
      auto It = RewriteResults.find(S);
600
196
      if (It != RewriteResults.end())
601
0
        return It->second;
602
196
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
196
      auto Result = RewriteResults.try_emplace(S, Visited);
604
196
      assert(Result.second && "Should insert a new entry");
605
196
      return Result.first->second;
606
196
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visit(llvm::SCEV const*)
Line
Count
Source
598
16.4k
    const SCEV *visit(const SCEV *S) {
599
16.4k
      auto It = RewriteResults.find(S);
600
16.4k
      if (It != RewriteResults.end())
601
4.40k
        return It->second;
602
12.0k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
12.0k
      auto Result = RewriteResults.try_emplace(S, Visited);
604
12.0k
      assert(Result.second && "Should insert a new entry");
605
12.0k
      return Result.first->second;
606
12.0k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
14.4k
    const SCEV *visit(const SCEV *S) {
599
14.4k
      auto It = RewriteResults.find(S);
600
14.4k
      if (It != RewriteResults.end())
601
115
        return It->second;
602
14.3k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
14.3k
      auto Result = RewriteResults.try_emplace(S, Visited);
604
14.3k
      assert(Result.second && "Should insert a new entry");
605
14.3k
      return Result.first->second;
606
14.3k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
598
2.51k
    const SCEV *visit(const SCEV *S) {
599
2.51k
      auto It = RewriteResults.find(S);
600
2.51k
      if (It != RewriteResults.end())
601
97
        return It->second;
602
2.41k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
603
2.41k
      auto Result = RewriteResults.try_emplace(S, Visited);
604
2.41k
      assert(Result.second && "Should insert a new entry");
605
2.41k
      return Result.first->second;
606
2.41k
    }
607
608
5.59M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
5.59M
      return Constant;
610
5.59M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
215k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
215k
      return Constant;
610
215k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
33.8k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
33.8k
      return Constant;
610
33.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
370k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
370k
      return Constant;
610
370k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
354k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
354k
      return Constant;
610
354k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
267
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
267
      return Constant;
610
267
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
593k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
593k
      return Constant;
610
593k
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
4.01M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
4.01M
      return Constant;
610
4.01M
    }
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
608
31
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
31
      return Constant;
610
31
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
2.84k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
2.84k
      return Constant;
610
2.84k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
6.44k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
6.44k
      return Constant;
610
6.44k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
608
883
    const SCEV *visitConstant(const SCEVConstant *Constant) {
609
883
      return Constant;
610
883
    }
611
612
49.2k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
49.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
49.2k
      return Operand == Expr->getOperand()
615
49.2k
                 ? 
Expr47.5k
616
49.2k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())1.65k
;
617
49.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
762
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
762
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
762
      return Operand == Expr->getOperand()
615
762
                 ? Expr
616
762
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
617
762
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
1.25k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
1.25k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
1.25k
      return Operand == Expr->getOperand()
615
1.25k
                 ? Expr
616
1.25k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
617
1.25k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
6.54k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
6.54k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
6.54k
      return Operand == Expr->getOperand()
615
6.54k
                 ? 
Expr6.11k
616
6.54k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())428
;
617
6.54k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
5.05k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
5.05k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
5.05k
      return Operand == Expr->getOperand()
615
5.05k
                 ? 
Expr4.62k
616
5.05k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())422
;
617
5.05k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
4.76k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
4.76k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
4.76k
      return Operand == Expr->getOperand()
615
4.76k
                 ? 
Expr4.70k
616
4.76k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())53
;
617
4.76k
    }
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
612
30.7k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
30.7k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
30.7k
      return Operand == Expr->getOperand()
615
30.7k
                 ? 
Expr30.0k
616
30.7k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())752
;
617
30.7k
    }
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
612
4
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
4
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
4
      return Operand == Expr->getOperand()
615
4
                 ? Expr
616
4
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
617
4
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
77
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
77
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
77
      return Operand == Expr->getOperand()
615
77
                 ? 
Expr75
616
77
                 : 
SE.getTruncateExpr(Operand, Expr->getType())2
;
617
77
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
612
2
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
613
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
614
2
      return Operand == Expr->getOperand()
615
2
                 ? 
Expr0
616
2
                 : SE.getTruncateExpr(Operand, Expr->getType());
617
2
    }
618
619
226k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
226k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
226k
      return Operand == Expr->getOperand()
622
226k
                 ? 
Expr220k
623
226k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())5.35k
;
624
226k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
4.36k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
4.36k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
4.36k
      return Operand == Expr->getOperand()
622
4.36k
                 ? 
Expr4.35k
623
4.36k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())9
;
624
4.36k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
6.36k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
6.36k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
6.36k
      return Operand == Expr->getOperand()
622
6.36k
                 ? 
Expr5.44k
623
6.36k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())917
;
624
6.36k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
58.2k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
58.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
58.2k
      return Operand == Expr->getOperand()
622
58.2k
                 ? 
Expr56.1k
623
58.2k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())2.07k
;
624
58.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
47.1k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
47.1k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
47.1k
      return Operand == Expr->getOperand()
622
47.1k
                 ? 
Expr46.0k
623
47.1k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.14k
;
624
47.1k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
2
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
2
      return Operand == Expr->getOperand()
622
2
                 ? Expr
623
2
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
624
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
619
109k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
109k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
109k
      return Operand == Expr->getOperand()
622
109k
                 ? 
Expr108k
623
109k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.20k
;
624
109k
    }
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
619
54
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
54
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
54
      return Operand == Expr->getOperand()
622
54
                 ? Expr
623
54
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
624
54
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
151
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
151
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
151
      return Operand == Expr->getOperand()
622
151
                 ? 
Expr150
623
151
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
624
151
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
619
11
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
620
11
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
621
11
      return Operand == Expr->getOperand()
622
11
                 ? 
Expr10
623
11
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
624
11
    }
625
626
528k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
528k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
528k
      return Operand == Expr->getOperand()
629
528k
                 ? 
Expr525k
630
528k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2.65k
;
631
528k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
24.1k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
24.1k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
24.1k
      return Operand == Expr->getOperand()
629
24.1k
                 ? Expr
630
24.1k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
631
24.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
980
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
980
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
980
      return Operand == Expr->getOperand()
629
980
                 ? 
Expr937
630
980
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())43
;
631
980
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
55.3k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
55.3k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
55.3k
      return Operand == Expr->getOperand()
629
55.3k
                 ? 
Expr54.2k
630
55.3k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())1.17k
;
631
55.3k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
37.4k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
37.4k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
37.4k
      return Operand == Expr->getOperand()
629
37.4k
                 ? 
Expr36.5k
630
37.4k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())953
;
631
37.4k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
2
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
2
      return Operand == Expr->getOperand()
629
2
                 ? Expr
630
2
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
631
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
626
409k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
409k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
409k
      return Operand == Expr->getOperand()
629
409k
                 ? 
Expr409k
630
409k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())477
;
631
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
626
3
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
3
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
3
      return Operand == Expr->getOperand()
629
3
                 ? Expr
630
3
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
631
3
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
188
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
188
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
188
      return Operand == Expr->getOperand()
629
188
                 ? Expr
630
188
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
631
188
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
335
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
335
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
335
      return Operand == Expr->getOperand()
629
335
                 ? 
Expr331
630
335
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())4
;
631
335
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
626
28
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
627
28
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
628
28
      return Operand == Expr->getOperand()
629
28
                 ? 
Expr26
630
28
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2
;
631
28
    }
632
633
1.76M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
1.76M
      SmallVector<const SCEV *, 2> Operands;
635
1.76M
      bool Changed = false;
636
3.85M
      for (auto *Op : Expr->operands()) {
637
3.85M
        Operands.push_back(((SC*)this)->visit(Op));
638
3.85M
        Changed |= Op != Operands.back();
639
3.85M
      }
640
1.76M
      return !Changed ? 
Expr1.74M
:
SE.getAddExpr(Operands)19.2k
;
641
1.76M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
4.63k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
4.63k
      SmallVector<const SCEV *, 2> Operands;
635
4.63k
      bool Changed = false;
636
15.3k
      for (auto *Op : Expr->operands()) {
637
15.3k
        Operands.push_back(((SC*)this)->visit(Op));
638
15.3k
        Changed |= Op != Operands.back();
639
15.3k
      }
640
4.63k
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
641
4.63k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
1.87k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
1.87k
      SmallVector<const SCEV *, 2> Operands;
635
1.87k
      bool Changed = false;
636
4.04k
      for (auto *Op : Expr->operands()) {
637
4.04k
        Operands.push_back(((SC*)this)->visit(Op));
638
4.04k
        Changed |= Op != Operands.back();
639
4.04k
      }
640
1.87k
      return !Changed ? 
Expr1.82k
:
SE.getAddExpr(Operands)49
;
641
1.87k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
70.9k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
70.9k
      SmallVector<const SCEV *, 2> Operands;
635
70.9k
      bool Changed = false;
636
149k
      for (auto *Op : Expr->operands()) {
637
149k
        Operands.push_back(((SC*)this)->visit(Op));
638
149k
        Changed |= Op != Operands.back();
639
149k
      }
640
70.9k
      return !Changed ? 
Expr66.4k
:
SE.getAddExpr(Operands)4.51k
;
641
70.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
56.1k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
56.1k
      SmallVector<const SCEV *, 2> Operands;
635
56.1k
      bool Changed = false;
636
119k
      for (auto *Op : Expr->operands()) {
637
119k
        Operands.push_back(((SC*)this)->visit(Op));
638
119k
        Changed |= Op != Operands.back();
639
119k
      }
640
56.1k
      return !Changed ? 
Expr52.5k
:
SE.getAddExpr(Operands)3.57k
;
641
56.1k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
13
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
13
      SmallVector<const SCEV *, 2> Operands;
635
13
      bool Changed = false;
636
26
      for (auto *Op : Expr->operands()) {
637
26
        Operands.push_back(((SC*)this)->visit(Op));
638
26
        Changed |= Op != Operands.back();
639
26
      }
640
13
      return !Changed ? 
Expr9
:
SE.getAddExpr(Operands)4
;
641
13
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
225k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
225k
      SmallVector<const SCEV *, 2> Operands;
635
225k
      bool Changed = false;
636
517k
      for (auto *Op : Expr->operands()) {
637
517k
        Operands.push_back(((SC*)this)->visit(Op));
638
517k
        Changed |= Op != Operands.back();
639
517k
      }
640
225k
      return !Changed ? 
Expr223k
:
SE.getAddExpr(Operands)2.01k
;
641
225k
    }
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
633
1.40M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
1.40M
      SmallVector<const SCEV *, 2> Operands;
635
1.40M
      bool Changed = false;
636
3.04M
      for (auto *Op : Expr->operands()) {
637
3.04M
        Operands.push_back(((SC*)this)->visit(Op));
638
3.04M
        Changed |= Op != Operands.back();
639
3.04M
      }
640
1.40M
      return !Changed ? 
Expr1.39M
:
SE.getAddExpr(Operands)8.82k
;
641
1.40M
    }
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
136
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
136
      SmallVector<const SCEV *, 2> Operands;
635
136
      bool Changed = false;
636
272
      for (auto *Op : Expr->operands()) {
637
272
        Operands.push_back(((SC*)this)->visit(Op));
638
272
        Changed |= Op != Operands.back();
639
272
      }
640
136
      return !Changed ? 
Expr12
:
SE.getAddExpr(Operands)124
;
641
136
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
34
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
34
      SmallVector<const SCEV *, 2> Operands;
635
34
      bool Changed = false;
636
68
      for (auto *Op : Expr->operands()) {
637
68
        Operands.push_back(((SC*)this)->visit(Op));
638
68
        Changed |= Op != Operands.back();
639
68
      }
640
34
      return !Changed ? 
Expr0
: SE.getAddExpr(Operands);
641
34
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
576
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
576
      SmallVector<const SCEV *, 2> Operands;
635
576
      bool Changed = false;
636
1.15k
      for (auto *Op : Expr->operands()) {
637
1.15k
        Operands.push_back(((SC*)this)->visit(Op));
638
1.15k
        Changed |= Op != Operands.back();
639
1.15k
      }
640
576
      return !Changed ? 
Expr516
:
SE.getAddExpr(Operands)60
;
641
576
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
306
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
306
      SmallVector<const SCEV *, 2> Operands;
635
306
      bool Changed = false;
636
642
      for (auto *Op : Expr->operands()) {
637
642
        Operands.push_back(((SC*)this)->visit(Op));
638
642
        Changed |= Op != Operands.back();
639
642
      }
640
306
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
641
306
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
633
124
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
634
124
      SmallVector<const SCEV *, 2> Operands;
635
124
      bool Changed = false;
636
262
      for (auto *Op : Expr->operands()) {
637
262
        Operands.push_back(((SC*)this)->visit(Op));
638
262
        Changed |= Op != Operands.back();
639
262
      }
640
124
      return !Changed ? 
Expr112
:
SE.getAddExpr(Operands)12
;
641
124
    }
642
643
856k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
856k
      SmallVector<const SCEV *, 2> Operands;
645
856k
      bool Changed = false;
646
1.72M
      for (auto *Op : Expr->operands()) {
647
1.72M
        Operands.push_back(((SC*)this)->visit(Op));
648
1.72M
        Changed |= Op != Operands.back();
649
1.72M
      }
650
856k
      return !Changed ? 
Expr843k
:
SE.getMulExpr(Operands)13.1k
;
651
856k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
30.8k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
30.8k
      SmallVector<const SCEV *, 2> Operands;
645
30.8k
      bool Changed = false;
646
62.3k
      for (auto *Op : Expr->operands()) {
647
62.3k
        Operands.push_back(((SC*)this)->visit(Op));
648
62.3k
        Changed |= Op != Operands.back();
649
62.3k
      }
650
30.8k
      return !Changed ? 
Expr30.8k
:
SE.getMulExpr(Operands)9
;
651
30.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
16.4k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
16.4k
      SmallVector<const SCEV *, 2> Operands;
645
16.4k
      bool Changed = false;
646
34.2k
      for (auto *Op : Expr->operands()) {
647
34.2k
        Operands.push_back(((SC*)this)->visit(Op));
648
34.2k
        Changed |= Op != Operands.back();
649
34.2k
      }
650
16.4k
      return !Changed ? 
Expr16.4k
:
SE.getMulExpr(Operands)19
;
651
16.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
42.9k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
42.9k
      SmallVector<const SCEV *, 2> Operands;
645
42.9k
      bool Changed = false;
646
86.1k
      for (auto *Op : Expr->operands()) {
647
86.1k
        Operands.push_back(((SC*)this)->visit(Op));
648
86.1k
        Changed |= Op != Operands.back();
649
86.1k
      }
650
42.9k
      return !Changed ? 
Expr39.2k
:
SE.getMulExpr(Operands)3.73k
;
651
42.9k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
40.6k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
40.6k
      SmallVector<const SCEV *, 2> Operands;
645
40.6k
      bool Changed = false;
646
81.4k
      for (auto *Op : Expr->operands()) {
647
81.4k
        Operands.push_back(((SC*)this)->visit(Op));
648
81.4k
        Changed |= Op != Operands.back();
649
81.4k
      }
650
40.6k
      return !Changed ? 
Expr37.0k
:
SE.getMulExpr(Operands)3.52k
;
651
40.6k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
35
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
35
      SmallVector<const SCEV *, 2> Operands;
645
35
      bool Changed = false;
646
70
      for (auto *Op : Expr->operands()) {
647
70
        Operands.push_back(((SC*)this)->visit(Op));
648
70
        Changed |= Op != Operands.back();
649
70
      }
650
35
      return !Changed ? 
Expr28
:
SE.getMulExpr(Operands)7
;
651
35
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
164k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
164k
      SmallVector<const SCEV *, 2> Operands;
645
164k
      bool Changed = false;
646
329k
      for (auto *Op : Expr->operands()) {
647
329k
        Operands.push_back(((SC*)this)->visit(Op));
648
329k
        Changed |= Op != Operands.back();
649
329k
      }
650
164k
      return !Changed ? 
Expr161k
:
SE.getMulExpr(Operands)3.17k
;
651
164k
    }
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
643
558k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
558k
      SmallVector<const SCEV *, 2> Operands;
645
558k
      bool Changed = false;
646
1.12M
      for (auto *Op : Expr->operands()) {
647
1.12M
        Operands.push_back(((SC*)this)->visit(Op));
648
1.12M
        Changed |= Op != Operands.back();
649
1.12M
      }
650
558k
      return !Changed ? 
Expr555k
:
SE.getMulExpr(Operands)2.53k
;
651
558k
    }
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
643
6
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
6
      SmallVector<const SCEV *, 2> Operands;
645
6
      bool Changed = false;
646
12
      for (auto *Op : Expr->operands()) {
647
12
        Operands.push_back(((SC*)this)->visit(Op));
648
12
        Changed |= Op != Operands.back();
649
12
      }
650
6
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
651
6
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
2.62k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
2.62k
      SmallVector<const SCEV *, 2> Operands;
645
2.62k
      bool Changed = false;
646
6.89k
      for (auto *Op : Expr->operands()) {
647
6.89k
        Operands.push_back(((SC*)this)->visit(Op));
648
6.89k
        Changed |= Op != Operands.back();
649
6.89k
      }
650
2.62k
      return !Changed ? 
Expr2.50k
:
SE.getMulExpr(Operands)120
;
651
2.62k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
202
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
202
      SmallVector<const SCEV *, 2> Operands;
645
202
      bool Changed = false;
646
417
      for (auto *Op : Expr->operands()) {
647
417
        Operands.push_back(((SC*)this)->visit(Op));
648
417
        Changed |= Op != Operands.back();
649
417
      }
650
202
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
651
202
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
643
67
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
644
67
      SmallVector<const SCEV *, 2> Operands;
645
67
      bool Changed = false;
646
140
      for (auto *Op : Expr->operands()) {
647
140
        Operands.push_back(((SC*)this)->visit(Op));
648
140
        Changed |= Op != Operands.back();
649
140
      }
650
67
      return !Changed ? 
Expr64
:
SE.getMulExpr(Operands)3
;
651
67
    }
652
653
86.4k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
86.4k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
86.4k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
86.4k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()83.9k
;
657
86.4k
      return !Changed ? 
Expr83.9k
:
SE.getUDivExpr(LHS, RHS)2.53k
;
658
86.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
934
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
934
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
934
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
934
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
657
934
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
658
934
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
16.1k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
16.1k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
16.1k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
16.1k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()16.1k
;
657
16.1k
      return !Changed ? 
Expr16.1k
:
SE.getUDivExpr(LHS, RHS)3
;
658
16.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
8.74k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
8.74k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
8.74k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
8.74k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.54k
;
657
8.74k
      return !Changed ? 
Expr8.54k
:
SE.getUDivExpr(LHS, RHS)197
;
658
8.74k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
8.28k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
8.28k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
8.28k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
8.28k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.13k
;
657
8.28k
      return !Changed ? 
Expr8.13k
:
SE.getUDivExpr(LHS, RHS)159
;
658
8.28k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
6
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
6
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
6
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
6
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
657
6
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
658
6
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
4.47k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
4.47k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
4.47k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
4.47k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4.46k
;
657
4.47k
      return !Changed ? 
Expr4.46k
:
SE.getUDivExpr(LHS, RHS)13
;
658
4.47k
    }
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
653
47.6k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
47.6k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
47.6k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
47.6k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()45.5k
;
657
47.6k
      return !Changed ? 
Expr45.5k
:
SE.getUDivExpr(LHS, RHS)2.14k
;
658
47.6k
    }
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
653
12
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
12
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
12
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
12
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()0
;
657
12
      return !Changed ? 
Expr0
: SE.getUDivExpr(LHS, RHS);
658
12
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
145
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
145
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
145
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
145
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()142
;
657
145
      return !Changed ? 
Expr142
:
SE.getUDivExpr(LHS, RHS)3
;
658
145
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
653
5
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
654
5
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
655
5
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
656
5
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4
;
657
5
      return !Changed ? 
Expr3
:
SE.getUDivExpr(LHS, RHS)2
;
658
5
    }
659
660
305k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
661
305k
      SmallVector<const SCEV *, 2> Operands;
662
305k
      bool Changed = false;
663
611k
      for (auto *Op : Expr->operands()) {
664
611k
        Operands.push_back(((SC*)this)->visit(Op));
665
611k
        Changed |= Op != Operands.back();
666
611k
      }
667
305k
      return !Changed ? 
Expr304k
668
305k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
669
1.55k
                                         Expr->getNoWrapFlags());
670
305k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
660
470
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
661
470
      SmallVector<const SCEV *, 2> Operands;
662
470
      bool Changed = false;
663
1.04k
      for (auto *Op : Expr->operands()) {
664
1.04k
        Operands.push_back(((SC*)this)->visit(Op));
665
1.04k
        Changed |= Op != Operands.back();
666
1.04k
      }
667
470
      return !Changed ? Expr
668
470
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
669
0
                                         Expr->getNoWrapFlags());
670
470
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
660
302k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
661
302k
      SmallVector<const SCEV *, 2> Operands;
662
302k
      bool Changed = false;
663
604k
      for (auto *Op : Expr->operands()) {
664
604k
        Operands.push_back(((SC*)this)->visit(Op));
665
604k
        Changed |= Op != Operands.back();
666
604k
      }
667
302k
      return !Changed ? 
Expr300k
668
302k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
669
1.45k
                                         Expr->getNoWrapFlags());
670
302k
    }
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
660
8
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
661
8
      SmallVector<const SCEV *, 2> Operands;
662
8
      bool Changed = false;
663
16
      for (auto *Op : Expr->operands()) {
664
16
        Operands.push_back(((SC*)this)->visit(Op));
665
16
        Changed |= Op != Operands.back();
666
16
      }
667
8
      return !Changed ? 
Expr0
668
8
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
669
8
                                         Expr->getNoWrapFlags());
670
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
660
3.27k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
661
3.27k
      SmallVector<const SCEV *, 2> Operands;
662
3.27k
      bool Changed = false;
663
6.63k
      for (auto *Op : Expr->operands()) {
664
6.63k
        Operands.push_back(((SC*)this)->visit(Op));
665
6.63k
        Changed |= Op != Operands.back();
666
6.63k
      }
667
3.27k
      return !Changed ? 
Expr3.19k
668
3.27k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
669
88
                                         Expr->getNoWrapFlags());
670
3.27k
    }
671
672
55.7k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
55.7k
      SmallVector<const SCEV *, 2> Operands;
674
55.7k
      bool Changed = false;
675
112k
      for (auto *Op : Expr->operands()) {
676
112k
        Operands.push_back(((SC *)this)->visit(Op));
677
112k
        Changed |= Op != Operands.back();
678
112k
      }
679
55.7k
      return !Changed ? 
Expr50.5k
:
SE.getSMaxExpr(Operands)5.20k
;
680
55.7k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
672
785
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
785
      SmallVector<const SCEV *, 2> Operands;
674
785
      bool Changed = false;
675
1.58k
      for (auto *Op : Expr->operands()) {
676
1.58k
        Operands.push_back(((SC *)this)->visit(Op));
677
1.58k
        Changed |= Op != Operands.back();
678
1.58k
      }
679
785
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
680
785
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
672
769
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
769
      SmallVector<const SCEV *, 2> Operands;
674
769
      bool Changed = false;
675
1.67k
      for (auto *Op : Expr->operands()) {
676
1.67k
        Operands.push_back(((SC *)this)->visit(Op));
677
1.67k
        Changed |= Op != Operands.back();
678
1.67k
      }
679
769
      return !Changed ? 
Expr716
:
SE.getSMaxExpr(Operands)53
;
680
769
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
672
21.1k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
21.1k
      SmallVector<const SCEV *, 2> Operands;
674
21.1k
      bool Changed = false;
675
42.6k
      for (auto *Op : Expr->operands()) {
676
42.6k
        Operands.push_back(((SC *)this)->visit(Op));
677
42.6k
        Changed |= Op != Operands.back();
678
42.6k
      }
679
21.1k
      return !Changed ? 
Expr18.6k
:
SE.getSMaxExpr(Operands)2.46k
;
680
21.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
672
20.9k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
20.9k
      SmallVector<const SCEV *, 2> Operands;
674
20.9k
      bool Changed = false;
675
42.2k
      for (auto *Op : Expr->operands()) {
676
42.2k
        Operands.push_back(((SC *)this)->visit(Op));
677
42.2k
        Changed |= Op != Operands.back();
678
42.2k
      }
679
20.9k
      return !Changed ? 
Expr18.5k
:
SE.getSMaxExpr(Operands)2.36k
;
680
20.9k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
672
4.40k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
4.40k
      SmallVector<const SCEV *, 2> Operands;
674
4.40k
      bool Changed = false;
675
8.82k
      for (auto *Op : Expr->operands()) {
676
8.82k
        Operands.push_back(((SC *)this)->visit(Op));
677
8.82k
        Changed |= Op != Operands.back();
678
8.82k
      }
679
4.40k
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
680
4.40k
    }
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
672
7.70k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
7.70k
      SmallVector<const SCEV *, 2> Operands;
674
7.70k
      bool Changed = false;
675
15.6k
      for (auto *Op : Expr->operands()) {
676
15.6k
        Operands.push_back(((SC *)this)->visit(Op));
677
15.6k
        Changed |= Op != Operands.back();
678
15.6k
      }
679
7.70k
      return !Changed ? 
Expr7.38k
:
SE.getSMaxExpr(Operands)320
;
680
7.70k
    }
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
672
61
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
673
61
      SmallVector<const SCEV *, 2> Operands;
674
61
      bool Changed = false;
675
132
      for (auto *Op : Expr->operands()) {
676
132
        Operands.push_back(((SC *)this)->visit(Op));
677
132
        Changed |= Op != Operands.back();
678
132
      }
679
61
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
680
61
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
681
682
24.4k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
24.4k
      SmallVector<const SCEV *, 2> Operands;
684
24.4k
      bool Changed = false;
685
49.1k
      for (auto *Op : Expr->operands()) {
686
49.1k
        Operands.push_back(((SC*)this)->visit(Op));
687
49.1k
        Changed |= Op != Operands.back();
688
49.1k
      }
689
24.4k
      return !Changed ? 
Expr24.0k
:
SE.getUMaxExpr(Operands)372
;
690
24.4k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
682
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
682
      SmallVector<const SCEV *, 2> Operands;
684
682
      bool Changed = false;
685
1.38k
      for (auto *Op : Expr->operands()) {
686
1.38k
        Operands.push_back(((SC*)this)->visit(Op));
687
1.38k
        Changed |= Op != Operands.back();
688
1.38k
      }
689
682
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
690
682
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
394
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
394
      SmallVector<const SCEV *, 2> Operands;
684
394
      bool Changed = false;
685
894
      for (auto *Op : Expr->operands()) {
686
894
        Operands.push_back(((SC*)this)->visit(Op));
687
894
        Changed |= Op != Operands.back();
688
894
      }
689
394
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
690
394
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
3.80k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
3.80k
      SmallVector<const SCEV *, 2> Operands;
684
3.80k
      bool Changed = false;
685
7.68k
      for (auto *Op : Expr->operands()) {
686
7.68k
        Operands.push_back(((SC*)this)->visit(Op));
687
7.68k
        Changed |= Op != Operands.back();
688
7.68k
      }
689
3.80k
      return !Changed ? 
Expr3.80k
:
SE.getUMaxExpr(Operands)6
;
690
3.80k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
3.77k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
3.77k
      SmallVector<const SCEV *, 2> Operands;
684
3.77k
      bool Changed = false;
685
7.62k
      for (auto *Op : Expr->operands()) {
686
7.62k
        Operands.push_back(((SC*)this)->visit(Op));
687
7.62k
        Changed |= Op != Operands.back();
688
7.62k
      }
689
3.77k
      return !Changed ? 
Expr3.77k
:
SE.getUMaxExpr(Operands)4
;
690
3.77k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
4.01k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
4.01k
      SmallVector<const SCEV *, 2> Operands;
684
4.01k
      bool Changed = false;
685
8.03k
      for (auto *Op : Expr->operands()) {
686
8.03k
        Operands.push_back(((SC*)this)->visit(Op));
687
8.03k
        Changed |= Op != Operands.back();
688
8.03k
      }
689
4.01k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
690
4.01k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
11.6k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
11.6k
      SmallVector<const SCEV *, 2> Operands;
684
11.6k
      bool Changed = false;
685
23.4k
      for (auto *Op : Expr->operands()) {
686
23.4k
        Operands.push_back(((SC*)this)->visit(Op));
687
23.4k
        Changed |= Op != Operands.back();
688
23.4k
      }
689
11.6k
      return !Changed ? 
Expr11.3k
:
SE.getUMaxExpr(Operands)362
;
690
11.6k
    }
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
682
16
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
16
      SmallVector<const SCEV *, 2> Operands;
684
16
      bool Changed = false;
685
32
      for (auto *Op : Expr->operands()) {
686
32
        Operands.push_back(((SC*)this)->visit(Op));
687
32
        Changed |= Op != Operands.back();
688
32
      }
689
16
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
690
16
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
682
15
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
683
15
      SmallVector<const SCEV *, 2> Operands;
684
15
      bool Changed = false;
685
30
      for (auto *Op : Expr->operands()) {
686
30
        Operands.push_back(((SC*)this)->visit(Op));
687
30
        Changed |= Op != Operands.back();
688
30
      }
689
15
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
690
15
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
691
692
2.34M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
693
2.34M
      return Expr;
694
2.34M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
692
2.34M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
693
2.34M
      return Expr;
694
2.34M
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
692
2.41k
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
693
2.41k
      return Expr;
694
2.41k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
692
616
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
693
616
      return Expr;
694
616
    }
695
696
302k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
697
302k
      return Expr;
698
302k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Line
Count
Source
696
302k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
697
302k
      return Expr;
698
302k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: 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*)
699
  };
700
701
  using ValueToValueMap = DenseMap<const Value *, Value *>;
702
703
  /// The SCEVParameterRewriter takes a scalar evolution expression and updates
704
  /// the SCEVUnknown components following the Map (Value -> Value).
705
  class SCEVParameterRewriter : public SCEVRewriteVisitor<SCEVParameterRewriter> {
706
  public:
707
    static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
708
                               ValueToValueMap &Map,
709
277
                               bool InterpretConsts = false) {
710
277
      SCEVParameterRewriter Rewriter(SE, Map, InterpretConsts);
711
277
      return Rewriter.visit(Scev);
712
277
    }
713
714
    SCEVParameterRewriter(ScalarEvolution &SE, ValueToValueMap &M, bool C)
715
277
      : SCEVRewriteVisitor(SE), Map(M), InterpretConsts(C) {}
716
717
58
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
718
58
      Value *V = Expr->getValue();
719
58
      if (Map.count(V)) {
720
6
        Value *NV = Map[V];
721
6
        if (InterpretConsts && 
isa<ConstantInt>(NV)4
)
722
4
          return SE.getConstant(cast<ConstantInt>(NV));
723
2
        return SE.getUnknown(NV);
724
2
      }
725
52
      return Expr;
726
52
    }
727
728
  private:
729
    ValueToValueMap &Map;
730
    bool InterpretConsts;
731
  };
732
733
  using LoopToScevMapT = DenseMap<const Loop *, const SCEV *>;
734
735
  /// The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies
736
  /// the Map (Loop -> SCEV) to all AddRecExprs.
737
  class SCEVLoopAddRecRewriter
738
      : public SCEVRewriteVisitor<SCEVLoopAddRecRewriter> {
739
  public:
740
    SCEVLoopAddRecRewriter(ScalarEvolution &SE, LoopToScevMapT &M)
741
699
        : SCEVRewriteVisitor(SE), Map(M) {}
742
743
    static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
744
699
                               ScalarEvolution &SE) {
745
699
      SCEVLoopAddRecRewriter Rewriter(SE, Map);
746
699
      return Rewriter.visit(Scev);
747
699
    }
748
749
678
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
750
678
      SmallVector<const SCEV *, 2> Operands;
751
678
      for (const SCEV *Op : Expr->operands())
752
1.35k
        Operands.push_back(visit(Op));
753
678
754
678
      const Loop *L = Expr->getLoop();
755
678
      const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags());
756
678
757
678
      if (0 == Map.count(L))
758
1
        return Res;
759
677
760
677
      const SCEVAddRecExpr *Rec = cast<SCEVAddRecExpr>(Res);
761
677
      return Rec->evaluateAtIteration(Map[L], SE);
762
677
    }
763
764
  private:
765
    LoopToScevMapT &Map;
766
  };
767
768
} // end namespace llvm
769
770
#endif // LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H