[llvm-commits] [vector_llvm] CVS: llvm/include/llvm/Analysis/ConstantFolding.h Expressions.h FindUnsafePointerTypes.h LinkAllAnalyses.h Passes.h

Robert Bocchino bocchino at cs.uiuc.edu
Wed Nov 16 10:31:57 PST 2005



Changes in directory llvm/include/llvm/Analysis:

ConstantFolding.h added (r1.1.4.2)
Expressions.h (r1.12) removed
FindUnsafePointerTypes.h (r1.18) removed
LinkAllAnalyses.h added (r1.2.4.2)
Passes.h updated: 1.6 -> 1.6.4.1
---
Log message:

Merged mainline into Vector LLVM branch


---
Diffs of the changes:  (+102 -0)

 ConstantFolding.h |   36 +++++++++++++++++++++++++++++++
 LinkAllAnalyses.h |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Passes.h          |    4 +++
 3 files changed, 102 insertions(+)


Index: llvm/include/llvm/Analysis/ConstantFolding.h
diff -c /dev/null llvm/include/llvm/Analysis/ConstantFolding.h:1.1.4.2
*** /dev/null	Wed Nov 16 12:31:56 2005
--- llvm/include/llvm/Analysis/ConstantFolding.h	Wed Nov 16 12:31:45 2005
***************
*** 0 ****
--- 1,36 ----
+ //===-- ConstantFolding.h - Analyze constant folding possibilities --------===//
+ //
+ //                     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 family of functions determines the possibility of performing constant
+ // folding.
+ //
+ //===----------------------------------------------------------------------===//
+ 
+ #include "llvm/Constants.h"
+ #include "llvm/Function.h"
+ using namespace llvm;
+ 
+ namespace llvm {
+ 
+ /// canConstantFoldCallTo - Return true if its even possible to fold a call to
+ /// the specified function.
+ extern
+ bool canConstantFoldCallTo(Function *F);
+ 
+ /// ConstantFoldFP - Given a function that evaluates the constant, return an
+ ///                  LLVM Constant that represents the evaluated constant
+ extern Constant *
+ ConstantFoldFP(double (*NativeFP)(double), double V, const Type *Ty);
+ 
+ /// ConstantFoldCall - Attempt to constant fold a call to the specified function
+ /// with the specified arguments, returning null if unsuccessful.
+ extern Constant *
+ ConstantFoldCall(Function *F, const std::vector<Constant*> &Operands);
+ }
+ 


Index: llvm/include/llvm/Analysis/LinkAllAnalyses.h
diff -c /dev/null llvm/include/llvm/Analysis/LinkAllAnalyses.h:1.2.4.2
*** /dev/null	Wed Nov 16 12:31:57 2005
--- llvm/include/llvm/Analysis/LinkAllAnalyses.h	Wed Nov 16 12:31:46 2005
***************
*** 0 ****
--- 1,62 ----
+ //===- LinkAllAnalyses.h - Reference All Analysis Passes --------*- C++ -*-===//
+ //
+ //                      The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Chris Lattner and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ //===----------------------------------------------------------------------===//
+ //
+ // This header file pulls in all analysis passes for tools like analyze and
+ // bugpoint that need this functionality.
+ //
+ //===----------------------------------------------------------------------===//
+ 
+ #ifndef LLVM_ANALYSIS_LINKALLANALYSES_H
+ #define LLVM_ANALYSIS_LINKALLANALYSES_H
+ 
+ #include "llvm/Analysis/AliasSetTracker.h"
+ #include "llvm/Analysis/CallGraph.h"
+ #include "llvm/Analysis/FindUsedTypes.h"
+ #include "llvm/Analysis/IntervalPartition.h"
+ #include "llvm/Analysis/PostDominators.h"
+ #include "llvm/Analysis/Passes.h"
+ #include "llvm/Analysis/ScalarEvolution.h"
+ #include "llvm/Analysis/DataStructure/DataStructure.h"
+ #include "llvm/Function.h"
+ #include <cstdlib>
+ 
+ namespace {
+   struct ForceAnalysisPassLinking {
+     ForceAnalysisPassLinking() {
+       // We must reference the passes in such a way that compilers will not
+       // delete it all as dead code, even with whole program optimization,
+       // yet is effectively a NO-OP. As the compiler isn't smart enough
+       // to know that getenv() never returns -1, this will do the job.
+       if (std::getenv("bar") != (char*) -1)
+         return;
+ 
+       (void)new llvm::LocalDataStructures();
+       (void)new llvm::BUDataStructures();
+       (void)new llvm::TDDataStructures();
+       (void)new llvm::CompleteBUDataStructures();
+       (void)new llvm::EquivClassGraphs();
+       (void)llvm::createDataStructureStatsPass();
+       (void)llvm::createDataStructureGraphCheckerPass();
+       (void)llvm::createProfileLoaderPass();
+       (void)llvm::createNoProfileInfoPass();
+       (void)llvm::createInstCountPass();
+       (void)new llvm::IntervalPartition();
+       (void)new llvm::ImmediateDominators();
+       (void)new llvm::PostDominatorSet();
+       (void)new llvm::CallGraph();
+       (void)new llvm::FindUsedTypes();
+       (void)new llvm::ScalarEvolution();
+       ((llvm::Function*)0)->viewCFGOnly();
+       llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
+       X.add((llvm::Value*)0, 0);  // for -print-alias-sets
+     }
+   } ForceAnalysisPassLinking;
+ };
+ 
+ #endif


Index: llvm/include/llvm/Analysis/Passes.h
diff -u llvm/include/llvm/Analysis/Passes.h:1.6 llvm/include/llvm/Analysis/Passes.h:1.6.4.1
--- llvm/include/llvm/Analysis/Passes.h:1.6	Thu Apr 21 15:16:32 2005
+++ llvm/include/llvm/Analysis/Passes.h	Wed Nov 16 12:31:46 2005
@@ -102,6 +102,10 @@
   // simple context insensitive alias analysis.
   //
   ModulePass *createSteensgaardPass();
+  
+  // Minor pass prototypes, allowing us to expose them through bugpoint and
+  // analyze.
+  FunctionPass *createInstCountPass();
 }
 
 #endif






More information about the llvm-commits mailing list