<commit_before>//===- llvm/Analysis/Expressions.h - Expression Analysis Utils --*- C++ -*-===//
// 
//                     The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
// 
//===----------------------------------------------------------------------===//
//
// This file defines a package of expression analysis utilties:
//
// ClassifyExpression: Analyze an expression to determine the complexity of the
//   expression, and which other variables it depends on.  
// 
//===----------------------------------------------------------------------===//

#ifndef LLVM_ANALYSIS_EXPRESSIONS_H
#define LLVM_ANALYSIS_EXPRESSIONS_H

namespace llvm {

class Type;
class Value;
class ConstantInt;

struct ExprType;

// ClassifyExpression: Analyze an expression to determine the complexity of the
// expression, and which other values it depends on.  
//
ExprType ClassifyExpression(Value *Expr);

// ExprType - Represent an expression of the form CONST*VAR+CONST
// or simpler.  The expression form that yields the least information about the
// expression is just the Linear form with no offset.
//
struct ExprType {
  enum ExpressionType {
    Constant,            // Expr is a simple constant, Offset is value
    Linear,              // Expr is linear expr, Value is Var+Offset
    ScaledLinear,        // Expr is scaled linear exp, Value is Scale*Var+Offset
  } ExprTy;

  const ConstantInt *Offset;  // Offset of expr, or null if 0
  Value             *Var;     // Var referenced, if Linear or above (null if 0)
  const ConstantInt *Scale;   // Scale of var if ScaledLinear expr (null if 1)

  inline ExprType(const ConstantInt *CPV = 0) {
    Offset = CPV; Var = 0; Scale = 0;
    ExprTy = Constant;
  }
  ExprType(Value *Val);        // Create a linear or constant expression
  ExprType(const ConstantInt *scale, Value *var, const ConstantInt *offset);

  // If this expression has an intrinsic type, return it.  If it is zero, return
  // the specified type.
  //
  const Type *getExprType(const Type *Default) const;
};

} // End llvm namespace

#endif
<commit_msg>Rename ClassifyExpression -> ClassifyExpr<commit_after>//===- llvm/Analysis/Expressions.h - Expression Analysis Utils --*- C++ -*-===//
// 
//                     The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
// 
//===----------------------------------------------------------------------===//
//
// This file defines a package of expression analysis utilties:
//
// ClassifyExpr: Analyze an expression to determine the complexity of the
// expression, and which other variables it depends on.
// 
//===----------------------------------------------------------------------===//

#ifndef LLVM_ANALYSIS_EXPRESSIONS_H
#define LLVM_ANALYSIS_EXPRESSIONS_H

namespace llvm {

class Type;
class Value;
class ConstantInt;

struct ExprType;

/// ClassifyExpr: Analyze an expression to determine the complexity of the
/// expression, and which other values it depends on.
///
ExprType ClassifyExpr(Value *Expr);

// ExprType - Represent an expression of the form CONST*VAR+CONST
// or simpler.  The expression form that yields the least information about the
// expression is just the Linear form with no offset.
//
struct ExprType {
  enum ExpressionType {
    Constant,            // Expr is a simple constant, Offset is value
    Linear,              // Expr is linear expr, Value is Var+Offset
    ScaledLinear,        // Expr is scaled linear exp, Value is Scale*Var+Offset
  } ExprTy;

  const ConstantInt *Offset;  // Offset of expr, or null if 0
  Value             *Var;     // Var referenced, if Linear or above (null if 0)
  const ConstantInt *Scale;   // Scale of var if ScaledLinear expr (null if 1)

  inline ExprType(const ConstantInt *CPV = 0) {
    Offset = CPV; Var = 0; Scale = 0;
    ExprTy = Constant;
  }
  ExprType(Value *Val);        // Create a linear or constant expression
  ExprType(const ConstantInt *scale, Value *var, const ConstantInt *offset);

  // If this expression has an intrinsic type, return it.  If it is zero, return
  // the specified type.
  //
  const Type *getExprType(const Type *Default) const;
};

} // End llvm namespace

#endif

{'fraction_non_alphanumeric': 0.15323854660347552, 'fraction_numerical': 0.002708192281651997, 'mean_word_length': 2.2976190476190474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '955560', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1157, 'n_words': 492}