Coverage Report

Created: 2019-07-24 05:18

/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, scUMinExpr, scSMinExpr,
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.55M
      SCEV(ID, scConstant, 1), V(v) {}
54
55
  public:
56
359M
    ConstantInt *getValue() const { return V; }
57
214M
    const APInt &getAPInt() const { return getValue()->getValue(); }
58
59
114M
    Type *getType() const { return V->getType(); }
60
61
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
62
566M
    static bool classof(const SCEV *S) {
63
566M
      return S->getSCEVType() == scConstant;
64
566M
    }
65
  };
66
67
14.2M
  static unsigned short computeExpressionSize(ArrayRef<const SCEV *> Args) {
68
14.2M
    APInt Size(16, 1);
69
14.2M
    for (auto *Arg : Args)
70
28.1M
      Size = Size.uadd_sat(APInt(16, Arg->getExpressionSize()));
71
14.2M
    return (unsigned short)Size.getZExtValue();
72
14.2M
  }
Unexecuted instantiation: cc1_main.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AArch64FalkorHWPFFix.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AArch64ISelLowering.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AArch64StackTagging.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AArch64TargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AArch64TargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AMDGPUTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AMDGPUTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AMDGPUBaseInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ARMISelLowering.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ARMParallelDSP.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ARMTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ARMTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: HexagonLoopIdiomRecognition.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: HexagonTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: HexagonTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LanaiTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: MipsTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: NVPTXTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: NVPTXTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PPCLoopPreIncPrep.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PPCTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PPCTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: RISCVTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: RISCVTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SystemZTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SystemZTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: WebAssemblyTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: WebAssemblyTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: X86InterleavedAccess.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: X86TargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: X86TargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: XCoreTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AliasAnalysis.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ConstantFolding.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: DependenceAnalysis.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IVDescriptors.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IVUsers.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: InstructionSimplify.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopAccessAnalysis.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopAnalysisManager.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnrollAnalyzer.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopPass.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
ScalarEvolution.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Line
Count
Source
67
14.2M
  static unsigned short computeExpressionSize(ArrayRef<const SCEV *> Args) {
68
14.2M
    APInt Size(16, 1);
69
14.2M
    for (auto *Arg : Args)
70
28.1M
      Size = Size.uadd_sat(APInt(16, Arg->getExpressionSize()));
71
14.2M
    return (unsigned short)Size.getZExtValue();
72
14.2M
  }
Unexecuted instantiation: ScalarEvolutionAliasAnalysis.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScalarEvolutionExpander.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScalarEvolutionNormalization.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: TargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VectorUtils.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: BasicTargetTransformInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: CodeGenPrepare.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: HardwareLoops.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LLVMTargetMachine.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: MachineFunctionPass.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SafeStack.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PassManagerBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: InstCombineCalls.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: InstCombineVectorOps.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: AlignmentFromAssumptions.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: GuardWidening.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IVUsersPrinter.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: InductiveRangeCheckElimination.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IndVarSimplify.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LICM.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopAccessAnalysisPrinter.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopSink.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopDeletion.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopDataPrefetch.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopDistribute.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopFuse.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopIdiomRecognize.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopInstSimplify.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopInterchange.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopLoadElimination.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopPassManager.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopPredication.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopRerollPass.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopRotation.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopSimplifyCFG.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopStrengthReduce.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnrollPass.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnrollAndJamPass.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnswitch.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopVersioningLICM.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: Scalarizer.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SimpleLoopUnswitch.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: InlineFunction.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LCSSA.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: Local.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopRotationUtils.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopSimplify.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnrollAndJam.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnrollPeel.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUnrollRuntime.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopUtils.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopVersioning.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SimplifyIndVar.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoadStoreVectorizer.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopVectorizationLegality.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopVectorize.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SLPVectorizer.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VPlan.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VPlanHCFGBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VPlanHCFGTransforms.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VPlanPredicator.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VPlanVerifier.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: BackendUtil.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: DependenceInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PolyhedralInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopDetection.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopInfo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopGraphPrinter.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopPass.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PruneUnprofitable.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: BlockGenerators.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IslAst.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IslExprBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IslNodeBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: CodeGeneration.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LoopGenerators.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: IRBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: Utils.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PerfMonitor.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: JSONExporter.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SCEVAffinator.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SCEVValidator.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: RegisterPasses.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopHelper.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: VirtualInstruction.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: DeadCodeElimination.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScheduleOptimizer.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: FlattenSchedule.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ForwardOpTree.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: DeLICM.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ZoneAlgo.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: Simplify.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: MaximalStaticExpansion.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: ScopInliner.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: SelectionDAGBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: LTOBackend.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: PassBuilder.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: NewPMDriver.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: opt.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: Delinearization.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
Unexecuted instantiation: Scalar.cpp:llvm::computeExpressionSize(llvm::ArrayRef<llvm::SCEV const*>)
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
36.6M
    const SCEV *getOperand() const { return Op; }
85
11.7M
    Type *getType() const { return Ty; }
86
87
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
88
24.7M
    static bool classof(const SCEV *S) {
89
24.7M
      return S->getSCEVType() == scTruncate ||
90
24.7M
             
S->getSCEVType() == scZeroExtend24.4M
||
91
24.7M
             
S->getSCEVType() == scSignExtend23.3M
;
92
24.7M
    }
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
62.5M
    static bool classof(const SCEV *S) {
106
62.5M
      return S->getSCEVType() == scTruncate;
107
62.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
34.4M
    static bool classof(const SCEV *S) {
121
34.4M
      return S->getSCEVType() == scZeroExtend;
122
34.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.8M
    static bool classof(const SCEV *S) {
136
31.8M
      return S->getSCEVType() == scSignExtend;
137
31.8M
    }
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.2M
          NumOperands(N) {}
155
156
  public:
157
164M
    size_t getNumOperands() const { return NumOperands; }
158
159
293M
    const SCEV *getOperand(unsigned i) const {
160
293M
      assert(i < NumOperands && "Operand index out of range!");
161
293M
      return Operands[i];
162
293M
    }
163
164
    using op_iterator = const SCEV *const *;
165
    using op_range = iterator_range<op_iterator>;
166
167
146M
    op_iterator op_begin() const { return Operands; }
168
146M
    op_iterator op_end() const { return Operands + NumOperands; }
169
91.9M
    op_range operands() const {
170
91.9M
      return make_range(op_begin(), op_end());
171
91.9M
    }
172
173
65.6M
    Type *getType() const { return getOperand(0)->getType(); }
174
175
35.8M
    NoWrapFlags getNoWrapFlags(NoWrapFlags Mask = NoWrapMask) const {
176
35.8M
      return (NoWrapFlags)(SubclassData & Mask);
177
35.8M
    }
178
179
10.2M
    bool hasNoUnsignedWrap() const {
180
10.2M
      return getNoWrapFlags(FlagNUW) != FlagAnyWrap;
181
10.2M
    }
182
183
11.1M
    bool hasNoSignedWrap() const {
184
11.1M
      return getNoWrapFlags(FlagNSW) != FlagAnyWrap;
185
11.1M
    }
186
187
68.8k
    bool hasNoSelfWrap() const {
188
68.8k
      return getNoWrapFlags(FlagNW) != FlagAnyWrap;
189
68.8k
    }
190
191
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
192
17.1M
    static bool classof(const SCEV *S) {
193
17.1M
      return S->getSCEVType() == scAddExpr || 
S->getSCEVType() == scMulExpr10.2M
||
194
17.1M
             
S->getSCEVType() == scSMaxExpr3.52M
||
S->getSCEVType() == scUMaxExpr3.41M
||
195
17.1M
             
S->getSCEVType() == scSMinExpr3.38M
||
S->getSCEVType() == scUMinExpr3.37M
||
196
17.1M
             
S->getSCEVType() == scAddRecExpr3.26M
;
197
17.1M
    }
198
  };
199
200
  /// This node is the base class for n'ary commutative operators.
201
  class SCEVCommutativeExpr : public SCEVNAryExpr {
202
  protected:
203
    SCEVCommutativeExpr(const FoldingSetNodeIDRef ID,
204
                        enum SCEVTypes T, const SCEV *const *O, size_t N)
205
6.76M
      : SCEVNAryExpr(ID, T, O, N) {}
206
207
  public:
208
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
209
2.63M
    static bool classof(const SCEV *S) {
210
2.63M
      return S->getSCEVType() == scAddExpr || 
S->getSCEVType() == scMulExpr1.74M
||
211
2.63M
             
S->getSCEVType() == scSMaxExpr1.40M
||
S->getSCEVType() == scUMaxExpr1.37M
||
212
2.63M
             
S->getSCEVType() == scSMinExpr1.36M
||
S->getSCEVType() == scUMinExpr1.35M
;
213
2.63M
    }
214
215
    /// Set flags for a non-recurrence without clearing previously set flags.
216
21.7M
    void setNoWrapFlags(NoWrapFlags Flags) {
217
21.7M
      SubclassData |= Flags;
218
21.7M
    }
219
  };
220
221
  /// This node represents an addition of some number of SCEVs.
222
  class SCEVAddExpr : public SCEVCommutativeExpr {
223
    friend class ScalarEvolution;
224
225
    SCEVAddExpr(const FoldingSetNodeIDRef ID,
226
                const SCEV *const *O, size_t N)
227
5.14M
      : SCEVCommutativeExpr(ID, scAddExpr, O, N) {}
228
229
  public:
230
30.8M
    Type *getType() const {
231
30.8M
      // Use the type of the last operand, which is likely to be a pointer
232
30.8M
      // type, if there is one. This doesn't usually matter, but it can help
233
30.8M
      // reduce casts when the expressions are expanded.
234
30.8M
      return getOperand(getNumOperands() - 1)->getType();
235
30.8M
    }
236
237
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
238
185M
    static bool classof(const SCEV *S) {
239
185M
      return S->getSCEVType() == scAddExpr;
240
185M
    }
241
  };
242
243
  /// This node represents multiplication of some number of SCEVs.
244
  class SCEVMulExpr : public SCEVCommutativeExpr {
245
    friend class ScalarEvolution;
246
247
    SCEVMulExpr(const FoldingSetNodeIDRef ID,
248
                const SCEV *const *O, size_t N)
249
1.47M
      : SCEVCommutativeExpr(ID, scMulExpr, O, N) {}
250
251
  public:
252
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
253
164M
    static bool classof(const SCEV *S) {
254
164M
      return S->getSCEVType() == scMulExpr;
255
164M
    }
256
  };
257
258
  /// This class represents a binary unsigned division operation.
259
  class SCEVUDivExpr : public SCEV {
260
    friend class ScalarEvolution;
261
262
    const SCEV *LHS;
263
    const SCEV *RHS;
264
265
    SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs)
266
        : SCEV(ID, scUDivExpr, computeExpressionSize({lhs, rhs})), LHS(lhs),
267
192k
          RHS(rhs) {}
268
269
  public:
270
7.25M
    const SCEV *getLHS() const { return LHS; }
271
8.58M
    const SCEV *getRHS() const { return RHS; }
272
273
1.28M
    Type *getType() const {
274
1.28M
      // In most cases the types of LHS and RHS will be the same, but in some
275
1.28M
      // crazy cases one or the other may be a pointer. ScalarEvolution doesn't
276
1.28M
      // depend on the type for correctness, but handling types carefully can
277
1.28M
      // avoid extra casts in the SCEVExpander. The LHS is more likely to be
278
1.28M
      // a pointer type than the RHS, so use the RHS' type here.
279
1.28M
      return getRHS()->getType();
280
1.28M
    }
281
282
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
283
27.5M
    static bool classof(const SCEV *S) {
284
27.5M
      return S->getSCEVType() == scUDivExpr;
285
27.5M
    }
286
  };
287
288
  /// This node represents a polynomial recurrence on the trip count
289
  /// of the specified loop.  This is the primary focus of the
290
  /// ScalarEvolution framework; all the other SCEV subclasses are
291
  /// mostly just supporting infrastructure to allow SCEVAddRecExpr
292
  /// expressions to be created and analyzed.
293
  ///
294
  /// All operands of an AddRec are required to be loop invariant.
295
  ///
296
  class SCEVAddRecExpr : public SCEVNAryExpr {
297
    friend class ScalarEvolution;
298
299
    const Loop *L;
300
301
    SCEVAddRecExpr(const FoldingSetNodeIDRef ID,
302
                   const SCEV *const *O, size_t N, const Loop *l)
303
5.45M
      : SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {}
304
305
  public:
306
41.4M
    const SCEV *getStart() const { return Operands[0]; }
307
75.1M
    const Loop *getLoop() const { return L; }
308
309
    /// Constructs and returns the recurrence indicating how much this
310
    /// expression steps by.  If this is a polynomial of degree N, it
311
    /// returns a chrec of degree N-1.  We cannot determine whether
312
    /// the step recurrence has self-wraparound.
313
21.3M
    const SCEV *getStepRecurrence(ScalarEvolution &SE) const {
314
21.3M
      if (isAffine()) 
return getOperand(1)21.3M
;
315
159
      return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1,
316
159
                                                           op_end()),
317
159
                              getLoop(), FlagAnyWrap);
318
159
    }
319
320
    /// Return true if this represents an expression A + B*x where A
321
    /// and B are loop invariant values.
322
44.7M
    bool isAffine() const {
323
44.7M
      // We know that the start value is invariant.  This expression is thus
324
44.7M
      // affine iff the step is also invariant.
325
44.7M
      return getNumOperands() == 2;
326
44.7M
    }
327
328
    /// Return true if this represents an expression A + B*x + C*x^2
329
    /// where A, B and C are loop invariant values.  This corresponds
330
    /// to an addrec of the form {L,+,M,+,N}
331
229k
    bool isQuadratic() const {
332
229k
      return getNumOperands() == 3;
333
229k
    }
334
335
    /// Set flags for a recurrence without clearing any previously set flags.
336
    /// For AddRec, either NUW or NSW implies NW. Keep track of this fact here
337
    /// to make it easier to propagate flags.
338
20.8M
    void setNoWrapFlags(NoWrapFlags Flags) {
339
20.8M
      if (Flags & (FlagNUW | FlagNSW))
340
5.15M
        Flags = ScalarEvolution::setFlags(Flags, FlagNW);
341
20.8M
      SubclassData |= Flags;
342
20.8M
    }
343
344
    /// Return the value of this chain of recurrences at the specified
345
    /// iteration number.
346
    const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const;
347
348
    /// Return the number of iterations of this loop that produce
349
    /// values in the specified constant range.  Another way of
350
    /// looking at this is that it returns the first iteration number
351
    /// where the value is not in the condition, thus computing the
352
    /// exit count.  If the iteration count can't be computed, an
353
    /// instance of SCEVCouldNotCompute is returned.
354
    const SCEV *getNumIterationsInRange(const ConstantRange &Range,
355
                                        ScalarEvolution &SE) const;
356
357
    /// Return an expression representing the value of this expression
358
    /// one iteration of the loop ahead.
359
    const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const;
360
361
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
362
279M
    static bool classof(const SCEV *S) {
363
279M
      return S->getSCEVType() == scAddRecExpr;
364
279M
    }
365
  };
366
367
  /// This node is the base class min/max selections.
368
  class SCEVMinMaxExpr : public SCEVCommutativeExpr {
369
    friend class ScalarEvolution;
370
371
3.53M
    static bool isMinMaxType(enum SCEVTypes T) {
372
3.53M
      return T == scSMaxExpr || 
T == scUMaxExpr3.51M
||
T == scSMinExpr3.49M
||
373
3.53M
             
T == scUMinExpr3.49M
;
374
3.53M
    }
375
376
  protected:
377
    /// Note: Constructing subclasses via this constructor is allowed
378
    SCEVMinMaxExpr(const FoldingSetNodeIDRef ID, enum SCEVTypes T,
379
                   const SCEV *const *O, size_t N)
380
138k
        : SCEVCommutativeExpr(ID, T, O, N) {
381
138k
      assert(isMinMaxType(T));
382
138k
      // Min and max never overflow
383
138k
      setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW));
384
138k
    }
385
386
  public:
387
3.53M
    static bool classof(const SCEV *S) {
388
3.53M
      return isMinMaxType(static_cast<SCEVTypes>(S->getSCEVType()));
389
3.53M
    }
390
391
0
    static enum SCEVTypes negate(enum SCEVTypes T) {
392
0
      switch (T) {
393
0
      case scSMaxExpr:
394
0
        return scSMinExpr;
395
0
      case scSMinExpr:
396
0
        return scSMaxExpr;
397
0
      case scUMaxExpr:
398
0
        return scUMinExpr;
399
0
      case scUMinExpr:
400
0
        return scUMaxExpr;
401
0
      default:
402
0
        llvm_unreachable("Not a min or max SCEV type!");
403
0
      }
404
0
    }
405
  };
406
407
  /// This class represents a signed maximum selection.
408
  class SCEVSMaxExpr : public SCEVMinMaxExpr {
409
    friend class ScalarEvolution;
410
411
    SCEVSMaxExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N)
412
0
        : SCEVMinMaxExpr(ID, scSMaxExpr, O, N) {}
413
414
  public:
415
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
416
18.3M
    static bool classof(const SCEV *S) {
417
18.3M
      return S->getSCEVType() == scSMaxExpr;
418
18.3M
    }
419
  };
420
421
  /// This class represents an unsigned maximum selection.
422
  class SCEVUMaxExpr : public SCEVMinMaxExpr {
423
    friend class ScalarEvolution;
424
425
    SCEVUMaxExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N)
426
0
        : SCEVMinMaxExpr(ID, scUMaxExpr, O, N) {}
427
428
  public:
429
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
430
17.4M
    static bool classof(const SCEV *S) {
431
17.4M
      return S->getSCEVType() == scUMaxExpr;
432
17.4M
    }
433
  };
434
435
  /// This class represents a signed minimum selection.
436
  class SCEVSMinExpr : public SCEVMinMaxExpr {
437
    friend class ScalarEvolution;
438
439
    SCEVSMinExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N)
440
0
        : SCEVMinMaxExpr(ID, scSMinExpr, O, N) {}
441
442
  public:
443
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
444
2.56M
    static bool classof(const SCEV *S) {
445
2.56M
      return S->getSCEVType() == scSMinExpr;
446
2.56M
    }
447
  };
448
449
  /// This class represents an unsigned minimum selection.
450
  class SCEVUMinExpr : public SCEVMinMaxExpr {
451
    friend class ScalarEvolution;
452
453
    SCEVUMinExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N)
454
0
        : SCEVMinMaxExpr(ID, scUMinExpr, O, N) {}
455
456
  public:
457
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
458
1.88M
    static bool classof(const SCEV *S) {
459
1.88M
      return S->getSCEVType() == scUMinExpr;
460
1.88M
    }
461
  };
462
463
  /// This means that we are dealing with an entirely unknown SCEV
464
  /// value, and only represent it as its LLVM Value.  This is the
465
  /// "bottom" value for the analysis.
466
  class SCEVUnknown final : public SCEV, private CallbackVH {
467
    friend class ScalarEvolution;
468
469
    /// The parent ScalarEvolution value. This is used to update the
470
    /// parent's maps when the value associated with a SCEVUnknown is
471
    /// deleted or RAUW'd.
472
    ScalarEvolution *SE;
473
474
    /// The next pointer in the linked list of all SCEVUnknown
475
    /// instances owned by a ScalarEvolution.
476
    SCEVUnknown *Next;
477
478
    SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V,
479
                ScalarEvolution *se, SCEVUnknown *next) :
480
3.71M
      SCEV(ID, scUnknown, 1), CallbackVH(V), SE(se), Next(next) {}
481
482
    // Implement CallbackVH.
483
    void deleted() override;
484
    void allUsesReplacedWith(Value *New) override;
485
486
  public:
487
66.7M
    Value *getValue() const { return getValPtr(); }
488
489
    /// @{
490
    /// Test whether this is a special constant representing a type
491
    /// size, alignment, or field offset in a target-independent
492
    /// manner, and hasn't happened to have been folded with other
493
    /// operations into something unrecognizable. This is mainly only
494
    /// useful for pretty-printing and other situations where it isn't
495
    /// absolutely required for these to succeed.
496
    bool isSizeOf(Type *&AllocTy) const;
497
    bool isAlignOf(Type *&AllocTy) const;
498
    bool isOffsetOf(Type *&STy, Constant *&FieldNo) const;
499
    /// @}
500
501
52.9M
    Type *getType() const { return getValPtr()->getType(); }
502
503
    /// Methods for support type inquiry through isa, cast, and dyn_cast:
504
255M
    static bool classof(const SCEV *S) {
505
255M
      return S->getSCEVType() == scUnknown;
506
255M
    }
507
  };
508
509
  /// This class defines a simple visitor class that may be used for
510
  /// various SCEV analysis purposes.
511
  template<typename SC, typename RetVal=void>
512
  struct SCEVVisitor {
513
19.6M
    RetVal visit(const SCEV *S) {
514
19.6M
      switch (S->getSCEVType()) {
515
19.6M
      case scConstant:
516
6.19M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
19.6M
      case scTruncate:
518
52.4k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
19.6M
      case scZeroExtend:
520
251k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
19.6M
      case scSignExtend:
522
683k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
19.6M
      case scAddExpr:
524
2.18M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
19.6M
      case scMulExpr:
526
860k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
19.6M
      case scUDivExpr:
528
93.3k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
19.6M
      case scAddRecExpr:
530
4.03M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
19.6M
      case scSMaxExpr:
532
36.4k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
19.6M
      case scUMaxExpr:
534
11.7k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
19.6M
      case scSMinExpr:
536
6.57k
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
19.6M
      case scUMinExpr:
538
13.4k
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
19.6M
      case scUnknown:
540
4.96M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
19.6M
      case scCouldNotCompute:
542
301k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
19.6M
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
19.6M
      }
546
19.6M
    }
llvm::SCEVVisitor<llvm::SCEVParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
383
    RetVal visit(const SCEV *S) {
514
383
      switch (S->getSCEVType()) {
515
383
      case scConstant:
516
267
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
383
      case scTruncate:
518
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
383
      case scZeroExtend:
520
2
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
383
      case scSignExtend:
522
2
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
383
      case scAddExpr:
524
13
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
383
      case scMulExpr:
526
35
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
383
      case scUDivExpr:
528
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
383
      case scAddRecExpr:
530
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
383
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
383
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
383
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
383
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
383
      case scUnknown:
540
58
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
383
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
383
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
383
      }
546
383
    }
llvm::SCEVVisitor<llvm::SCEVLoopAddRecRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
2.42k
    RetVal visit(const SCEV *S) {
514
2.42k
      switch (S->getSCEVType()) {
515
2.42k
      case scConstant:
516
884
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
2.42k
      case scTruncate:
518
2
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
2.42k
      case scZeroExtend:
520
11
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
2.42k
      case scSignExtend:
522
28
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
2.42k
      case scAddExpr:
524
126
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
2.42k
      case scMulExpr:
526
67
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
2.42k
      case scUDivExpr:
528
5
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
2.42k
      case scAddRecExpr:
530
680
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
2.42k
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
2.42k
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
2.42k
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
2.42k
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
2.42k
      case scUnknown:
540
618
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
2.42k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
2.42k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
2.42k
      }
546
2.42k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
339k
    RetVal visit(const SCEV *S) {
514
339k
      switch (S->getSCEVType()) {
515
339k
      case scConstant:
516
217k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
339k
      case scTruncate:
518
759
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
339k
      case scZeroExtend:
520
4.38k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
339k
      case scSignExtend:
522
24.2k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
339k
      case scAddExpr:
524
2.93k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
339k
      case scMulExpr:
526
30.0k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
339k
      case scUDivExpr:
528
980
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
339k
      case scAddRecExpr:
530
510
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
339k
      case scSMaxExpr:
532
415
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
339k
      case scUMaxExpr:
534
13
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
339k
      case scSMinExpr:
536
368
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
339k
      case scUMinExpr:
538
621
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
339k
      case scUnknown:
540
56.5k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
339k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
339k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
339k
      }
546
339k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVShiftRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
396k
    RetVal visit(const SCEV *S) {
514
396k
      switch (S->getSCEVType()) {
515
396k
      case scConstant:
516
34.1k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
396k
      case scTruncate:
518
1.27k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
396k
      case scZeroExtend:
520
6.45k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
396k
      case scSignExtend:
522
983
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
396k
      case scAddExpr:
524
2.13k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
396k
      case scMulExpr:
526
16.6k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
396k
      case scUDivExpr:
528
16.1k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
396k
      case scAddRecExpr:
530
11.3k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
396k
      case scSMaxExpr:
532
799
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
396k
      case scUMaxExpr:
534
379
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
396k
      case scSMinExpr:
536
228
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
396k
      case scUMinExpr:
538
362
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
396k
      case scUnknown:
540
305k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
396k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
396k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
396k
      }
546
396k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVInitRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
1.65M
    RetVal visit(const SCEV *S) {
514
1.65M
      switch (S->getSCEVType()) {
515
1.65M
      case scConstant:
516
341k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
1.65M
      case scTruncate:
518
5.93k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
1.65M
      case scZeroExtend:
520
60.1k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
1.65M
      case scSignExtend:
522
55.0k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
1.65M
      case scAddExpr:
524
58.1k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
1.65M
      case scMulExpr:
526
30.8k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
1.65M
      case scUDivExpr:
528
8.40k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
1.65M
      case scAddRecExpr:
530
511k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
1.65M
      case scSMaxExpr:
532
11.8k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
1.65M
      case scUMaxExpr:
534
2.96k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
1.65M
      case scSMinExpr:
536
1.27k
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
1.65M
      case scUMinExpr:
538
698
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
1.65M
      case scUnknown:
540
263k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
1.65M
      case scCouldNotCompute:
542
301k
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
1.65M
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
1.65M
      }
546
1.65M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPostIncRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
1.21M
    RetVal visit(const SCEV *S) {
514
1.21M
      switch (S->getSCEVType()) {
515
1.21M
      case scConstant:
516
326k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
1.21M
      case scTruncate:
518
4.46k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
1.21M
      case scZeroExtend:
520
47.6k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
1.21M
      case scSignExtend:
522
37.2k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
1.21M
      case scAddExpr:
524
45.5k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
1.21M
      case scMulExpr:
526
29.1k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
1.21M
      case scUDivExpr:
528
7.79k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
1.21M
      case scAddRecExpr:
530
500k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
1.21M
      case scSMaxExpr:
532
11.8k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
1.21M
      case scUMaxExpr:
534
2.94k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
1.21M
      case scSMinExpr:
536
1.18k
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
1.21M
      case scUMinExpr:
538
674
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
1.21M
      case scUnknown:
540
197k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
1.21M
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
1.21M
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
1.21M
      }
546
1.21M
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVDivision, void>::visit(llvm::SCEV const*)
Line
Count
Source
513
15.5k
    RetVal visit(const SCEV *S) {
514
15.5k
      switch (S->getSCEVType()) {
515
15.5k
      case scConstant:
516
2.55k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
15.5k
      case scTruncate:
518
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
15.5k
      case scZeroExtend:
520
152
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
15.5k
      case scSignExtend:
522
62
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
15.5k
      case scAddExpr:
524
663
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
15.5k
      case scMulExpr:
526
4.56k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
15.5k
      case scUDivExpr:
528
6
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
15.5k
      case scAddRecExpr:
530
5.95k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
15.5k
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
15.5k
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
15.5k
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
15.5k
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
15.5k
      case scUnknown:
540
1.63k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
15.5k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
15.5k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
15.5k
      }
546
15.5k
    }
ScalarEvolution.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVPredicateRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
1.93M
    RetVal visit(const SCEV *S) {
514
1.93M
      switch (S->getSCEVType()) {
515
1.93M
      case scConstant:
516
593k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
1.93M
      case scTruncate:
518
6.22k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
1.93M
      case scZeroExtend:
520
14.4k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
1.93M
      case scSignExtend:
522
122k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
1.93M
      case scAddExpr:
524
225k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
1.93M
      case scMulExpr:
526
157k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
1.93M
      case scUDivExpr:
528
4.52k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
1.93M
      case scAddRecExpr:
530
303k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
1.93M
      case scSMaxExpr:
532
3.03k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
1.93M
      case scUMaxExpr:
534
19
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
1.93M
      case scSMinExpr:
536
1.39k
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
1.93M
      case scUMinExpr:
538
4.00k
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
1.93M
      case scUnknown:
540
501k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
1.93M
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
1.93M
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
1.93M
      }
546
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
513
2.49M
    RetVal visit(const SCEV *S) {
514
2.49M
      switch (S->getSCEVType()) {
515
2.49M
      case scConstant:
516
514k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
2.49M
      case scTruncate:
518
998
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
2.49M
      case scZeroExtend:
520
4.20k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
2.49M
      case scSignExtend:
522
3.88k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
2.49M
      case scAddExpr:
524
424k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
2.49M
      case scMulExpr:
526
27.4k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
2.49M
      case scUDivExpr:
528
5.49k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
2.49M
      case scAddRecExpr:
530
277k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
2.49M
      case scSMaxExpr:
532
889
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
2.49M
      case scUMaxExpr:
534
277
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
2.49M
      case scSMinExpr:
536
312
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
2.49M
      case scUMinExpr:
538
322
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
2.49M
      case scUnknown:
540
1.23M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
2.49M
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
2.49M
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
2.49M
      }
546
2.49M
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
11.4M
    RetVal visit(const SCEV *S) {
514
11.4M
      switch (S->getSCEVType()) {
515
11.4M
      case scConstant:
516
4.05M
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
11.4M
      case scTruncate:
518
32.2k
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
11.4M
      case scZeroExtend:
520
113k
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
11.4M
      case scSignExtend:
522
435k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
11.4M
      case scAddExpr:
524
1.41M
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
11.4M
      case scMulExpr:
526
555k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
11.4M
      case scUDivExpr:
528
49.3k
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
11.4M
      case scAddRecExpr:
530
2.38M
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
11.4M
      case scSMaxExpr:
532
6.07k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
11.4M
      case scUMaxExpr:
534
5.05k
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
11.4M
      case scSMinExpr:
536
1.75k
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
11.4M
      case scUMinExpr:
538
6.70k
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
11.4M
      case scUnknown:
540
2.37M
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
11.4M
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
11.4M
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
11.4M
      }
546
11.4M
    }
StackSafetyAnalysis.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
556
    RetVal visit(const SCEV *S) {
514
556
      switch (S->getSCEVType()) {
515
556
      case scConstant:
516
0
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
556
      case scTruncate:
518
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
556
      case scZeroExtend:
520
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
556
      case scSignExtend:
522
0
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
556
      case scAddExpr:
524
136
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
556
      case scMulExpr:
526
0
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
556
      case scUDivExpr:
528
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
556
      case scAddRecExpr:
530
8
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
556
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
556
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
556
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
556
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
556
      case scUnknown:
540
412
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
556
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
556
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
556
      }
546
556
    }
SafeStack.cpp:llvm::SCEVVisitor<(anonymous namespace)::AllocaOffsetRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
196
    RetVal visit(const SCEV *S) {
514
196
      switch (S->getSCEVType()) {
515
196
      case scConstant:
516
31
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
196
      case scTruncate:
518
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
196
      case scZeroExtend:
520
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
196
      case scSignExtend:
522
3
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
196
      case scAddExpr:
524
34
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
196
      case scMulExpr:
526
6
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
196
      case scUDivExpr:
528
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
196
      case scAddRecExpr:
530
0
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
196
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
196
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
196
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
196
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
196
      case scUnknown:
540
122
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
196
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
196
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
196
      }
546
196
    }
llvm::SCEVVisitor<LoopFuser::AddRecLoopReplacer, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
53
    RetVal visit(const SCEV *S) {
514
53
      switch (S->getSCEVType()) {
515
53
      case scConstant:
516
6
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
53
      case scTruncate:
518
0
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
53
      case scZeroExtend:
520
0
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
53
      case scSignExtend:
522
0
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
53
      case scAddExpr:
524
6
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
53
      case scMulExpr:
526
6
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
53
      case scUDivExpr:
528
0
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
53
      case scAddRecExpr:
530
23
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
53
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
53
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
53
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
53
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
53
      case scUnknown:
540
12
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
53
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
53
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
53
      }
546
53
    }
ScopDetection.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVRemoveMax, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
12.2k
    RetVal visit(const SCEV *S) {
514
12.2k
      switch (S->getSCEVType()) {
515
12.2k
      case scConstant:
516
2.89k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
12.2k
      case scTruncate:
518
4
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
12.2k
      case scZeroExtend:
520
54
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
12.2k
      case scSignExtend:
522
205
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
12.2k
      case scAddExpr:
524
580
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
12.2k
      case scMulExpr:
526
2.64k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
12.2k
      case scUDivExpr:
528
12
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
12.2k
      case scAddRecExpr:
530
3.30k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
12.2k
      case scSMaxExpr:
532
69
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
12.2k
      case scUMaxExpr:
534
16
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
12.2k
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
12.2k
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
12.2k
      case scUnknown:
540
2.44k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
12.2k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
12.2k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
12.2k
      }
546
12.2k
    }
ScopInfo.cpp:llvm::SCEVVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
14.3k
    RetVal visit(const SCEV *S) {
514
14.3k
      switch (S->getSCEVType()) {
515
14.3k
      case scConstant:
516
6.47k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
14.3k
      case scTruncate:
518
77
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
14.3k
      case scZeroExtend:
520
152
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
14.3k
      case scSignExtend:
522
340
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
14.3k
      case scAddExpr:
524
297
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
14.3k
      case scMulExpr:
526
183
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
14.3k
      case scUDivExpr:
528
145
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
14.3k
      case scAddRecExpr:
530
325
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
14.3k
      case scSMaxExpr:
532
50
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
14.3k
      case scUMaxExpr:
534
7
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
14.3k
      case scSMinExpr:
536
10
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
14.3k
      case scUMinExpr:
538
8
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
14.3k
      case scUnknown:
540
6.30k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
14.3k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
14.3k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
14.3k
      }
546
14.3k
    }
llvm::SCEVVisitor<polly::SCEVAffinator, std::__1::pair<isl::noexceptions::pw_aff, isl::noexceptions::set> >::visit(llvm::SCEV const*)
Line
Count
Source
513
10.7k
    RetVal visit(const SCEV *S) {
514
10.7k
      switch (S->getSCEVType()) {
515
10.7k
      case scConstant:
516
5.39k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
10.7k
      case scTruncate:
518
51
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
10.7k
      case scZeroExtend:
520
113
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
10.7k
      case scSignExtend:
522
381
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
10.7k
      case scAddExpr:
524
262
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
10.7k
      case scMulExpr:
526
1
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
10.7k
      case scUDivExpr:
528
53
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
10.7k
      case scAddRecExpr:
530
4.32k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
10.7k
      case scSMaxExpr:
532
65
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
10.7k
      case scUMaxExpr:
534
0
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
10.7k
      case scSMinExpr:
536
4
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
10.7k
      case scUMinExpr:
538
0
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
10.7k
      case scUnknown:
540
92
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
10.7k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
10.7k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
10.7k
      }
546
10.7k
    }
llvm::SCEVVisitor<SCEVValidator, ValidatorResult>::visit(llvm::SCEV const*)
Line
Count
Source
513
146k
    RetVal visit(const SCEV *S) {
514
146k
      switch (S->getSCEVType()) {
515
146k
      case scConstant:
516
85.3k
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
146k
      case scTruncate:
518
283
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
146k
      case scZeroExtend:
520
823
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
146k
      case scSignExtend:
522
2.69k
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
146k
      case scAddExpr:
524
3.26k
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
146k
      case scMulExpr:
526
4.39k
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
146k
      case scUDivExpr:
528
410
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
146k
      case scAddRecExpr:
530
30.4k
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
146k
      case scSMaxExpr:
532
1.36k
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
146k
      case scUMaxExpr:
534
33
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
146k
      case scSMinExpr:
536
46
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
146k
      case scUMinExpr:
538
6
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
146k
      case scUnknown:
540
17.0k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
146k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
146k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
146k
      }
546
146k
    }
llvm::SCEVVisitor<ScopExpander, llvm::SCEV const*>::visit(llvm::SCEV const*)
Line
Count
Source
513
3.83k
    RetVal visit(const SCEV *S) {
514
3.83k
      switch (S->getSCEVType()) {
515
3.83k
      case scConstant:
516
935
        return ((SC*)this)->visitConstant((const SCEVConstant*)S);
517
3.83k
      case scTruncate:
518
74
        return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
519
3.83k
      case scZeroExtend:
520
22
        return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
521
3.83k
      case scSignExtend:
522
36
        return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
523
3.83k
      case scAddExpr:
524
517
        return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
525
3.83k
      case scMulExpr:
526
574
        return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
527
3.83k
      case scUDivExpr:
528
13
        return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
529
3.83k
      case scAddRecExpr:
530
38
        return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
531
3.83k
      case scSMaxExpr:
532
0
        return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
533
3.83k
      case scUMaxExpr:
534
1
        return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
535
3.83k
      case scSMinExpr:
536
0
        return ((SC *)this)->visitSMinExpr((const SCEVSMinExpr *)S);
537
3.83k
      case scUMinExpr:
538
1
        return ((SC *)this)->visitUMinExpr((const SCEVUMinExpr *)S);
539
3.83k
      case scUnknown:
540
1.61k
        return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
541
3.83k
      case scCouldNotCompute:
542
0
        return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
543
3.83k
      default:
544
0
        llvm_unreachable("Unknown SCEV type!");
545
3.83k
      }
546
3.83k
    }
547
548
0
    RetVal visitCouldNotCompute(const SCEVCouldNotCompute *S) {
549
0
      llvm_unreachable("Invalid use of SCEVCouldNotCompute!");
550
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*)
551
  };
552
553
  /// Visit all nodes in the expression tree using worklist traversal.
554
  ///
555
  /// Visitor implements:
556
  ///   // return true to follow this node.
557
  ///   bool follow(const SCEV *S);
558
  ///   // return true to terminate the search.
559
  ///   bool isDone();
560
  template<typename SV>
561
  class SCEVTraversal {
562
    SV &Visitor;
563
    SmallVector<const SCEV *, 8> Worklist;
564
    SmallPtrSet<const SCEV *, 8> Visited;
565
566
336M
    void push(const SCEV *S) {
567
336M
      if (Visited.insert(S).second && 
Visitor.follow(S)318M
)
568
314M
        Worklist.push_back(S);
569
336M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::push(llvm::SCEV const*)
Line
Count
Source
566
5.75M
    void push(const SCEV *S) {
567
5.75M
      if (Visited.insert(S).second && 
Visitor.follow(S)5.75M
)
568
2.25M
        Worklist.push_back(S);
569
5.75M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::push(llvm::SCEV const*)
Line
Count
Source
566
478k
    void push(const SCEV *S) {
567
478k
      if (Visited.insert(S).second && 
Visitor.follow(S)466k
)
568
243k
        Worklist.push_back(S);
569
478k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::push(llvm::SCEV const*)
Line
Count
Source
566
181
    void push(const SCEV *S) {
567
181
      if (Visited.insert(S).second && 
Visitor.follow(S)175
)
568
175
        Worklist.push_back(S);
569
181
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::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
566
4.09k
    void push(const SCEV *S) {
567
4.09k
      if (Visited.insert(S).second && 
Visitor.follow(S)4.05k
)
568
4.03k
        Worklist.push_back(S);
569
4.09k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
566
121M
    void push(const SCEV *S) {
567
121M
      if (Visited.insert(S).second && 
Visitor.follow(S)115M
)
568
115M
        Worklist.push_back(S);
569
121M
    }
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
566
2.71M
    void push(const SCEV *S) {
567
2.71M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.68M
)
568
2.43M
        Worklist.push_back(S);
569
2.71M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::push(llvm::SCEV const*)
Line
Count
Source
566
17.6k
    void push(const SCEV *S) {
567
17.6k
      if (Visited.insert(S).second && 
Visitor.follow(S)15.2k
)
568
15.2k
        Worklist.push_back(S);
569
17.6k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::push(llvm::SCEV const*)
Line
Count
Source
566
4.75k
    void push(const SCEV *S) {
567
4.75k
      if (Visited.insert(S).second && 
Visitor.follow(S)4.75k
)
568
3.63k
        Worklist.push_back(S);
569
4.75k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::push(llvm::SCEV const*)
Line
Count
Source
566
13.8k
    void push(const SCEV *S) {
567
13.8k
      if (Visited.insert(S).second && 
Visitor.follow(S)13.2k
)
568
11.8k
        Worklist.push_back(S);
569
13.8k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::push(llvm::SCEV const*)
Line
Count
Source
566
3.08k
    void push(const SCEV *S) {
567
3.08k
      if (Visited.insert(S).second && 
Visitor.follow(S)3.06k
)
568
2.99k
        Worklist.push_back(S);
569
3.08k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
566
111M
    void push(const SCEV *S) {
567
111M
      if (Visited.insert(S).second && 
Visitor.follow(S)105M
)
568
105M
        Worklist.push_back(S);
569
111M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::push(llvm::SCEV const*)
Line
Count
Source
566
83.4M
    void push(const SCEV *S) {
567
83.4M
      if (Visited.insert(S).second && 
Visitor.follow(S)77.7M
)
568
77.7M
        Worklist.push_back(S);
569
83.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>::push(llvm::SCEV const*)
Line
Count
Source
566
7.44M
    void push(const SCEV *S) {
567
7.44M
      if (Visited.insert(S).second && 
Visitor.follow(S)7.21M
)
568
7.21M
        Worklist.push_back(S);
569
7.44M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::push(llvm::SCEV const*)
Line
Count
Source
566
2.76M
    void push(const SCEV *S) {
567
2.76M
      if (Visited.insert(S).second && 
Visitor.follow(S)2.66M
)
568
2.66M
        Worklist.push_back(S);
569
2.76M
    }
llvm::SCEVTraversal<bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure>::push(llvm::SCEV const*)
Line
Count
Source
566
97
    void push(const SCEV *S) {
567
97
      if (Visited.insert(S).second && Visitor.follow(S))
568
97
        Worklist.push_back(S);
569
97
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::push(llvm::SCEV const*)
Line
Count
Source
566
21.0k
    void push(const SCEV *S) {
567
21.0k
      if (Visited.insert(S).second && 
Visitor.follow(S)20.9k
)
568
15.2k
        Worklist.push_back(S);
569
21.0k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::push(llvm::SCEV const*)
Line
Count
Source
566
45.4k
    void push(const SCEV *S) {
567
45.4k
      if (Visited.insert(S).second && 
Visitor.follow(S)42.0k
)
568
42.0k
        Worklist.push_back(S);
569
45.4k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::push(llvm::SCEV const*)
Line
Count
Source
566
52.8k
    void push(const SCEV *S) {
567
52.8k
      if (Visited.insert(S).second && 
Visitor.follow(S)46.6k
)
568
39.6k
        Worklist.push_back(S);
569
52.8k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::push(llvm::SCEV const*)
Line
Count
Source
566
27.7k
    void push(const SCEV *S) {
567
27.7k
      if (Visited.insert(S).second && 
Visitor.follow(S)26.9k
)
568
26.9k
        Worklist.push_back(S);
569
27.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::push(llvm::SCEV const*)
Line
Count
Source
566
79.1k
    void push(const SCEV *S) {
567
79.1k
      if (Visited.insert(S).second && 
Visitor.follow(S)72.5k
)
568
61.7k
        Worklist.push_back(S);
569
79.1k
    }
570
571
  public:
572
138M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::SCEVTraversal(containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain&)
Line
Count
Source
572
1.76M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::SCEVTraversal(IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable&)
Line
Count
Source
572
252k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::SCEVTraversal(sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize&)
Line
Count
Source
572
64
    SCEVTraversal(SV& V): Visitor(V) {}
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::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
572
1.11k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure&)
Line
Count
Source
572
44.2M
    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
572
1.66M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::SCEVTraversal((anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
572
3.01k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::SCEVTraversal((anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
572
4.61k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::SCEVTraversal((anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
572
3.01k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::SCEVTraversal((anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
572
2.16k
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure&)
Line
Count
Source
572
70.3M
    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
572
15.5M
    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
572
3.58M
    SCEVTraversal(SV& V): Visitor(V) {}
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::SCEVTraversal((anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
572
545k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure>::SCEVTraversal(bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure&)
Line
Count
Source
572
29
    SCEVTraversal(SV& V): Visitor(V) {}
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::SCEVTraversal((anonymous namespace)::SCEVFindInsideScop&)
Line
Count
Source
572
17.4k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindLoops>::SCEVTraversal(polly::SCEVFindLoops&)
Line
Count
Source
572
15.9k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<polly::SCEVFindValues>::SCEVTraversal(polly::SCEVFindValues&)
Line
Count
Source
572
19.8k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVHasIVParams>::SCEVTraversal(SCEVHasIVParams&)
Line
Count
Source
572
11.7k
    SCEVTraversal(SV& V): Visitor(V) {}
llvm::SCEVTraversal<SCEVInRegionDependences>::SCEVTraversal(SCEVInRegionDependences&)
Line
Count
Source
572
24.7k
    SCEVTraversal(SV& V): Visitor(V) {}
573
574
138M
    void visitAll(const SCEV *Root) {
575
138M
      push(Root);
576
451M
      while (!Worklist.empty() && 
!Visitor.isDone()314M
) {
577
313M
        const SCEV *S = Worklist.pop_back_val();
578
313M
579
313M
        switch (S->getSCEVType()) {
580
313M
        case scConstant:
581
207M
        case scUnknown:
582
207M
          break;
583
207M
        case scTruncate:
584
22.4M
        case scZeroExtend:
585
22.4M
        case scSignExtend:
586
22.4M
          push(cast<SCEVCastExpr>(S)->getOperand());
587
22.4M
          break;
588
77.8M
        case scAddExpr:
589
77.8M
        case scMulExpr:
590
77.8M
        case scSMaxExpr:
591
77.8M
        case scUMaxExpr:
592
77.8M
        case scSMinExpr:
593
77.8M
        case scUMinExpr:
594
77.8M
        case scAddRecExpr:
595
77.8M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
164M
            push(Op);
597
77.8M
          break;
598
77.8M
        case scUDivExpr: {
599
5.64M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
5.64M
          push(UDiv->getLHS());
601
5.64M
          push(UDiv->getRHS());
602
5.64M
          break;
603
77.8M
        }
604
77.8M
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
77.8M
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
313M
        }
609
313M
      }
610
138M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<containsConstantInAddMulChain(llvm::SCEV const*)::FindConstantInAddMulChain>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
1.76M
    void visitAll(const SCEV *Root) {
575
1.76M
      push(Root);
576
3.76M
      while (!Worklist.empty() && 
!Visitor.isDone()2.25M
) {
577
1.99M
        const SCEV *S = Worklist.pop_back_val();
578
1.99M
579
1.99M
        switch (S->getSCEVType()) {
580
1.99M
        case scConstant:
581
0
        case scUnknown:
582
0
          break;
583
0
        case scTruncate:
584
0
        case scZeroExtend:
585
0
        case scSignExtend:
586
0
          push(cast<SCEVCastExpr>(S)->getOperand());
587
0
          break;
588
1.99M
        case scAddExpr:
589
1.99M
        case scMulExpr:
590
1.99M
        case scSMaxExpr:
591
1.99M
        case scUMaxExpr:
592
1.99M
        case scSMinExpr:
593
1.99M
        case scUMinExpr:
594
1.99M
        case scAddRecExpr:
595
1.99M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
3.98M
            push(Op);
597
1.99M
          break;
598
1.99M
        case scUDivExpr: {
599
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
0
          push(UDiv->getLHS());
601
0
          push(UDiv->getRHS());
602
0
          break;
603
1.99M
        }
604
1.99M
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
1.99M
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
1.99M
        }
609
1.99M
      }
610
1.76M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<IsAvailableOnEntry(llvm::Loop const*, llvm::DominatorTree&, llvm::SCEV const*, llvm::BasicBlock*)::CheckAvailable>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
252k
    void visitAll(const SCEV *Root) {
575
252k
      push(Root);
576
473k
      while (!Worklist.empty() && 
!Visitor.isDone()240k
) {
577
221k
        const SCEV *S = Worklist.pop_back_val();
578
221k
579
221k
        switch (S->getSCEVType()) {
580
221k
        case scConstant:
581
94.3k
        case scUnknown:
582
94.3k
          break;
583
94.3k
        case scTruncate:
584
36.9k
        case scZeroExtend:
585
36.9k
        case scSignExtend:
586
36.9k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
36.9k
          break;
588
89.8k
        case scAddExpr:
589
89.8k
        case scMulExpr:
590
89.8k
        case scSMaxExpr:
591
89.8k
        case scUMaxExpr:
592
89.8k
        case scSMinExpr:
593
89.8k
        case scUMinExpr:
594
89.8k
        case scAddRecExpr:
595
89.8k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
189k
            push(Op);
597
89.8k
          break;
598
89.8k
        case scUDivExpr: {
599
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
0
          push(UDiv->getLHS());
601
0
          push(UDiv->getRHS());
602
0
          break;
603
89.8k
        }
604
89.8k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
89.8k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
221k
        }
609
221k
      }
610
252k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<sizeOfSCEV(llvm::SCEV const*)::FindSCEVSize>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
64
    void visitAll(const SCEV *Root) {
575
64
      push(Root);
576
239
      while (!Worklist.empty() && 
!Visitor.isDone()175
) {
577
175
        const SCEV *S = Worklist.pop_back_val();
578
175
579
175
        switch (S->getSCEVType()) {
580
175
        case scConstant:
581
118
        case scUnknown:
582
118
          break;
583
118
        case scTruncate:
584
0
        case scZeroExtend:
585
0
        case scSignExtend:
586
0
          push(cast<SCEVCastExpr>(S)->getOperand());
587
0
          break;
588
51
        case scAddExpr:
589
51
        case scMulExpr:
590
51
        case scSMaxExpr:
591
51
        case scUMaxExpr:
592
51
        case scSMinExpr:
593
51
        case scUMinExpr:
594
51
        case scAddRecExpr:
595
51
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
105
            push(Op);
597
51
          break;
598
51
        case scUDivExpr: {
599
6
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
6
          push(UDiv->getLHS());
601
6
          push(UDiv->getRHS());
602
6
          break;
603
51
        }
604
51
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
51
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
175
        }
609
175
      }
610
64
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::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
574
1.11k
    void visitAll(const SCEV *Root) {
575
1.11k
      push(Root);
576
5.13k
      while (!Worklist.empty() && 
!Visitor.isDone()4.03k
) {
577
4.01k
        const SCEV *S = Worklist.pop_back_val();
578
4.01k
579
4.01k
        switch (S->getSCEVType()) {
580
4.01k
        case scConstant:
581
2.74k
        case scUnknown:
582
2.74k
          break;
583
2.74k
        case scTruncate:
584
161
        case scZeroExtend:
585
161
        case scSignExtend:
586
161
          push(cast<SCEVCastExpr>(S)->getOperand());
587
161
          break;
588
1.10k
        case scAddExpr:
589
1.10k
        case scMulExpr:
590
1.10k
        case scSMaxExpr:
591
1.10k
        case scUMaxExpr:
592
1.10k
        case scSMinExpr:
593
1.10k
        case scUMinExpr:
594
1.10k
        case scAddRecExpr:
595
1.10k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
2.81k
            push(Op);
597
1.10k
          break;
598
1.10k
        case scUDivExpr: {
599
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
0
          push(UDiv->getLHS());
601
0
          push(UDiv->getRHS());
602
0
          break;
603
1.10k
        }
604
1.10k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
1.10k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
4.01k
        }
609
4.01k
      }
610
1.11k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
44.2M
    void visitAll(const SCEV *Root) {
575
44.2M
      push(Root);
576
160M
      while (!Worklist.empty() && 
!Visitor.isDone()115M
) {
577
115M
        const SCEV *S = Worklist.pop_back_val();
578
115M
579
115M
        switch (S->getSCEVType()) {
580
115M
        case scConstant:
581
75.0M
        case scUnknown:
582
75.0M
          break;
583
75.0M
        case scTruncate:
584
7.80M
        case scZeroExtend:
585
7.80M
        case scSignExtend:
586
7.80M
          push(cast<SCEVCastExpr>(S)->getOperand());
587
7.80M
          break;
588
32.4M
        case scAddExpr:
589
32.4M
        case scMulExpr:
590
32.4M
        case scSMaxExpr:
591
32.4M
        case scUMaxExpr:
592
32.4M
        case scSMinExpr:
593
32.4M
        case scUMinExpr:
594
32.4M
        case scAddRecExpr:
595
32.4M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
68.2M
            push(Op);
597
32.4M
          break;
598
32.4M
        case scUDivExpr: {
599
553k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
553k
          push(UDiv->getLHS());
601
553k
          push(UDiv->getRHS());
602
553k
          break;
603
32.4M
        }
604
32.4M
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
32.4M
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
115M
        }
609
115M
      }
610
44.2M
    }
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
574
1.66M
    void visitAll(const SCEV *Root) {
575
1.66M
      push(Root);
576
4.08M
      while (!Worklist.empty() && 
!Visitor.isDone()2.43M
) {
577
2.42M
        const SCEV *S = Worklist.pop_back_val();
578
2.42M
579
2.42M
        switch (S->getSCEVType()) {
580
2.42M
        case scConstant:
581
1.87M
        case scUnknown:
582
1.87M
          break;
583
1.87M
        case scTruncate:
584
64.2k
        case scZeroExtend:
585
64.2k
        case scSignExtend:
586
64.2k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
64.2k
          break;
588
467k
        case scAddExpr:
589
467k
        case scMulExpr:
590
467k
        case scSMaxExpr:
591
467k
        case scUMaxExpr:
592
467k
        case scSMinExpr:
593
467k
        case scUMinExpr:
594
467k
        case scAddRecExpr:
595
467k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
955k
            push(Op);
597
467k
          break;
598
467k
        case scUDivExpr: {
599
17.6k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
17.6k
          push(UDiv->getLHS());
601
17.6k
          push(UDiv->getRHS());
602
17.6k
          break;
603
467k
        }
604
467k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
467k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
2.42M
        }
609
2.42M
      }
610
1.66M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectStrides>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
3.01k
    void visitAll(const SCEV *Root) {
575
3.01k
      push(Root);
576
18.2k
      while (!Worklist.empty() && 
!Visitor.isDone()15.2k
) {
577
15.2k
        const SCEV *S = Worklist.pop_back_val();
578
15.2k
579
15.2k
        switch (S->getSCEVType()) {
580
15.2k
        case scConstant:
581
8.21k
        case scUnknown:
582
8.21k
          break;
583
8.21k
        case scTruncate:
584
211
        case scZeroExtend:
585
211
        case scSignExtend:
586
211
          push(cast<SCEVCastExpr>(S)->getOperand());
587
211
          break;
588
6.80k
        case scAddExpr:
589
6.80k
        case scMulExpr:
590
6.80k
        case scSMaxExpr:
591
6.80k
        case scUMaxExpr:
592
6.80k
        case scSMinExpr:
593
6.80k
        case scUMinExpr:
594
6.80k
        case scAddRecExpr:
595
6.80k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
14.4k
            push(Op);
597
6.80k
          break;
598
6.80k
        case scUDivExpr: {
599
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
8
          push(UDiv->getLHS());
601
8
          push(UDiv->getRHS());
602
8
          break;
603
6.80k
        }
604
6.80k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
6.80k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
15.2k
        }
609
15.2k
      }
610
3.01k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectTerms>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
4.61k
    void visitAll(const SCEV *Root) {
575
4.61k
      push(Root);
576
8.25k
      while (!Worklist.empty() && 
!Visitor.isDone()3.63k
) {
577
3.63k
        const SCEV *S = Worklist.pop_back_val();
578
3.63k
579
3.63k
        switch (S->getSCEVType()) {
580
3.63k
        case scConstant:
581
3.56k
        case scUnknown:
582
3.56k
          break;
583
3.56k
        case scTruncate:
584
2
        case scZeroExtend:
585
2
        case scSignExtend:
586
2
          push(cast<SCEVCastExpr>(S)->getOperand());
587
2
          break;
588
69
        case scAddExpr:
589
69
        case scMulExpr:
590
69
        case scSMaxExpr:
591
69
        case scUMaxExpr:
592
69
        case scSMinExpr:
593
69
        case scUMinExpr:
594
69
        case scAddRecExpr:
595
69
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
138
            push(Op);
597
69
          break;
598
69
        case scUDivExpr: {
599
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
0
          push(UDiv->getLHS());
601
0
          push(UDiv->getRHS());
602
0
          break;
603
69
        }
604
69
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
69
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
3.63k
        }
609
3.63k
      }
610
4.61k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVCollectAddRecMultiplies>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
3.01k
    void visitAll(const SCEV *Root) {
575
3.01k
      push(Root);
576
14.8k
      while (!Worklist.empty() && 
!Visitor.isDone()11.8k
) {
577
11.8k
        const SCEV *S = Worklist.pop_back_val();
578
11.8k
579
11.8k
        switch (S->getSCEVType()) {
580
11.8k
        case scConstant:
581
6.39k
        case scUnknown:
582
6.39k
          break;
583
6.39k
        case scTruncate:
584
211
        case scZeroExtend:
585
211
        case scSignExtend:
586
211
          push(cast<SCEVCastExpr>(S)->getOperand());
587
211
          break;
588
5.22k
        case scAddExpr:
589
5.22k
        case scMulExpr:
590
5.22k
        case scSMaxExpr:
591
5.22k
        case scUMaxExpr:
592
5.22k
        case scSMinExpr:
593
5.22k
        case scUMinExpr:
594
5.22k
        case scAddRecExpr:
595
5.22k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
10.6k
            push(Op);
597
5.22k
          break;
598
5.22k
        case scUDivExpr: {
599
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
8
          push(UDiv->getLHS());
601
8
          push(UDiv->getRHS());
602
8
          break;
603
5.22k
        }
604
5.22k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
5.22k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
11.8k
        }
609
11.8k
      }
610
3.01k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVHasAddRec>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
2.16k
    void visitAll(const SCEV *Root) {
575
2.16k
      push(Root);
576
5.16k
      while (!Worklist.empty() && 
!Visitor.isDone()2.99k
) {
577
2.99k
        const SCEV *S = Worklist.pop_back_val();
578
2.99k
579
2.99k
        switch (S->getSCEVType()) {
580
2.99k
        case scConstant:
581
2.37k
        case scUnknown:
582
2.37k
          break;
583
2.37k
        case scTruncate:
584
341
        case scZeroExtend:
585
341
        case scSignExtend:
586
341
          push(cast<SCEVCastExpr>(S)->getOperand());
587
341
          break;
588
341
        case scAddExpr:
589
275
        case scMulExpr:
590
275
        case scSMaxExpr:
591
275
        case scUMaxExpr:
592
275
        case scSMinExpr:
593
275
        case scUMinExpr:
594
275
        case scAddRecExpr:
595
275
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
559
            push(Op);
597
275
          break;
598
275
        case scUDivExpr: {
599
8
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
8
          push(UDiv->getLHS());
601
8
          push(UDiv->getRHS());
602
8
          break;
603
275
        }
604
275
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
275
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
2.99k
        }
609
2.99k
      }
610
2.16k
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
70.3M
    void visitAll(const SCEV *Root) {
575
70.3M
      push(Root);
576
175M
      while (!Worklist.empty() && 
!Visitor.isDone()105M
) {
577
105M
        const SCEV *S = Worklist.pop_back_val();
578
105M
579
105M
        switch (S->getSCEVType()) {
580
105M
        case scConstant:
581
83.0M
        case scUnknown:
582
83.0M
          break;
583
83.0M
        case scTruncate:
584
5.51M
        case scZeroExtend:
585
5.51M
        case scSignExtend:
586
5.51M
          push(cast<SCEVCastExpr>(S)->getOperand());
587
5.51M
          break;
588
13.3M
        case scAddExpr:
589
13.3M
        case scMulExpr:
590
13.3M
        case scSMaxExpr:
591
13.3M
        case scUMaxExpr:
592
13.3M
        case scSMinExpr:
593
13.3M
        case scUMinExpr:
594
13.3M
        case scAddRecExpr:
595
13.3M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
29.0M
            push(Op);
597
13.3M
          break;
598
13.3M
        case scUDivExpr: {
599
3.49M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
3.49M
          push(UDiv->getLHS());
601
3.49M
          push(UDiv->getRHS());
602
3.49M
          break;
603
13.3M
        }
604
13.3M
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
13.3M
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
105M
        }
609
105M
      }
610
70.3M
    }
ScalarEvolution.cpp:llvm::SCEVTraversal<llvm::ScalarEvolution::getUsedLoops(llvm::SCEV const*, llvm::SmallPtrSetImpl<llvm::Loop const*>&)::FindUsedLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
15.5M
    void visitAll(const SCEV *Root) {
575
15.5M
      push(Root);
576
93.3M
      while (!Worklist.empty() && 
!Visitor.isDone()77.7M
) {
577
77.7M
        const SCEV *S = Worklist.pop_back_val();
578
77.7M
579
77.7M
        switch (S->getSCEVType()) {
580
77.7M
        case scConstant:
581
40.9M
        case scUnknown:
582
40.9M
          break;
583
40.9M
        case scTruncate:
584
8.58M
        case scZeroExtend:
585
8.58M
        case scSignExtend:
586
8.58M
          push(cast<SCEVCastExpr>(S)->getOperand());
587
8.58M
          break;
588
26.7M
        case scAddExpr:
589
26.7M
        case scMulExpr:
590
26.7M
        case scSMaxExpr:
591
26.7M
        case scUMaxExpr:
592
26.7M
        case scSMinExpr:
593
26.7M
        case scUMinExpr:
594
26.7M
        case scAddRecExpr:
595
26.7M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
56.3M
            push(Op);
597
26.7M
          break;
598
26.7M
        case scUDivExpr: {
599
1.48M
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
1.48M
          push(UDiv->getLHS());
601
1.48M
          push(UDiv->getRHS());
602
1.48M
          break;
603
26.7M
        }
604
26.7M
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
26.7M
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
77.7M
        }
609
77.7M
      }
610
15.5M
    }
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
574
3.58M
    void visitAll(const SCEV *Root) {
575
3.58M
      push(Root);
576
10.8M
      while (!Worklist.empty() && 
!Visitor.isDone()7.21M
) {
577
7.21M
        const SCEV *S = Worklist.pop_back_val();
578
7.21M
579
7.21M
        switch (S->getSCEVType()) {
580
7.21M
        case scConstant:
581
5.19M
        case scUnknown:
582
5.19M
          break;
583
5.19M
        case scTruncate:
584
267k
        case scZeroExtend:
585
267k
        case scSignExtend:
586
267k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
267k
          break;
588
1.69M
        case scAddExpr:
589
1.69M
        case scMulExpr:
590
1.69M
        case scSMaxExpr:
591
1.69M
        case scUMaxExpr:
592
1.69M
        case scSMinExpr:
593
1.69M
        case scUMinExpr:
594
1.69M
        case scAddRecExpr:
595
1.69M
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
3.46M
            push(Op);
597
1.69M
          break;
598
1.69M
        case scUDivExpr: {
599
59.2k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
59.2k
          push(UDiv->getLHS());
601
59.2k
          push(UDiv->getRHS());
602
59.2k
          break;
603
1.69M
        }
604
1.69M
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
1.69M
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
7.21M
        }
609
7.21M
      }
610
3.58M
    }
ScalarEvolutionExpander.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindUnsafe>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
545k
    void visitAll(const SCEV *Root) {
575
545k
      push(Root);
576
3.21M
      while (!Worklist.empty() && 
!Visitor.isDone()2.66M
) {
577
2.66M
        const SCEV *S = Worklist.pop_back_val();
578
2.66M
579
2.66M
        switch (S->getSCEVType()) {
580
2.66M
        case scConstant:
581
1.50M
        case scUnknown:
582
1.50M
          break;
583
1.50M
        case scTruncate:
584
175k
        case scZeroExtend:
585
175k
        case scSignExtend:
586
175k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
175k
          break;
588
964k
        case scAddExpr:
589
964k
        case scMulExpr:
590
964k
        case scSMaxExpr:
591
964k
        case scUMaxExpr:
592
964k
        case scSMinExpr:
593
964k
        case scUMinExpr:
594
964k
        case scAddRecExpr:
595
964k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
1.99M
            push(Op);
597
964k
          break;
598
964k
        case scUDivExpr: {
599
25.6k
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
25.6k
          push(UDiv->getLHS());
601
25.6k
          push(UDiv->getRHS());
602
25.6k
          break;
603
964k
        }
604
964k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
964k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
2.66M
        }
609
2.66M
      }
610
545k
    }
llvm::SCEVTraversal<bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
29
    void visitAll(const SCEV *Root) {
575
29
      push(Root);
576
126
      while (!Worklist.empty() && 
!Visitor.isDone()97
) {
577
97
        const SCEV *S = Worklist.pop_back_val();
578
97
579
97
        switch (S->getSCEVType()) {
580
97
        case scConstant:
581
63
        case scUnknown:
582
63
          break;
583
63
        case scTruncate:
584
0
        case scZeroExtend:
585
0
        case scSignExtend:
586
0
          push(cast<SCEVCastExpr>(S)->getOperand());
587
0
          break;
588
34
        case scAddExpr:
589
34
        case scMulExpr:
590
34
        case scSMaxExpr:
591
34
        case scUMaxExpr:
592
34
        case scSMinExpr:
593
34
        case scUMinExpr:
594
34
        case scAddRecExpr:
595
34
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
68
            push(Op);
597
34
          break;
598
34
        case scUDivExpr: {
599
0
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
0
          push(UDiv->getLHS());
601
0
          push(UDiv->getRHS());
602
0
          break;
603
34
        }
604
34
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
34
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
97
        }
609
97
      }
610
29
    }
ScopInfo.cpp:llvm::SCEVTraversal<(anonymous namespace)::SCEVFindInsideScop>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
17.4k
    void visitAll(const SCEV *Root) {
575
17.4k
      push(Root);
576
32.4k
      while (!Worklist.empty() && 
!Visitor.isDone()15.1k
) {
577
15.0k
        const SCEV *S = Worklist.pop_back_val();
578
15.0k
579
15.0k
        switch (S->getSCEVType()) {
580
15.0k
        case scConstant:
581
12.8k
        case scUnknown:
582
12.8k
          break;
583
12.8k
        case scTruncate:
584
800
        case scZeroExtend:
585
800
        case scSignExtend:
586
800
          push(cast<SCEVCastExpr>(S)->getOperand());
587
800
          break;
588
1.16k
        case scAddExpr:
589
1.16k
        case scMulExpr:
590
1.16k
        case scSMaxExpr:
591
1.16k
        case scUMaxExpr:
592
1.16k
        case scSMinExpr:
593
1.16k
        case scUMinExpr:
594
1.16k
        case scAddRecExpr:
595
1.16k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
2.42k
            push(Op);
597
1.16k
          break;
598
1.16k
        case scUDivExpr: {
599
163
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
163
          push(UDiv->getLHS());
601
163
          push(UDiv->getRHS());
602
163
          break;
603
1.16k
        }
604
1.16k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
1.16k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
15.0k
        }
609
15.0k
      }
610
17.4k
    }
llvm::SCEVTraversal<polly::SCEVFindLoops>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
15.9k
    void visitAll(const SCEV *Root) {
575
15.9k
      push(Root);
576
58.0k
      while (!Worklist.empty() && 
!Visitor.isDone()42.0k
) {
577
42.0k
        const SCEV *S = Worklist.pop_back_val();
578
42.0k
579
42.0k
        switch (S->getSCEVType()) {
580
42.0k
        case scConstant:
581
27.1k
        case scUnknown:
582
27.1k
          break;
583
27.1k
        case scTruncate:
584
1.41k
        case scZeroExtend:
585
1.41k
        case scSignExtend:
586
1.41k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
1.41k
          break;
588
13.4k
        case scAddExpr:
589
13.4k
        case scMulExpr:
590
13.4k
        case scSMaxExpr:
591
13.4k
        case scUMaxExpr:
592
13.4k
        case scSMinExpr:
593
13.4k
        case scUMinExpr:
594
13.4k
        case scAddRecExpr:
595
13.4k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
27.8k
            push(Op);
597
13.4k
          break;
598
13.4k
        case scUDivExpr: {
599
89
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
89
          push(UDiv->getLHS());
601
89
          push(UDiv->getRHS());
602
89
          break;
603
13.4k
        }
604
13.4k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
13.4k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
42.0k
        }
609
42.0k
      }
610
15.9k
    }
llvm::SCEVTraversal<polly::SCEVFindValues>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
19.9k
    void visitAll(const SCEV *Root) {
575
19.9k
      push(Root);
576
59.6k
      while (!Worklist.empty() && 
!Visitor.isDone()39.6k
) {
577
39.6k
        const SCEV *S = Worklist.pop_back_val();
578
39.6k
579
39.6k
        switch (S->getSCEVType()) {
580
39.6k
        case scConstant:
581
22.8k
        case scUnknown:
582
22.8k
          break;
583
22.8k
        case scTruncate:
584
1.00k
        case scZeroExtend:
585
1.00k
        case scSignExtend:
586
1.00k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
1.00k
          break;
588
15.6k
        case scAddExpr:
589
15.6k
        case scMulExpr:
590
15.6k
        case scSMaxExpr:
591
15.6k
        case scUMaxExpr:
592
15.6k
        case scSMinExpr:
593
15.6k
        case scUMinExpr:
594
15.6k
        case scAddRecExpr:
595
15.6k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
31.6k
            push(Op);
597
15.6k
          break;
598
15.6k
        case scUDivExpr: {
599
143
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
143
          push(UDiv->getLHS());
601
143
          push(UDiv->getRHS());
602
143
          break;
603
15.6k
        }
604
15.6k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
15.6k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
39.6k
        }
609
39.6k
      }
610
19.9k
    }
llvm::SCEVTraversal<SCEVHasIVParams>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
11.7k
    void visitAll(const SCEV *Root) {
575
11.7k
      push(Root);
576
38.7k
      while (!Worklist.empty() && 
!Visitor.isDone()26.9k
) {
577
26.9k
        const SCEV *S = Worklist.pop_back_val();
578
26.9k
579
26.9k
        switch (S->getSCEVType()) {
580
26.9k
        case scConstant:
581
18.5k
        case scUnknown:
582
18.5k
          break;
583
18.5k
        case scTruncate:
584
938
        case scZeroExtend:
585
938
        case scSignExtend:
586
938
          push(cast<SCEVCastExpr>(S)->getOperand());
587
938
          break;
588
7.42k
        case scAddExpr:
589
7.42k
        case scMulExpr:
590
7.42k
        case scSMaxExpr:
591
7.42k
        case scUMaxExpr:
592
7.42k
        case scSMinExpr:
593
7.42k
        case scUMinExpr:
594
7.42k
        case scAddRecExpr:
595
7.42k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
14.9k
            push(Op);
597
7.42k
          break;
598
7.42k
        case scUDivExpr: {
599
65
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
65
          push(UDiv->getLHS());
601
65
          push(UDiv->getRHS());
602
65
          break;
603
7.42k
        }
604
7.42k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
7.42k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
26.9k
        }
609
26.9k
      }
610
11.7k
    }
llvm::SCEVTraversal<SCEVInRegionDependences>::visitAll(llvm::SCEV const*)
Line
Count
Source
574
24.7k
    void visitAll(const SCEV *Root) {
575
24.7k
      push(Root);
576
86.5k
      while (!Worklist.empty() && 
!Visitor.isDone()61.7k
) {
577
61.7k
        const SCEV *S = Worklist.pop_back_val();
578
61.7k
579
61.7k
        switch (S->getSCEVType()) {
580
61.7k
        case scConstant:
581
34.0k
        case scUnknown:
582
34.0k
          break;
583
34.0k
        case scTruncate:
584
2.90k
        case scZeroExtend:
585
2.90k
        case scSignExtend:
586
2.90k
          push(cast<SCEVCastExpr>(S)->getOperand());
587
2.90k
          break;
588
24.1k
        case scAddExpr:
589
24.1k
        case scMulExpr:
590
24.1k
        case scSMaxExpr:
591
24.1k
        case scUMaxExpr:
592
24.1k
        case scSMinExpr:
593
24.1k
        case scUMinExpr:
594
24.1k
        case scAddRecExpr:
595
24.1k
          for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
596
50.1k
            push(Op);
597
24.1k
          break;
598
24.1k
        case scUDivExpr: {
599
637
          const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
600
637
          push(UDiv->getLHS());
601
637
          push(UDiv->getRHS());
602
637
          break;
603
24.1k
        }
604
24.1k
        case scCouldNotCompute:
605
0
          llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!");
606
24.1k
        default:
607
0
          llvm_unreachable("Unknown SCEV kind!");
608
61.7k
        }
609
61.7k
      }
610
24.7k
    }
611
  };
612
613
  /// Use SCEVTraversal to visit all nodes in the given expression tree.
614
  template<typename SV>
615
120M
  void visitAll(const SCEV *Root, SV& Visitor) {
616
120M
    SCEVTraversal<SV> T(Visitor);
617
120M
    T.visitAll(Root);
618
120M
  }
Unexecuted instantiation: ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34&)
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
615
1.11k
  void visitAll(const SCEV *Root, SV& Visitor) {
616
1.11k
    SCEVTraversal<SV> T(Visitor);
617
1.11k
    T.visitAll(Root);
618
1.11k
  }
ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4&)
Line
Count
Source
615
44.2M
  void visitAll(const SCEV *Root, SV& Visitor) {
616
44.2M
    SCEVTraversal<SV> T(Visitor);
617
44.2M
    T.visitAll(Root);
618
44.2M
  }
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
615
1.66M
  void visitAll(const SCEV *Root, SV& Visitor) {
616
1.66M
    SCEVTraversal<SV> T(Visitor);
617
1.66M
    T.visitAll(Root);
618
1.66M
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectStrides>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectStrides&)
Line
Count
Source
615
3.01k
  void visitAll(const SCEV *Root, SV& Visitor) {
616
3.01k
    SCEVTraversal<SV> T(Visitor);
617
3.01k
    T.visitAll(Root);
618
3.01k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectTerms>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectTerms&)
Line
Count
Source
615
4.61k
  void visitAll(const SCEV *Root, SV& Visitor) {
616
4.61k
    SCEVTraversal<SV> T(Visitor);
617
4.61k
    T.visitAll(Root);
618
4.61k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVCollectAddRecMultiplies>(llvm::SCEV const*, (anonymous namespace)::SCEVCollectAddRecMultiplies&)
Line
Count
Source
615
3.01k
  void visitAll(const SCEV *Root, SV& Visitor) {
616
3.01k
    SCEVTraversal<SV> T(Visitor);
617
3.01k
    T.visitAll(Root);
618
3.01k
  }
ScalarEvolution.cpp:void llvm::visitAll<(anonymous namespace)::SCEVHasAddRec>(llvm::SCEV const*, (anonymous namespace)::SCEVHasAddRec&)
Line
Count
Source
615
2.16k
  void visitAll(const SCEV *Root, SV& Visitor) {
616
2.16k
    SCEVTraversal<SV> T(Visitor);
617
2.16k
    T.visitAll(Root);
618
2.16k
  }
ScalarEvolution.cpp:void llvm::visitAll<bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33&)
Line
Count
Source
615
70.3M
  void visitAll(const SCEV *Root, SV& Visitor) {
616
70.3M
    SCEVTraversal<SV> T(Visitor);
617
70.3M
    T.visitAll(Root);
618
70.3M
  }
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
615
3.58M
  void visitAll(const SCEV *Root, SV& Visitor) {
616
3.58M
    SCEVTraversal<SV> T(Visitor);
617
3.58M
    T.visitAll(Root);
618
3.58M
  }
ScalarEvolutionExpander.cpp:void llvm::visitAll<(anonymous namespace)::SCEVFindUnsafe>(llvm::SCEV const*, (anonymous namespace)::SCEVFindUnsafe&)
Line
Count
Source
615
545k
  void visitAll(const SCEV *Root, SV& Visitor) {
616
545k
    SCEVTraversal<SV> T(Visitor);
617
545k
    T.visitAll(Root);
618
545k
  }
void llvm::visitAll<bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)&)
Line
Count
Source
615
29
  void visitAll(const SCEV *Root, SV& Visitor) {
616
29
    SCEVTraversal<SV> T(Visitor);
617
29
    T.visitAll(Root);
618
29
  }
619
620
  /// Return true if any node in \p Root satisfies the predicate \p Pred.
621
  template <typename PredTy>
622
119M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
119M
    struct FindClosure {
624
119M
      bool Found = false;
625
119M
      PredTy Pred;
626
119M
627
119M
      FindClosure(PredTy Pred) : Pred(Pred) {}
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::FindClosure::FindClosure(llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)
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
627
1.11k
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure::FindClosure(llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)
Line
Count
Source
627
44.2M
      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
627
1.66M
      FindClosure(PredTy Pred) : Pred(Pred) {}
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure::FindClosure(llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)
Line
Count
Source
627
70.3M
      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
627
3.58M
      FindClosure(PredTy Pred) : Pred(Pred) {}
bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure::FindClosure(LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))
Line
Count
Source
627
29
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
119M
629
231M
      bool follow(const SCEV *S) {
630
231M
        if (!Pred(S))
631
231M
          return true;
632
499k
633
499k
        Found = true;
634
499k
        return false;
635
499k
      }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::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
629
4.05k
      bool follow(const SCEV *S) {
630
4.05k
        if (!Pred(S))
631
4.03k
          return true;
632
18
633
18
        Found = true;
634
18
        return false;
635
18
      }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
629
115M
      bool follow(const SCEV *S) {
630
115M
        if (!Pred(S))
631
115M
          return true;
632
0
633
0
        Found = true;
634
0
        return false;
635
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
629
2.68M
      bool follow(const SCEV *S) {
630
2.68M
        if (!Pred(S))
631
2.43M
          return true;
632
253k
633
253k
        Found = true;
634
253k
        return false;
635
253k
      }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
629
105M
      bool follow(const SCEV *S) {
630
105M
        if (!Pred(S))
631
105M
          return true;
632
245k
633
245k
        Found = true;
634
245k
        return false;
635
245k
      }
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
629
7.21M
      bool follow(const SCEV *S) {
630
7.21M
        if (!Pred(S))
631
7.21M
          return true;
632
398
633
398
        Found = true;
634
398
        return false;
635
398
      }
bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure::follow(llvm::SCEV const*)
Line
Count
Source
629
97
      bool follow(const SCEV *S) {
630
97
        if (!Pred(S))
631
97
          return true;
632
0
633
0
        Found = true;
634
0
        return false;
635
0
      }
636
119M
637
231M
      bool isDone() const { return Found; }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)::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
637
4.03k
      bool isDone() const { return Found; }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)::FindClosure::isDone() const
Line
Count
Source
637
115M
      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
637
2.43M
      bool isDone() const { return Found; }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)::FindClosure::isDone() const
Line
Count
Source
637
105M
      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
637
7.21M
      bool isDone() const { return Found; }
bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))::FindClosure::isDone() const
Line
Count
Source
637
97
      bool isDone() const { return Found; }
638
119M
    };
639
119M
640
119M
    FindClosure FC(Pred);
641
119M
    visitAll(Root, FC);
642
119M
    return FC.Found;
643
119M
  }
Unexecuted instantiation: ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34>(llvm::SCEV const*, llvm::ScalarEvolution::ExitLimit::hasOperand(llvm::SCEV const*) const::$_34)
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
622
1.11k
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
1.11k
    struct FindClosure {
624
1.11k
      bool Found = false;
625
1.11k
      PredTy Pred;
626
1.11k
627
1.11k
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
1.11k
629
1.11k
      bool follow(const SCEV *S) {
630
1.11k
        if (!Pred(S))
631
1.11k
          return true;
632
1.11k
633
1.11k
        Found = true;
634
1.11k
        return false;
635
1.11k
      }
636
1.11k
637
1.11k
      bool isDone() const { return Found; }
638
1.11k
    };
639
1.11k
640
1.11k
    FindClosure FC(Pred);
641
1.11k
    visitAll(Root, FC);
642
1.11k
    return FC.Found;
643
1.11k
  }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4>(llvm::SCEV const*, llvm::ScalarEvolution::checkValidity(llvm::SCEV const*) const::$_4)
Line
Count
Source
622
44.2M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
44.2M
    struct FindClosure {
624
44.2M
      bool Found = false;
625
44.2M
      PredTy Pred;
626
44.2M
627
44.2M
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
44.2M
629
44.2M
      bool follow(const SCEV *S) {
630
44.2M
        if (!Pred(S))
631
44.2M
          return true;
632
44.2M
633
44.2M
        Found = true;
634
44.2M
        return false;
635
44.2M
      }
636
44.2M
637
44.2M
      bool isDone() const { return Found; }
638
44.2M
    };
639
44.2M
640
44.2M
    FindClosure FC(Pred);
641
44.2M
    visitAll(Root, FC);
642
44.2M
    return FC.Found;
643
44.2M
  }
bool llvm::SCEVExprContains<bool (*)(llvm::SCEV const* const&)>(llvm::SCEV const*, bool (*)(llvm::SCEV const* const&))
Line
Count
Source
622
1.66M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
1.66M
    struct FindClosure {
624
1.66M
      bool Found = false;
625
1.66M
      PredTy Pred;
626
1.66M
627
1.66M
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
1.66M
629
1.66M
      bool follow(const SCEV *S) {
630
1.66M
        if (!Pred(S))
631
1.66M
          return true;
632
1.66M
633
1.66M
        Found = true;
634
1.66M
        return false;
635
1.66M
      }
636
1.66M
637
1.66M
      bool isDone() const { return Found; }
638
1.66M
    };
639
1.66M
640
1.66M
    FindClosure FC(Pred);
641
1.66M
    visitAll(Root, FC);
642
1.66M
    return FC.Found;
643
1.66M
  }
ScalarEvolution.cpp:bool llvm::SCEVExprContains<llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33>(llvm::SCEV const*, llvm::ScalarEvolution::hasOperand(llvm::SCEV const*, llvm::SCEV const*) const::$_33)
Line
Count
Source
622
70.3M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
70.3M
    struct FindClosure {
624
70.3M
      bool Found = false;
625
70.3M
      PredTy Pred;
626
70.3M
627
70.3M
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
70.3M
629
70.3M
      bool follow(const SCEV *S) {
630
70.3M
        if (!Pred(S))
631
70.3M
          return true;
632
70.3M
633
70.3M
        Found = true;
634
70.3M
        return false;
635
70.3M
      }
636
70.3M
637
70.3M
      bool isDone() const { return Found; }
638
70.3M
    };
639
70.3M
640
70.3M
    FindClosure FC(Pred);
641
70.3M
    visitAll(Root, FC);
642
70.3M
    return FC.Found;
643
70.3M
  }
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
622
3.58M
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
3.58M
    struct FindClosure {
624
3.58M
      bool Found = false;
625
3.58M
      PredTy Pred;
626
3.58M
627
3.58M
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
3.58M
629
3.58M
      bool follow(const SCEV *S) {
630
3.58M
        if (!Pred(S))
631
3.58M
          return true;
632
3.58M
633
3.58M
        Found = true;
634
3.58M
        return false;
635
3.58M
      }
636
3.58M
637
3.58M
      bool isDone() const { return Found; }
638
3.58M
    };
639
3.58M
640
3.58M
    FindClosure FC(Pred);
641
3.58M
    visitAll(Root, FC);
642
3.58M
    return FC.Found;
643
3.58M
  }
bool llvm::SCEVExprContains<LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*)>(llvm::SCEV const*, LoopFuser::accessDiffIsPositive(llvm::Loop const&, llvm::Loop const&, llvm::Instruction&, llvm::Instruction&, bool)::'lambda'(llvm::SCEV const*))
Line
Count
Source
622
29
  bool SCEVExprContains(const SCEV *Root, PredTy Pred) {
623
29
    struct FindClosure {
624
29
      bool Found = false;
625
29
      PredTy Pred;
626
29
627
29
      FindClosure(PredTy Pred) : Pred(Pred) {}
628
29
629
29
      bool follow(const SCEV *S) {
630
29
        if (!Pred(S))
631
29
          return true;
632
29
633
29
        Found = true;
634
29
        return false;
635
29
      }
636
29
637
29
      bool isDone() const { return Found; }
638
29
    };
639
29
640
29
    FindClosure FC(Pred);
641
29
    visitAll(Root, FC);
642
29
    return FC.Found;
643
29
  }
644
645
  /// This visitor recursively visits a SCEV expression and re-writes it.
646
  /// The result from each visit is cached, so it will return the same
647
  /// SCEV for the same input.
648
  template<typename SC>
649
  class SCEVRewriteVisitor : public SCEVVisitor<SC, const SCEV *> {
650
  protected:
651
    ScalarEvolution &SE;
652
    // Memoize the result of each visit so that we only compute once for
653
    // the same input SCEV. This is to avoid redundant computations when
654
    // a SCEV is referenced by multiple SCEVs. Without memoization, this
655
    // visit algorithm would have exponential time complexity in the worst
656
    // case, causing the compiler to hang on certain tests.
657
    DenseMap<const SCEV *, const SCEV *> RewriteResults;
658
659
  public:
660
5.62M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
233k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
313k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
1.30M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
929k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
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
660
385k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
2.44M
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
400
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
113
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
29
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
1.45k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
11.8k
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::SCEVRewriteVisitor(llvm::ScalarEvolution&)
Line
Count
Source
660
700
    SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {}
661
662
17.7M
    const SCEV *visit(const SCEV *S) {
663
17.7M
      auto It = RewriteResults.find(S);
664
17.7M
      if (It != RewriteResults.end())
665
756k
        return It->second;
666
17.0M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
17.0M
      auto Result = RewriteResults.try_emplace(S, Visited);
668
17.0M
      assert(Result.second && "Should insert a new entry");
669
17.0M
      return Result.first->second;
670
17.0M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
389
    const SCEV *visit(const SCEV *S) {
663
389
      auto It = RewriteResults.find(S);
664
389
      if (It != RewriteResults.end())
665
6
        return It->second;
666
383
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
383
      auto Result = RewriteResults.try_emplace(S, Visited);
668
383
      assert(Result.second && "Should insert a new entry");
669
383
      return Result.first->second;
670
383
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
2.52k
    const SCEV *visit(const SCEV *S) {
663
2.52k
      auto It = RewriteResults.find(S);
664
2.52k
      if (It != RewriteResults.end())
665
99
        return It->second;
666
2.42k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
2.42k
      auto Result = RewriteResults.try_emplace(S, Visited);
668
2.42k
      assert(Result.second && "Should insert a new entry");
669
2.42k
      return Result.first->second;
670
2.42k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visit(llvm::SCEV const*)
Line
Count
Source
662
341k
    const SCEV *visit(const SCEV *S) {
663
341k
      auto It = RewriteResults.find(S);
664
341k
      if (It != RewriteResults.end())
665
1.83k
        return It->second;
666
339k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
339k
      auto Result = RewriteResults.try_emplace(S, Visited);
668
339k
      assert(Result.second && "Should insert a new entry");
669
339k
      return Result.first->second;
670
339k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
398k
    const SCEV *visit(const SCEV *S) {
663
398k
      auto It = RewriteResults.find(S);
664
398k
      if (It != RewriteResults.end())
665
1.71k
        return It->second;
666
396k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
396k
      auto Result = RewriteResults.try_emplace(S, Visited);
668
396k
      assert(Result.second && "Should insert a new entry");
669
396k
      return Result.first->second;
670
396k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
1.66M
    const SCEV *visit(const SCEV *S) {
663
1.66M
      auto It = RewriteResults.find(S);
664
1.66M
      if (It != RewriteResults.end())
665
9.10k
        return It->second;
666
1.65M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
1.65M
      auto Result = RewriteResults.try_emplace(S, Visited);
668
1.65M
      assert(Result.second && "Should insert a new entry");
669
1.65M
      return Result.first->second;
670
1.65M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
1.22M
    const SCEV *visit(const SCEV *S) {
663
1.22M
      auto It = RewriteResults.find(S);
664
1.22M
      if (It != RewriteResults.end())
665
8.60k
        return It->second;
666
1.21M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
1.21M
      auto Result = RewriteResults.try_emplace(S, Visited);
668
1.21M
      assert(Result.second && "Should insert a new entry");
669
1.21M
      return Result.first->second;
670
1.21M
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
1.98M
    const SCEV *visit(const SCEV *S) {
663
1.98M
      auto It = RewriteResults.find(S);
664
1.98M
      if (It != RewriteResults.end())
665
52.3k
        return It->second;
666
1.93M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
1.93M
      auto Result = RewriteResults.try_emplace(S, Visited);
668
1.93M
      assert(Result.second && "Should insert a new entry");
669
1.93M
      return Result.first->second;
670
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
662
12.1M
    const SCEV *visit(const SCEV *S) {
663
12.1M
      auto It = RewriteResults.find(S);
664
12.1M
      if (It != RewriteResults.end())
665
677k
        return It->second;
666
11.4M
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
11.4M
      auto Result = RewriteResults.try_emplace(S, Visited);
668
11.4M
      assert(Result.second && "Should insert a new entry");
669
11.4M
      return Result.first->second;
670
11.4M
    }
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
556
    const SCEV *visit(const SCEV *S) {
663
556
      auto It = RewriteResults.find(S);
664
556
      if (It != RewriteResults.end())
665
0
        return It->second;
666
556
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
556
      auto Result = RewriteResults.try_emplace(S, Visited);
668
556
      assert(Result.second && "Should insert a new entry");
669
556
      return Result.first->second;
670
556
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
196
    const SCEV *visit(const SCEV *S) {
663
196
      auto It = RewriteResults.find(S);
664
196
      if (It != RewriteResults.end())
665
0
        return It->second;
666
196
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
196
      auto Result = RewriteResults.try_emplace(S, Visited);
668
196
      assert(Result.second && "Should insert a new entry");
669
196
      return Result.first->second;
670
196
    }
llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visit(llvm::SCEV const*)
Line
Count
Source
662
53
    const SCEV *visit(const SCEV *S) {
663
53
      auto It = RewriteResults.find(S);
664
53
      if (It != RewriteResults.end())
665
0
        return It->second;
666
53
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
53
      auto Result = RewriteResults.try_emplace(S, Visited);
668
53
      assert(Result.second && "Should insert a new entry");
669
53
      return Result.first->second;
670
53
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visit(llvm::SCEV const*)
Line
Count
Source
662
16.6k
    const SCEV *visit(const SCEV *S) {
663
16.6k
      auto It = RewriteResults.find(S);
664
16.6k
      if (It != RewriteResults.end())
665
4.40k
        return It->second;
666
12.2k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
12.2k
      auto Result = RewriteResults.try_emplace(S, Visited);
668
12.2k
      assert(Result.second && "Should insert a new entry");
669
12.2k
      return Result.first->second;
670
12.2k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visit(llvm::SCEV const*)
Line
Count
Source
662
14.4k
    const SCEV *visit(const SCEV *S) {
663
14.4k
      auto It = RewriteResults.find(S);
664
14.4k
      if (It != RewriteResults.end())
665
93
        return It->second;
666
14.3k
      auto* Visited = SCEVVisitor<SC, const SCEV *>::visit(S);
667
14.3k
      auto Result = RewriteResults.try_emplace(S, Visited);
668
14.3k
      assert(Result.second && "Should insert a new entry");
669
14.3k
      return Result.first->second;
670
14.3k
    }
671
672
5.58M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
5.58M
      return Constant;
674
5.58M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
267
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
267
      return Constant;
674
267
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
884
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
884
      return Constant;
674
884
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
217k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
217k
      return Constant;
674
217k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
34.1k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
34.1k
      return Constant;
674
34.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
341k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
341k
      return Constant;
674
341k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
326k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
326k
      return Constant;
674
326k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
593k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
593k
      return Constant;
674
593k
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
4.05M
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
4.05M
      return Constant;
674
4.05M
    }
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
672
31
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
31
      return Constant;
674
31
    }
llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
6
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
6
      return Constant;
674
6
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
2.89k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
2.89k
      return Constant;
674
2.89k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitConstant(llvm::SCEVConstant const*)
Line
Count
Source
672
6.47k
    const SCEV *visitConstant(const SCEVConstant *Constant) {
673
6.47k
      return Constant;
674
6.47k
    }
675
676
51.0k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
51.0k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
51.0k
      return Operand == Expr->getOperand()
679
51.0k
                 ? 
Expr50.0k
680
51.0k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())945
;
681
51.0k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
2
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
2
      return Operand == Expr->getOperand()
679
2
                 ? 
Expr0
680
2
                 : SE.getTruncateExpr(Operand, Expr->getType());
681
2
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
759
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
759
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
759
      return Operand == Expr->getOperand()
679
759
                 ? Expr
680
759
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
681
759
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
1.27k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
1.27k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
1.27k
      return Operand == Expr->getOperand()
679
1.27k
                 ? Expr
680
1.27k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
681
1.27k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
5.93k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
5.93k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
5.93k
      return Operand == Expr->getOperand()
679
5.93k
                 ? 
Expr5.88k
680
5.93k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())56
;
681
5.93k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
4.46k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
4.46k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
4.46k
      return Operand == Expr->getOperand()
679
4.46k
                 ? 
Expr4.41k
680
4.46k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())50
;
681
4.46k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
6.22k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
6.22k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
6.22k
      return Operand == Expr->getOperand()
679
6.22k
                 ? 
Expr6.17k
680
6.22k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())53
;
681
6.22k
    }
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
676
32.2k
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
32.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
32.2k
      return Operand == Expr->getOperand()
679
32.2k
                 ? 
Expr31.4k
680
32.2k
                 : 
SE.getTruncateExpr(Operand, Expr->getType())782
;
681
32.2k
    }
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*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
4
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
4
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
4
      return Operand == Expr->getOperand()
679
4
                 ? Expr
680
4
                 : 
SE.getTruncateExpr(Operand, Expr->getType())0
;
681
4
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitTruncateExpr(llvm::SCEVTruncateExpr const*)
Line
Count
Source
676
77
    const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) {
677
77
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
678
77
      return Operand == Expr->getOperand()
679
77
                 ? 
Expr75
680
77
                 : 
SE.getTruncateExpr(Operand, Expr->getType())2
;
681
77
    }
682
683
232k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
232k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
232k
      return Operand == Expr->getOperand()
686
232k
                 ? 
Expr226k
687
232k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())5.48k
;
688
232k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
2
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
2
      return Operand == Expr->getOperand()
686
2
                 ? Expr
687
2
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
688
2
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
11
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
11
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
11
      return Operand == Expr->getOperand()
686
11
                 ? 
Expr10
687
11
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
688
11
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
4.38k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
4.38k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
4.38k
      return Operand == Expr->getOperand()
686
4.38k
                 ? 
Expr4.37k
687
4.38k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())9
;
688
4.38k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
6.45k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
6.45k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
6.45k
      return Operand == Expr->getOperand()
686
6.45k
                 ? 
Expr5.54k
687
6.45k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())914
;
688
6.45k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
60.1k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
60.1k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
60.1k
      return Operand == Expr->getOperand()
686
60.1k
                 ? 
Expr58.0k
687
60.1k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())2.09k
;
688
60.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
47.6k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
47.6k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
47.6k
      return Operand == Expr->getOperand()
686
47.6k
                 ? 
Expr46.4k
687
47.6k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.17k
;
688
47.6k
    }
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
683
113k
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
113k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
113k
      return Operand == Expr->getOperand()
686
113k
                 ? 
Expr111k
687
113k
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1.29k
;
688
113k
    }
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*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
54
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
54
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
54
      return Operand == Expr->getOperand()
686
54
                 ? Expr
687
54
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())0
;
688
54
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitZeroExtendExpr(llvm::SCEVZeroExtendExpr const*)
Line
Count
Source
683
152
    const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
684
152
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
685
152
      return Operand == Expr->getOperand()
686
152
                 ? 
Expr151
687
152
                 : 
SE.getZeroExtendExpr(Operand, Expr->getType())1
;
688
152
    }
689
690
554k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
554k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
554k
      return Operand == Expr->getOperand()
693
554k
                 ? 
Expr552k
694
554k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())1.40k
;
695
554k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
2
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
2
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
2
      return Operand == Expr->getOperand()
693
2
                 ? Expr
694
2
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
695
2
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
28
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
28
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
28
      return Operand == Expr->getOperand()
693
28
                 ? 
Expr26
694
28
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())2
;
695
28
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
24.2k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
24.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
24.2k
      return Operand == Expr->getOperand()
693
24.2k
                 ? Expr
694
24.2k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
695
24.2k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
983
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
983
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
983
      return Operand == Expr->getOperand()
693
983
                 ? 
Expr940
694
983
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())43
;
695
983
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
55.0k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
55.0k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
55.0k
      return Operand == Expr->getOperand()
693
55.0k
                 ? 
Expr54.5k
694
55.0k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())501
;
695
55.0k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
37.2k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
37.2k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
37.2k
      return Operand == Expr->getOperand()
693
37.2k
                 ? 
Expr36.8k
694
37.2k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())380
;
695
37.2k
    }
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
690
435k
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
435k
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
435k
      return Operand == Expr->getOperand()
693
435k
                 ? 
Expr435k
694
435k
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())478
;
695
435k
    }
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
690
3
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
3
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
3
      return Operand == Expr->getOperand()
693
3
                 ? Expr
694
3
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())0
;
695
3
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
205
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
205
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
205
      return Operand == Expr->getOperand()
693
205
                 ? 
Expr204
694
205
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())1
;
695
205
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSignExtendExpr(llvm::SCEVSignExtendExpr const*)
Line
Count
Source
690
340
    const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) {
691
340
      const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand());
692
340
      return Operand == Expr->getOperand()
693
340
                 ? 
Expr336
694
340
                 : 
SE.getSignExtendExpr(Operand, Expr->getType())4
;
695
340
    }
696
697
1.75M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
1.75M
      SmallVector<const SCEV *, 2> Operands;
699
1.75M
      bool Changed = false;
700
3.82M
      for (auto *Op : Expr->operands()) {
701
3.82M
        Operands.push_back(((SC*)this)->visit(Op));
702
3.82M
        Changed |= Op != Operands.back();
703
3.82M
      }
704
1.75M
      return !Changed ? 
Expr1.73M
:
SE.getAddExpr(Operands)14.3k
;
705
1.75M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
13
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
13
      SmallVector<const SCEV *, 2> Operands;
699
13
      bool Changed = false;
700
26
      for (auto *Op : Expr->operands()) {
701
26
        Operands.push_back(((SC*)this)->visit(Op));
702
26
        Changed |= Op != Operands.back();
703
26
      }
704
13
      return !Changed ? 
Expr9
:
SE.getAddExpr(Operands)4
;
705
13
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
126
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
126
      SmallVector<const SCEV *, 2> Operands;
699
126
      bool Changed = false;
700
266
      for (auto *Op : Expr->operands()) {
701
266
        Operands.push_back(((SC*)this)->visit(Op));
702
266
        Changed |= Op != Operands.back();
703
266
      }
704
126
      return !Changed ? 
Expr114
:
SE.getAddExpr(Operands)12
;
705
126
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
2.93k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
2.93k
      SmallVector<const SCEV *, 2> Operands;
699
2.93k
      bool Changed = false;
700
11.8k
      for (auto *Op : Expr->operands()) {
701
11.8k
        Operands.push_back(((SC*)this)->visit(Op));
702
11.8k
        Changed |= Op != Operands.back();
703
11.8k
      }
704
2.93k
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
705
2.93k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
2.13k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
2.13k
      SmallVector<const SCEV *, 2> Operands;
699
2.13k
      bool Changed = false;
700
4.64k
      for (auto *Op : Expr->operands()) {
701
4.64k
        Operands.push_back(((SC*)this)->visit(Op));
702
4.64k
        Changed |= Op != Operands.back();
703
4.64k
      }
704
2.13k
      return !Changed ? 
Expr2.05k
:
SE.getAddExpr(Operands)81
;
705
2.13k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
58.1k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
58.1k
      SmallVector<const SCEV *, 2> Operands;
699
58.1k
      bool Changed = false;
700
120k
      for (auto *Op : Expr->operands()) {
701
120k
        Operands.push_back(((SC*)this)->visit(Op));
702
120k
        Changed |= Op != Operands.back();
703
120k
      }
704
58.1k
      return !Changed ? 
Expr56.5k
:
SE.getAddExpr(Operands)1.56k
;
705
58.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
45.5k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
45.5k
      SmallVector<const SCEV *, 2> Operands;
699
45.5k
      bool Changed = false;
700
95.2k
      for (auto *Op : Expr->operands()) {
701
95.2k
        Operands.push_back(((SC*)this)->visit(Op));
702
95.2k
        Changed |= Op != Operands.back();
703
95.2k
      }
704
45.5k
      return !Changed ? 
Expr44.3k
:
SE.getAddExpr(Operands)1.24k
;
705
45.5k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
225k
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
225k
      SmallVector<const SCEV *, 2> Operands;
699
225k
      bool Changed = false;
700
513k
      for (auto *Op : Expr->operands()) {
701
513k
        Operands.push_back(((SC*)this)->visit(Op));
702
513k
        Changed |= Op != Operands.back();
703
513k
      }
704
225k
      return !Changed ? 
Expr223k
:
SE.getAddExpr(Operands)2.02k
;
705
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
697
1.41M
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
1.41M
      SmallVector<const SCEV *, 2> Operands;
699
1.41M
      bool Changed = false;
700
3.07M
      for (auto *Op : Expr->operands()) {
701
3.07M
        Operands.push_back(((SC*)this)->visit(Op));
702
3.07M
        Changed |= Op != Operands.back();
703
3.07M
      }
704
1.41M
      return !Changed ? 
Expr1.40M
:
SE.getAddExpr(Operands)9.22k
;
705
1.41M
    }
StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
136
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
136
      SmallVector<const SCEV *, 2> Operands;
699
136
      bool Changed = false;
700
272
      for (auto *Op : Expr->operands()) {
701
272
        Operands.push_back(((SC*)this)->visit(Op));
702
272
        Changed |= Op != Operands.back();
703
272
      }
704
136
      return !Changed ? 
Expr12
:
SE.getAddExpr(Operands)124
;
705
136
    }
SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
34
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
34
      SmallVector<const SCEV *, 2> Operands;
699
34
      bool Changed = false;
700
68
      for (auto *Op : Expr->operands()) {
701
68
        Operands.push_back(((SC*)this)->visit(Op));
702
68
        Changed |= Op != Operands.back();
703
68
      }
704
34
      return !Changed ? 
Expr0
: SE.getAddExpr(Operands);
705
34
    }
llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
6
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
6
      SmallVector<const SCEV *, 2> Operands;
699
6
      bool Changed = false;
700
12
      for (auto *Op : Expr->operands()) {
701
12
        Operands.push_back(((SC*)this)->visit(Op));
702
12
        Changed |= Op != Operands.back();
703
12
      }
704
6
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
705
6
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
580
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
580
      SmallVector<const SCEV *, 2> Operands;
699
580
      bool Changed = false;
700
1.16k
      for (auto *Op : Expr->operands()) {
701
1.16k
        Operands.push_back(((SC*)this)->visit(Op));
702
1.16k
        Changed |= Op != Operands.back();
703
1.16k
      }
704
580
      return !Changed ? 
Expr520
:
SE.getAddExpr(Operands)60
;
705
580
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitAddExpr(llvm::SCEVAddExpr const*)
Line
Count
Source
697
297
    const SCEV *visitAddExpr(const SCEVAddExpr *Expr) {
698
297
      SmallVector<const SCEV *, 2> Operands;
699
297
      bool Changed = false;
700
624
      for (auto *Op : Expr->operands()) {
701
624
        Operands.push_back(((SC*)this)->visit(Op));
702
624
        Changed |= Op != Operands.back();
703
624
      }
704
297
      return !Changed ? Expr : 
SE.getAddExpr(Operands)0
;
705
297
    }
706
707
823k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
823k
      SmallVector<const SCEV *, 2> Operands;
709
823k
      bool Changed = false;
710
1.65M
      for (auto *Op : Expr->operands()) {
711
1.65M
        Operands.push_back(((SC*)this)->visit(Op));
712
1.65M
        Changed |= Op != Operands.back();
713
1.65M
      }
714
823k
      return !Changed ? 
Expr815k
:
SE.getMulExpr(Operands)7.87k
;
715
823k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
35
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
35
      SmallVector<const SCEV *, 2> Operands;
709
35
      bool Changed = false;
710
70
      for (auto *Op : Expr->operands()) {
711
70
        Operands.push_back(((SC*)this)->visit(Op));
712
70
        Changed |= Op != Operands.back();
713
70
      }
714
35
      return !Changed ? 
Expr28
:
SE.getMulExpr(Operands)7
;
715
35
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
67
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
67
      SmallVector<const SCEV *, 2> Operands;
709
67
      bool Changed = false;
710
140
      for (auto *Op : Expr->operands()) {
711
140
        Operands.push_back(((SC*)this)->visit(Op));
712
140
        Changed |= Op != Operands.back();
713
140
      }
714
67
      return !Changed ? 
Expr64
:
SE.getMulExpr(Operands)3
;
715
67
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
30.0k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
30.0k
      SmallVector<const SCEV *, 2> Operands;
709
30.0k
      bool Changed = false;
710
60.8k
      for (auto *Op : Expr->operands()) {
711
60.8k
        Operands.push_back(((SC*)this)->visit(Op));
712
60.8k
        Changed |= Op != Operands.back();
713
60.8k
      }
714
30.0k
      return !Changed ? 
Expr30.0k
:
SE.getMulExpr(Operands)9
;
715
30.0k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
16.6k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
16.6k
      SmallVector<const SCEV *, 2> Operands;
709
16.6k
      bool Changed = false;
710
34.6k
      for (auto *Op : Expr->operands()) {
711
34.6k
        Operands.push_back(((SC*)this)->visit(Op));
712
34.6k
        Changed |= Op != Operands.back();
713
34.6k
      }
714
16.6k
      return !Changed ? 
Expr16.6k
:
SE.getMulExpr(Operands)19
;
715
16.6k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
30.8k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
30.8k
      SmallVector<const SCEV *, 2> Operands;
709
30.8k
      bool Changed = false;
710
62.0k
      for (auto *Op : Expr->operands()) {
711
62.0k
        Operands.push_back(((SC*)this)->visit(Op));
712
62.0k
        Changed |= Op != Operands.back();
713
62.0k
      }
714
30.8k
      return !Changed ? 
Expr29.7k
:
SE.getMulExpr(Operands)1.15k
;
715
30.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
29.1k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
29.1k
      SmallVector<const SCEV *, 2> Operands;
709
29.1k
      bool Changed = false;
710
58.5k
      for (auto *Op : Expr->operands()) {
711
58.5k
        Operands.push_back(((SC*)this)->visit(Op));
712
58.5k
        Changed |= Op != Operands.back();
713
58.5k
      }
714
29.1k
      return !Changed ? 
Expr28.0k
:
SE.getMulExpr(Operands)1.07k
;
715
29.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
157k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
157k
      SmallVector<const SCEV *, 2> Operands;
709
157k
      bool Changed = false;
710
315k
      for (auto *Op : Expr->operands()) {
711
315k
        Operands.push_back(((SC*)this)->visit(Op));
712
315k
        Changed |= Op != Operands.back();
713
315k
      }
714
157k
      return !Changed ? 
Expr154k
:
SE.getMulExpr(Operands)3.18k
;
715
157k
    }
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
707
555k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
555k
      SmallVector<const SCEV *, 2> Operands;
709
555k
      bool Changed = false;
710
1.11M
      for (auto *Op : Expr->operands()) {
711
1.11M
        Operands.push_back(((SC*)this)->visit(Op));
712
1.11M
        Changed |= Op != Operands.back();
713
1.11M
      }
714
555k
      return !Changed ? 
Expr553k
:
SE.getMulExpr(Operands)2.30k
;
715
555k
    }
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
707
6
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
6
      SmallVector<const SCEV *, 2> Operands;
709
6
      bool Changed = false;
710
12
      for (auto *Op : Expr->operands()) {
711
12
        Operands.push_back(((SC*)this)->visit(Op));
712
12
        Changed |= Op != Operands.back();
713
12
      }
714
6
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
715
6
    }
llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
6
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
6
      SmallVector<const SCEV *, 2> Operands;
709
6
      bool Changed = false;
710
12
      for (auto *Op : Expr->operands()) {
711
12
        Operands.push_back(((SC*)this)->visit(Op));
712
12
        Changed |= Op != Operands.back();
713
12
      }
714
6
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
715
6
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
2.64k
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
2.64k
      SmallVector<const SCEV *, 2> Operands;
709
2.64k
      bool Changed = false;
710
6.94k
      for (auto *Op : Expr->operands()) {
711
6.94k
        Operands.push_back(((SC*)this)->visit(Op));
712
6.94k
        Changed |= Op != Operands.back();
713
6.94k
      }
714
2.64k
      return !Changed ? 
Expr2.52k
:
SE.getMulExpr(Operands)121
;
715
2.64k
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitMulExpr(llvm::SCEVMulExpr const*)
Line
Count
Source
707
183
    const SCEV *visitMulExpr(const SCEVMulExpr *Expr) {
708
183
      SmallVector<const SCEV *, 2> Operands;
709
183
      bool Changed = false;
710
379
      for (auto *Op : Expr->operands()) {
711
379
        Operands.push_back(((SC*)this)->visit(Op));
712
379
        Changed |= Op != Operands.back();
713
379
      }
714
183
      return !Changed ? Expr : 
SE.getMulExpr(Operands)0
;
715
183
    }
716
717
87.3k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
87.3k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
87.3k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
87.3k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()84.6k
;
721
87.3k
      return !Changed ? 
Expr84.6k
:
SE.getUDivExpr(LHS, RHS)2.62k
;
722
87.3k
    }
llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
6
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
6
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
6
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
6
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
721
6
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
722
6
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
5
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
5
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
5
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
5
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4
;
721
5
      return !Changed ? 
Expr3
:
SE.getUDivExpr(LHS, RHS)2
;
722
5
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
980
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
980
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
980
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
980
      bool Changed = LHS != Expr->getLHS() || RHS != Expr->getRHS();
721
980
      return !Changed ? Expr : 
SE.getUDivExpr(LHS, RHS)0
;
722
980
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
16.1k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
16.1k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
16.1k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
16.1k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()16.1k
;
721
16.1k
      return !Changed ? 
Expr16.1k
:
SE.getUDivExpr(LHS, RHS)3
;
722
16.1k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
8.40k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
8.40k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
8.40k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
8.40k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()8.19k
;
721
8.40k
      return !Changed ? 
Expr8.19k
:
SE.getUDivExpr(LHS, RHS)209
;
722
8.40k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
7.79k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
7.79k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
7.79k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
7.79k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()7.62k
;
721
7.79k
      return !Changed ? 
Expr7.62k
:
SE.getUDivExpr(LHS, RHS)171
;
722
7.79k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
4.52k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
4.52k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
4.52k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
4.52k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()4.51k
;
721
4.52k
      return !Changed ? 
Expr4.51k
:
SE.getUDivExpr(LHS, RHS)13
;
722
4.52k
    }
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
717
49.3k
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
49.3k
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
49.3k
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
49.3k
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()47.1k
;
721
49.3k
      return !Changed ? 
Expr47.1k
:
SE.getUDivExpr(LHS, RHS)2.21k
;
722
49.3k
    }
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*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitUDivExpr(llvm::SCEVUDivExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
12
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
12
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
12
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
12
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()0
;
721
12
      return !Changed ? 
Expr0
: SE.getUDivExpr(LHS, RHS);
722
12
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUDivExpr(llvm::SCEVUDivExpr const*)
Line
Count
Source
717
145
    const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
718
145
      auto *LHS = ((SC *)this)->visit(Expr->getLHS());
719
145
      auto *RHS = ((SC *)this)->visit(Expr->getRHS());
720
145
      bool Changed = LHS != Expr->getLHS() || 
RHS != Expr->getRHS()142
;
721
145
      return !Changed ? 
Expr142
:
SE.getUDivExpr(LHS, RHS)3
;
722
145
    }
723
724
307k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
725
307k
      SmallVector<const SCEV *, 2> Operands;
726
307k
      bool Changed = false;
727
614k
      for (auto *Op : Expr->operands()) {
728
614k
        Operands.push_back(((SC*)this)->visit(Op));
729
614k
        Changed |= Op != Operands.back();
730
614k
      }
731
307k
      return !Changed ? 
Expr305k
732
307k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
733
1.55k
                                         Expr->getNoWrapFlags());
734
307k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
724
510
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
725
510
      SmallVector<const SCEV *, 2> Operands;
726
510
      bool Changed = false;
727
1.12k
      for (auto *Op : Expr->operands()) {
728
1.12k
        Operands.push_back(((SC*)this)->visit(Op));
729
1.12k
        Changed |= Op != Operands.back();
730
1.12k
      }
731
510
      return !Changed ? Expr
732
510
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
733
0
                                         Expr->getNoWrapFlags());
734
510
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitAddRecExpr(llvm::SCEVAddRecExpr const*)
Line
Count
Source
724
303k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
725
303k
      SmallVector<const SCEV *, 2> Operands;
726
303k
      bool Changed = false;
727
606k
      for (auto *Op : Expr->operands()) {
728
606k
        Operands.push_back(((SC*)this)->visit(Op));
729
606k
        Changed |= Op != Operands.back();
730
606k
      }
731
303k
      return !Changed ? 
Expr302k
732
303k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
733
1.45k
                                         Expr->getNoWrapFlags());
734
303k
    }
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
724
8
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
725
8
      SmallVector<const SCEV *, 2> Operands;
726
8
      bool Changed = false;
727
16
      for (auto *Op : Expr->operands()) {
728
16
        Operands.push_back(((SC*)this)->visit(Op));
729
16
        Changed |= Op != Operands.back();
730
16
      }
731
8
      return !Changed ? 
Expr0
732
8
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
733
8
                                         Expr->getNoWrapFlags());
734
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
724
3.30k
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
725
3.30k
      SmallVector<const SCEV *, 2> Operands;
726
3.30k
      bool Changed = false;
727
6.68k
      for (auto *Op : Expr->operands()) {
728
6.68k
        Operands.push_back(((SC*)this)->visit(Op));
729
6.68k
        Changed |= Op != Operands.back();
730
6.68k
      }
731
3.30k
      return !Changed ? 
Expr3.21k
732
3.30k
                      : SE.getAddRecExpr(Operands, Expr->getLoop(),
733
88
                                         Expr->getNoWrapFlags());
734
3.30k
    }
735
736
34.1k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
34.1k
      SmallVector<const SCEV *, 2> Operands;
738
34.1k
      bool Changed = false;
739
69.0k
      for (auto *Op : Expr->operands()) {
740
69.0k
        Operands.push_back(((SC *)this)->visit(Op));
741
69.0k
        Changed |= Op != Operands.back();
742
69.0k
      }
743
34.1k
      return !Changed ? 
Expr33.7k
:
SE.getSMaxExpr(Operands)392
;
744
34.1k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
736
415
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
415
      SmallVector<const SCEV *, 2> Operands;
738
415
      bool Changed = false;
739
830
      for (auto *Op : Expr->operands()) {
740
830
        Operands.push_back(((SC *)this)->visit(Op));
741
830
        Changed |= Op != Operands.back();
742
830
      }
743
415
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
744
415
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
736
799
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
799
      SmallVector<const SCEV *, 2> Operands;
738
799
      bool Changed = false;
739
1.72k
      for (auto *Op : Expr->operands()) {
740
1.72k
        Operands.push_back(((SC *)this)->visit(Op));
741
1.72k
        Changed |= Op != Operands.back();
742
1.72k
      }
743
799
      return !Changed ? 
Expr746
:
SE.getSMaxExpr(Operands)53
;
744
799
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
736
11.8k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
11.8k
      SmallVector<const SCEV *, 2> Operands;
738
11.8k
      bool Changed = false;
739
23.9k
      for (auto *Op : Expr->operands()) {
740
23.9k
        Operands.push_back(((SC *)this)->visit(Op));
741
23.9k
        Changed |= Op != Operands.back();
742
23.9k
      }
743
11.8k
      return !Changed ? 
Expr11.8k
:
SE.getSMaxExpr(Operands)12
;
744
11.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
736
11.8k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
11.8k
      SmallVector<const SCEV *, 2> Operands;
738
11.8k
      bool Changed = false;
739
23.9k
      for (auto *Op : Expr->operands()) {
740
23.9k
        Operands.push_back(((SC *)this)->visit(Op));
741
23.9k
        Changed |= Op != Operands.back();
742
23.9k
      }
743
11.8k
      return !Changed ? 
Expr11.8k
:
SE.getSMaxExpr(Operands)12
;
744
11.8k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
736
3.03k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
3.03k
      SmallVector<const SCEV *, 2> Operands;
738
3.03k
      bool Changed = false;
739
6.08k
      for (auto *Op : Expr->operands()) {
740
6.08k
        Operands.push_back(((SC *)this)->visit(Op));
741
6.08k
        Changed |= Op != Operands.back();
742
6.08k
      }
743
3.03k
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
744
3.03k
    }
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
736
6.07k
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
6.07k
      SmallVector<const SCEV *, 2> Operands;
738
6.07k
      bool Changed = false;
739
12.4k
      for (auto *Op : Expr->operands()) {
740
12.4k
        Operands.push_back(((SC *)this)->visit(Op));
741
12.4k
        Changed |= Op != Operands.back();
742
12.4k
      }
743
6.07k
      return !Changed ? 
Expr5.75k
:
SE.getSMaxExpr(Operands)315
;
744
6.07k
    }
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*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSMaxExpr(llvm::SCEVSMaxExpr const*)
Line
Count
Source
736
50
    const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) {
737
50
      SmallVector<const SCEV *, 2> Operands;
738
50
      bool Changed = false;
739
107
      for (auto *Op : Expr->operands()) {
740
107
        Operands.push_back(((SC *)this)->visit(Op));
741
107
        Changed |= Op != Operands.back();
742
107
      }
743
50
      return !Changed ? Expr : 
SE.getSMaxExpr(Operands)0
;
744
50
    }
745
746
11.3k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
11.3k
      SmallVector<const SCEV *, 2> Operands;
748
11.3k
      bool Changed = false;
749
22.8k
      for (auto *Op : Expr->operands()) {
750
22.8k
        Operands.push_back(((SC*)this)->visit(Op));
751
22.8k
        Changed |= Op != Operands.back();
752
22.8k
      }
753
11.3k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
11.3k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
13
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
13
      SmallVector<const SCEV *, 2> Operands;
748
13
      bool Changed = false;
749
26
      for (auto *Op : Expr->operands()) {
750
26
        Operands.push_back(((SC*)this)->visit(Op));
751
26
        Changed |= Op != Operands.back();
752
26
      }
753
13
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
13
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
379
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
379
      SmallVector<const SCEV *, 2> Operands;
748
379
      bool Changed = false;
749
864
      for (auto *Op : Expr->operands()) {
750
864
        Operands.push_back(((SC*)this)->visit(Op));
751
864
        Changed |= Op != Operands.back();
752
864
      }
753
379
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
379
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
2.96k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
2.96k
      SmallVector<const SCEV *, 2> Operands;
748
2.96k
      bool Changed = false;
749
5.92k
      for (auto *Op : Expr->operands()) {
750
5.92k
        Operands.push_back(((SC*)this)->visit(Op));
751
5.92k
        Changed |= Op != Operands.back();
752
5.92k
      }
753
2.96k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
2.96k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
2.94k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
2.94k
      SmallVector<const SCEV *, 2> Operands;
748
2.94k
      bool Changed = false;
749
5.89k
      for (auto *Op : Expr->operands()) {
750
5.89k
        Operands.push_back(((SC*)this)->visit(Op));
751
5.89k
        Changed |= Op != Operands.back();
752
5.89k
      }
753
2.94k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
2.94k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
19
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
19
      SmallVector<const SCEV *, 2> Operands;
748
19
      bool Changed = false;
749
38
      for (auto *Op : Expr->operands()) {
750
38
        Operands.push_back(((SC*)this)->visit(Op));
751
38
        Changed |= Op != Operands.back();
752
38
      }
753
19
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
19
    }
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
746
5.05k
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
5.05k
      SmallVector<const SCEV *, 2> Operands;
748
5.05k
      bool Changed = false;
749
10.1k
      for (auto *Op : Expr->operands()) {
750
10.1k
        Operands.push_back(((SC*)this)->visit(Op));
751
10.1k
        Changed |= Op != Operands.back();
752
10.1k
      }
753
5.05k
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
5.05k
    }
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*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
16
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
16
      SmallVector<const SCEV *, 2> Operands;
748
16
      bool Changed = false;
749
32
      for (auto *Op : Expr->operands()) {
750
32
        Operands.push_back(((SC*)this)->visit(Op));
751
32
        Changed |= Op != Operands.back();
752
32
      }
753
16
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
16
    }
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUMaxExpr(llvm::SCEVUMaxExpr const*)
Line
Count
Source
746
7
    const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) {
747
7
      SmallVector<const SCEV *, 2> Operands;
748
7
      bool Changed = false;
749
14
      for (auto *Op : Expr->operands()) {
750
14
        Operands.push_back(((SC*)this)->visit(Op));
751
14
        Changed |= Op != Operands.back();
752
14
      }
753
7
      return !Changed ? Expr : 
SE.getUMaxExpr(Operands)0
;
754
7
    }
755
756
6.21k
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
6.21k
      SmallVector<const SCEV *, 2> Operands;
758
6.21k
      bool Changed = false;
759
12.6k
      for (auto *Op : Expr->operands()) {
760
12.6k
        Operands.push_back(((SC *)this)->visit(Op));
761
12.6k
        Changed |= Op != Operands.back();
762
12.6k
      }
763
6.21k
      return !Changed ? 
Expr6.10k
:
SE.getSMinExpr(Operands)106
;
764
6.21k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
368
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
368
      SmallVector<const SCEV *, 2> Operands;
758
368
      bool Changed = false;
759
752
      for (auto *Op : Expr->operands()) {
760
752
        Operands.push_back(((SC *)this)->visit(Op));
761
752
        Changed |= Op != Operands.back();
762
752
      }
763
368
      return !Changed ? Expr : 
SE.getSMinExpr(Operands)0
;
764
368
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
228
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
228
      SmallVector<const SCEV *, 2> Operands;
758
228
      bool Changed = false;
759
498
      for (auto *Op : Expr->operands()) {
760
498
        Operands.push_back(((SC *)this)->visit(Op));
761
498
        Changed |= Op != Operands.back();
762
498
      }
763
228
      return !Changed ? 
Expr227
:
SE.getSMinExpr(Operands)1
;
764
228
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
1.27k
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
1.27k
      SmallVector<const SCEV *, 2> Operands;
758
1.27k
      bool Changed = false;
759
2.61k
      for (auto *Op : Expr->operands()) {
760
2.61k
        Operands.push_back(((SC *)this)->visit(Op));
761
2.61k
        Changed |= Op != Operands.back();
762
2.61k
      }
763
1.27k
      return !Changed ? 
Expr1.21k
:
SE.getSMinExpr(Operands)64
;
764
1.27k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
1.18k
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
1.18k
      SmallVector<const SCEV *, 2> Operands;
758
1.18k
      bool Changed = false;
759
2.42k
      for (auto *Op : Expr->operands()) {
760
2.42k
        Operands.push_back(((SC *)this)->visit(Op));
761
2.42k
        Changed |= Op != Operands.back();
762
2.42k
      }
763
1.18k
      return !Changed ? 
Expr1.14k
:
SE.getSMinExpr(Operands)36
;
764
1.18k
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
1.39k
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
1.39k
      SmallVector<const SCEV *, 2> Operands;
758
1.39k
      bool Changed = false;
759
2.79k
      for (auto *Op : Expr->operands()) {
760
2.79k
        Operands.push_back(((SC *)this)->visit(Op));
761
2.79k
        Changed |= Op != Operands.back();
762
2.79k
      }
763
1.39k
      return !Changed ? Expr : 
SE.getSMinExpr(Operands)0
;
764
1.39k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitSMinExpr(llvm::SCEVSMinExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
1.75k
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
1.75k
      SmallVector<const SCEV *, 2> Operands;
758
1.75k
      bool Changed = false;
759
3.57k
      for (auto *Op : Expr->operands()) {
760
3.57k
        Operands.push_back(((SC *)this)->visit(Op));
761
3.57k
        Changed |= Op != Operands.back();
762
3.57k
      }
763
1.75k
      return !Changed ? 
Expr1.75k
:
SE.getSMinExpr(Operands)5
;
764
1.75k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Unexecuted instantiation: ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitSMinExpr(llvm::SCEVSMinExpr const*)
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitSMinExpr(llvm::SCEVSMinExpr const*)
Line
Count
Source
756
10
    const SCEV *visitSMinExpr(const SCEVSMinExpr *Expr) {
757
10
      SmallVector<const SCEV *, 2> Operands;
758
10
      bool Changed = false;
759
22
      for (auto *Op : Expr->operands()) {
760
22
        Operands.push_back(((SC *)this)->visit(Op));
761
22
        Changed |= Op != Operands.back();
762
22
      }
763
10
      return !Changed ? Expr : 
SE.getSMinExpr(Operands)0
;
764
10
    }
765
766
13.0k
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
13.0k
      SmallVector<const SCEV *, 2> Operands;
768
13.0k
      bool Changed = false;
769
26.4k
      for (auto *Op : Expr->operands()) {
770
26.4k
        Operands.push_back(((SC *)this)->visit(Op));
771
26.4k
        Changed |= Op != Operands.back();
772
26.4k
      }
773
13.0k
      return !Changed ? 
Expr12.6k
:
SE.getUMinExpr(Operands)404
;
774
13.0k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVBackedgeConditionFolder>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
621
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
621
      SmallVector<const SCEV *, 2> Operands;
768
621
      bool Changed = false;
769
1.26k
      for (auto *Op : Expr->operands()) {
770
1.26k
        Operands.push_back(((SC *)this)->visit(Op));
771
1.26k
        Changed |= Op != Operands.back();
772
1.26k
      }
773
621
      return !Changed ? Expr : 
SE.getUMinExpr(Operands)0
;
774
621
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVShiftRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
362
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
362
      SmallVector<const SCEV *, 2> Operands;
768
362
      bool Changed = false;
769
750
      for (auto *Op : Expr->operands()) {
770
750
        Operands.push_back(((SC *)this)->visit(Op));
771
750
        Changed |= Op != Operands.back();
772
750
      }
773
362
      return !Changed ? 
Expr330
:
SE.getUMinExpr(Operands)32
;
774
362
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVInitRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
698
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
698
      SmallVector<const SCEV *, 2> Operands;
768
698
      bool Changed = false;
769
1.47k
      for (auto *Op : Expr->operands()) {
770
1.47k
        Operands.push_back(((SC *)this)->visit(Op));
771
1.47k
        Changed |= Op != Operands.back();
772
1.47k
      }
773
698
      return !Changed ? 
Expr692
:
SE.getUMinExpr(Operands)6
;
774
698
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
674
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
674
      SmallVector<const SCEV *, 2> Operands;
768
674
      bool Changed = false;
769
1.42k
      for (auto *Op : Expr->operands()) {
770
1.42k
        Operands.push_back(((SC *)this)->visit(Op));
771
1.42k
        Changed |= Op != Operands.back();
772
1.42k
      }
773
674
      return !Changed ? 
Expr670
:
SE.getUMinExpr(Operands)4
;
774
674
    }
ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPredicateRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
4.00k
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
4.00k
      SmallVector<const SCEV *, 2> Operands;
768
4.00k
      bool Changed = false;
769
8.00k
      for (auto *Op : Expr->operands()) {
770
8.00k
        Operands.push_back(((SC *)this)->visit(Op));
771
8.00k
        Changed |= Op != Operands.back();
772
8.00k
      }
773
4.00k
      return !Changed ? Expr : 
SE.getUMinExpr(Operands)0
;
774
4.00k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<llvm::ScalarEvolution::verify() const::SCEVMapper>::visitUMinExpr(llvm::SCEVUMinExpr const*)
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
6.70k
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
6.70k
      SmallVector<const SCEV *, 2> Operands;
768
6.70k
      bool Changed = false;
769
13.4k
      for (auto *Op : Expr->operands()) {
770
13.4k
        Operands.push_back(((SC *)this)->visit(Op));
771
13.4k
        Changed |= Op != Operands.back();
772
13.4k
      }
773
6.70k
      return !Changed ? 
Expr6.34k
:
SE.getUMinExpr(Operands)362
;
774
6.70k
    }
Unexecuted instantiation: StackSafetyAnalysis.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Unexecuted instantiation: SafeStack.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::AllocaOffsetRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Unexecuted instantiation: ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUMinExpr(llvm::SCEVUMinExpr const*)
ScopInfo.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVSensitiveParameterRewriter>::visitUMinExpr(llvm::SCEVUMinExpr const*)
Line
Count
Source
766
8
    const SCEV *visitUMinExpr(const SCEVUMinExpr *Expr) {
767
8
      SmallVector<const SCEV *, 2> Operands;
768
8
      bool Changed = false;
769
16
      for (auto *Op : Expr->operands()) {
770
16
        Operands.push_back(((SC *)this)->visit(Op));
771
16
        Changed |= Op != Operands.back();
772
16
      }
773
8
      return !Changed ? Expr : 
SE.getUMinExpr(Operands)0
;
774
8
    }
775
776
2.37M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
777
2.37M
      return Expr;
778
2.37M
    }
llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
776
618
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
777
618
      return Expr;
778
618
    }
ScalarEvolutionNormalization.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::NormalizeDenormalizeRewriter>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
776
2.37M
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
777
2.37M
      return Expr;
778
2.37M
    }
llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
776
12
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
777
12
      return Expr;
778
12
    }
ScopDetection.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVRemoveMax>::visitUnknown(llvm::SCEVUnknown const*)
Line
Count
Source
776
2.44k
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
777
2.44k
      return Expr;
778
2.44k
    }
779
780
301k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
781
301k
      return Expr;
782
301k
    }
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVParameterRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
Unexecuted instantiation: llvm::SCEVRewriteVisitor<llvm::SCEVLoopAddRecRewriter>::visitCouldNotCompute(llvm::SCEVCouldNotCompute const*)
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
780
301k
    const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) {
781
301k
      return Expr;
782
301k
    }
Unexecuted instantiation: ScalarEvolution.cpp:llvm::SCEVRewriteVisitor<(anonymous namespace)::SCEVPostIncRewriter>::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: llvm::SCEVRewriteVisitor<LoopFuser::AddRecLoopReplacer>::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*)
783
  };
784
785
  using ValueToValueMap = DenseMap<const Value *, Value *>;
786
787
  /// The SCEVParameterRewriter takes a scalar evolution expression and updates
788
  /// the SCEVUnknown components following the Map (Value -> Value).
789
  class SCEVParameterRewriter : public SCEVRewriteVisitor<SCEVParameterRewriter> {
790
  public:
791
    static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
792
                               ValueToValueMap &Map,
793
277
                               bool InterpretConsts = false) {
794
277
      SCEVParameterRewriter Rewriter(SE, Map, InterpretConsts);
795
277
      return Rewriter.visit(Scev);
796
277
    }
797
798
    SCEVParameterRewriter(ScalarEvolution &SE, ValueToValueMap &M, bool C)
799
277
      : SCEVRewriteVisitor(SE), Map(M), InterpretConsts(C) {}
800
801
58
    const SCEV *visitUnknown(const SCEVUnknown *Expr) {
802
58
      Value *V = Expr->getValue();
803
58
      if (Map.count(V)) {
804
6
        Value *NV = Map[V];
805
6
        if (InterpretConsts && 
isa<ConstantInt>(NV)4
)
806
4
          return SE.getConstant(cast<ConstantInt>(NV));
807
2
        return SE.getUnknown(NV);
808
2
      }
809
52
      return Expr;
810
52
    }
811
812
  private:
813
    ValueToValueMap &Map;
814
    bool InterpretConsts;
815
  };
816
817
  using LoopToScevMapT = DenseMap<const Loop *, const SCEV *>;
818
819
  /// The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies
820
  /// the Map (Loop -> SCEV) to all AddRecExprs.
821
  class SCEVLoopAddRecRewriter
822
      : public SCEVRewriteVisitor<SCEVLoopAddRecRewriter> {
823
  public:
824
    SCEVLoopAddRecRewriter(ScalarEvolution &SE, LoopToScevMapT &M)
825
700
        : SCEVRewriteVisitor(SE), Map(M) {}
826
827
    static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
828
700
                               ScalarEvolution &SE) {
829
700
      SCEVLoopAddRecRewriter Rewriter(SE, Map);
830
700
      return Rewriter.visit(Scev);
831
700
    }
832
833
680
    const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
834
680
      SmallVector<const SCEV *, 2> Operands;
835
680
      for (const SCEV *Op : Expr->operands())
836
1.36k
        Operands.push_back(visit(Op));
837
680
838
680
      const Loop *L = Expr->getLoop();
839
680
      const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags());
840
680
841
680
      if (0 == Map.count(L))
842
1
        return Res;
843
679
844
679
      const SCEVAddRecExpr *Rec = cast<SCEVAddRecExpr>(Res);
845
679
      return Rec->evaluateAtIteration(Map[L], SE);
846
679
    }
847
848
  private:
849
    LoopToScevMapT &Map;
850
  };
851
852
} // end namespace llvm
853
854
#endif // LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H