This file is indexed.

/usr/lib/llvm-3.8/include/polly/CodeGen/IslAst.h is in libclang-common-3.8-dev 1:3.8.1-24.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
//===- IslAst.h - Interface to the isl code generator-------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// The isl code generator interface takes a Scop and generates a isl_ast. This
// ist_ast can either be returned directly or it can be pretty printed to
// stdout.
//
// A typical isl_ast output looks like this:
//
// for (c2 = max(0, ceild(n + m, 2); c2 <= min(511, floord(5 * n, 3)); c2++) {
//   bb2(c2);
// }
//
//===----------------------------------------------------------------------===//

#ifndef POLLY_ISL_AST_H
#define POLLY_ISL_AST_H

#include "polly/Config/config.h"
#include "polly/ScopPass.h"
#include "isl/ast.h"

namespace llvm {
class raw_ostream;
}

struct isl_pw_aff;
struct isl_ast_node;
struct isl_ast_expr;
struct isl_ast_build;
struct isl_union_map;
struct isl_pw_multi_aff;

namespace polly {
class Scop;
class IslAst;
class MemoryAccess;

class IslAstInfo : public ScopPass {
public:
  using MemoryAccessSet = SmallPtrSet<MemoryAccess *, 4>;

  /// @brief Payload information used to annotate an AST node.
  struct IslAstUserPayload {
    /// @brief Construct and initialize the payload.
    IslAstUserPayload()
        : IsInnermost(false), IsInnermostParallel(false),
          IsOutermostParallel(false), IsReductionParallel(false),
          MinimalDependenceDistance(nullptr), Build(nullptr) {}

    /// @brief Cleanup all isl structs on destruction.
    ~IslAstUserPayload();

    /// @brief Flag to mark innermost loops.
    bool IsInnermost;

    /// @brief Flag to mark innermost parallel loops.
    bool IsInnermostParallel;

    /// @brief Flag to mark outermost parallel loops.
    bool IsOutermostParallel;

    /// @brief Flag to mark parallel loops which break reductions.
    bool IsReductionParallel;

    /// @brief The minimal dependence distance for non parallel loops.
    isl_pw_aff *MinimalDependenceDistance;

    /// @brief The build environment at the time this node was constructed.
    isl_ast_build *Build;

    /// @brief Set of accesses which break reduction dependences.
    MemoryAccessSet BrokenReductions;
  };

private:
  Scop *S;
  IslAst *Ast;

public:
  static char ID;
  IslAstInfo() : ScopPass(ID), S(nullptr), Ast(nullptr) {}

  /// @brief Build the AST for the given SCoP @p S.
  bool runOnScop(Scop &S) override;

  /// @brief Register all analyses and transformation required.
  void getAnalysisUsage(AnalysisUsage &AU) const override;

  /// @brief Release the internal memory.
  void releaseMemory() override;

  /// @brief Print a source code representation of the program.
  void printScop(llvm::raw_ostream &OS, Scop &S) const override;

  /// @brief Return a copy of the AST root node.
  __isl_give isl_ast_node *getAst() const;

  /// @brief Get the run condition.
  ///
  /// Only if the run condition evaluates at run-time to a non-zero value, the
  /// assumptions that have been taken hold. If the run condition evaluates to
  /// zero/false some assumptions do not hold and the original code needs to
  /// be executed.
  __isl_give isl_ast_expr *getRunCondition() const;

  /// @name Extract information attached to an isl ast (for) node.
  ///
  ///{

  /// @brief Get the complete payload attached to @p Node.
  static IslAstUserPayload *getNodePayload(__isl_keep isl_ast_node *Node);

  /// @brief Is this loop an innermost loop?
  static bool isInnermost(__isl_keep isl_ast_node *Node);

  /// @brief Is this loop a parallel loop?
  static bool isParallel(__isl_keep isl_ast_node *Node);

  /// @brief Is this loop an outermost parallel loop?
  static bool isOutermostParallel(__isl_keep isl_ast_node *Node);

  /// @brief Is this loop an innermost parallel loop?
  static bool isInnermostParallel(__isl_keep isl_ast_node *Node);

  /// @brief Is this loop a reduction parallel loop?
  static bool isReductionParallel(__isl_keep isl_ast_node *Node);

  /// @brief Will the loop be run as thread parallel?
  static bool isExecutedInParallel(__isl_keep isl_ast_node *Node);

  /// @brief Get the nodes schedule or a nullptr if not available.
  static __isl_give isl_union_map *getSchedule(__isl_keep isl_ast_node *Node);

  /// @brief Get minimal dependence distance or nullptr if not available.
  static __isl_give isl_pw_aff *
  getMinimalDependenceDistance(__isl_keep isl_ast_node *Node);

  /// @brief Get the nodes broken reductions or a nullptr if not available.
  static MemoryAccessSet *getBrokenReductions(__isl_keep isl_ast_node *Node);

  /// @brief Get the nodes build context or a nullptr if not available.
  static __isl_give isl_ast_build *getBuild(__isl_keep isl_ast_node *Node);

  ///}
};
}

namespace llvm {
class PassRegistry;
void initializeIslAstInfoPass(llvm::PassRegistry &);
}
#endif /* POLLY_ISL_AST_H */