X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FAnalysis%2FExpressions.h;h=8b02b14538618568a32ad04657fbe96e63bb90a2;hb=d49b12041419709a0690667ce1e2b5e9b9a11610;hp=6d1d686ad2527c47b938c43c9fdcae9d7cdbba6b;hpb=c74cb8698f1771603a6ab008277a407c55e47753;p=oota-llvm.git diff --git a/include/llvm/Analysis/Expressions.h b/include/llvm/Analysis/Expressions.h index 6d1d686ad25..8b02b145386 100644 --- a/include/llvm/Analysis/Expressions.h +++ b/include/llvm/Analysis/Expressions.h @@ -1,31 +1,39 @@ -//===- llvm/Analysis/Expressions.h - Expression Analysis Utils ---*- C++ -*--=// +//===- 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. +// 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 -#include +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); +/// 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. -// +/// ExprType Class - 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 @@ -44,10 +52,12 @@ struct ExprType { 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. - // + /// 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