From d90488f7e8160c136b2b40276e9b6c1c9c688332 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 4 Mar 2014 11:59:06 +0000 Subject: [PATCH] [Modules] Move the TargetFolder into the Analysis library. Historically, this would have been required because of the use of DataLayout, but that has moved into the IR proper. It is still required because this folder uses the constant folding in the analysis library (which uses the datalayout) as the more aggressive basis of its folder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202832 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/MemoryBuiltins.h | 2 +- include/llvm/Analysis/ScalarEvolutionExpander.h | 2 +- include/llvm/{Support => Analysis}/TargetFolder.h | 6 +++--- lib/Transforms/InstCombine/InstCombine.h | 2 +- lib/Transforms/Instrumentation/BoundsChecking.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename include/llvm/{Support => Analysis}/TargetFolder.h (98%) diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h index 7784db402c1..c86c25f8ab4 100644 --- a/include/llvm/Analysis/MemoryBuiltins.h +++ b/include/llvm/Analysis/MemoryBuiltins.h @@ -17,12 +17,12 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/Analysis/TargetFolder.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Operator.h" #include "llvm/IR/ValueHandle.h" #include "llvm/InstVisitor.h" #include "llvm/Support/DataTypes.h" -#include "llvm/Support/TargetFolder.h" namespace llvm { class CallInst; diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 3e57ba877ee..9162735dd8a 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -16,9 +16,9 @@ #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" +#include "llvm/Analysis/TargetFolder.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/ValueHandle.h" -#include "llvm/Support/TargetFolder.h" #include namespace llvm { diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Analysis/TargetFolder.h similarity index 98% rename from include/llvm/Support/TargetFolder.h rename to include/llvm/Analysis/TargetFolder.h index 2632f8660d3..8a7fc7caf7b 100644 --- a/include/llvm/Support/TargetFolder.h +++ b/include/llvm/Analysis/TargetFolder.h @@ -1,4 +1,4 @@ -//====-- llvm/Support/TargetFolder.h - Constant folding helper -*- C++ -*-====// +//====- TargetFolder.h - Constant folding helper ---------------*- C++ -*-====// // // The LLVM Compiler Infrastructure // @@ -16,8 +16,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_SUPPORT_TARGETFOLDER_H -#define LLVM_SUPPORT_TARGETFOLDER_H +#ifndef LLVM_ANALYSIS_TARGETFOLDER_H +#define LLVM_ANALYSIS_TARGETFOLDER_H #include "llvm/ADT/ArrayRef.h" #include "llvm/Analysis/ConstantFolding.h" diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h index 2a4b8a146d8..3b454dd3f00 100644 --- a/lib/Transforms/InstCombine/InstCombine.h +++ b/lib/Transforms/InstCombine/InstCombine.h @@ -11,13 +11,13 @@ #define INSTCOMBINE_INSTCOMBINE_H #include "InstCombineWorklist.h" +#include "llvm/Analysis/TargetFolder.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Operator.h" #include "llvm/InstVisitor.h" #include "llvm/Pass.h" -#include "llvm/Support/TargetFolder.h" #include "llvm/Transforms/Utils/SimplifyLibCalls.h" namespace llvm { diff --git a/lib/Transforms/Instrumentation/BoundsChecking.cpp b/lib/Transforms/Instrumentation/BoundsChecking.cpp index 4a862b619f6..fcab822cd2d 100644 --- a/lib/Transforms/Instrumentation/BoundsChecking.cpp +++ b/lib/Transforms/Instrumentation/BoundsChecking.cpp @@ -16,6 +16,7 @@ #include "llvm/Transforms/Instrumentation.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/MemoryBuiltins.h" +#include "llvm/Analysis/TargetFolder.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/InstIterator.h" @@ -23,7 +24,6 @@ #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/TargetFolder.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetLibraryInfo.h" using namespace llvm; -- 2.11.0