Skip to content

Commit

Permalink
Move all of the header files which are involved in modelling the LLVM IR
Browse files Browse the repository at this point in the history
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Jan 2, 2013
1 parent 7f00f87 commit 0b8c9a8
Show file tree
Hide file tree
Showing 603 changed files with 1,845 additions and 1,844 deletions.
2 changes: 1 addition & 1 deletion Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
$(LLVM_SRC_ROOT)/include/llvm/Target/TargetSchedule.td \
$(LLVM_SRC_ROOT)/include/llvm/Target/TargetSelectionDAG.td \
$(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td) \
$(wildcard $(LLVM_SRC_ROOT)/include/llvm/Intrinsics*.td)
$(wildcard $(LLVM_SRC_ROOT)/include/llvm/IR/Intrinsics*.td)

# All .inc.tmp files depend on the .td files.
$(INCTMPFiles) : $(TDFiles)
Expand Down
4 changes: 2 additions & 2 deletions include/llvm-c/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

/* Need these includes to support the LLVM 'cast' template for the C++ 'wrap'
and 'unwrap' conversion functions. */
#include "llvm/IRBuilder.h"
#include "llvm/Module.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/PassRegistry.h"

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/BlockFrequencyImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/BasicBlock.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/Support/BlockFrequency.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/Debug.h"
Expand Down
6 changes: 3 additions & 3 deletions include/llvm/Analysis/CFGPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#define LLVM_ANALYSIS_CFGPRINTER_H

#include "llvm/Assembly/Writer.h"
#include "llvm/Constants.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/GraphWriter.h"

Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/CallGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Function.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/IncludeFile.h"
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Analysis/CaptureTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#define LLVM_ANALYSIS_CAPTURETRACKING_H

#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/CallSite.h"

namespace llvm {
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/DependenceAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#define LLVM_ANALYSIS_DEPENDENCEANALYSIS_H

#include "llvm/ADT/SmallBitVector.h"
#include "llvm/Instructions.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Pass.h"

namespace llvm {
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/Dominators.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Function.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/InlineCost.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/ValueMap.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Function.h"
#include "llvm/IR/Function.h"
#include <cassert>
#include <climits>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/InstructionSimplify.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H
#define LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H

#include "llvm/User.h"
#include "llvm/IR/User.h"

namespace llvm {
template<typename T>
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/IntervalIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define LLVM_INTERVAL_ITERATOR_H

#include "llvm/Analysis/IntervalPartition.h"
#include "llvm/Function.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/CFG.h"
#include <algorithm>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/Loads.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef LLVM_ANALYSIS_LOADS_H
#define LLVM_ANALYSIS_LOADS_H

#include "llvm/BasicBlock.h"
#include "llvm/IR/BasicBlock.h"

namespace llvm {

Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/LoopPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define LLVM_LOOP_PASS_H

#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Function.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
#include "llvm/PassManagers.h"
#include <deque>
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Analysis/MemoryBuiltins.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/IRBuilder.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Operator.h"
#include "llvm/InstVisitor.h"
#include "llvm/Operator.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/TargetFolder.h"
#include "llvm/Support/ValueHandle.h"
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/MemoryDependenceAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/BasicBlock.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/Pass.h"
#include "llvm/Support/ValueHandle.h"

Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/PHITransAddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define LLVM_ANALYSIS_PHITRANSADDR_H

#include "llvm/ADT/SmallVector.h"
#include "llvm/Instruction.h"
#include "llvm/IR/Instruction.h"

namespace llvm {
class DominatorTree;
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Analysis/PathNumbering.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#define LLVM_PATH_NUMBERING_H

#include "llvm/Analysis/ProfileInfoTypes.h"
#include "llvm/BasicBlock.h"
#include "llvm/Instructions.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/PathProfileInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define LLVM_PATHPROFILEINFO_H

#include "llvm/Analysis/PathNumbering.h"
#include "llvm/BasicBlock.h"
#include "llvm/IR/BasicBlock.h"

namespace llvm {

Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Analysis/PtrUseVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/DataLayout.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/InstVisitor.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/Support/Compiler.h"

namespace llvm {
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/RegionPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define LLVM_REGION_PASS_H

#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Function.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
#include "llvm/PassManagers.h"
#include <deque>
Expand Down
6 changes: 3 additions & 3 deletions include/llvm/Analysis/ScalarEvolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Operator.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Operator.h"
#include "llvm/Pass.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ConstantRange.h"
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/ScalarEvolutionExpander.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/ScalarEvolutionNormalization.h"
#include "llvm/IRBuilder.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/Support/TargetFolder.h"
#include "llvm/Support/ValueHandle.h"
#include <set>
Expand Down
8 changes: 1 addition & 7 deletions include/llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
set(LLVM_TARGET_DEFINITIONS Intrinsics.td)

tablegen(LLVM Intrinsics.gen -gen-intrinsic)

add_custom_target(intrinsics_gen ALL
DEPENDS ${llvm_builded_incs_dir}/Intrinsics.gen)
set_target_properties(intrinsics_gen PROPERTIES FOLDER "Tablegenning")
add_subdirectory(IR)

if( MSVC_IDE OR XCODE )
# Creates a dummy target containing all headers for the benefit of
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/CodeGen/Analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/InlineAsm.h"
#include "llvm/Instructions.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/CallSite.h"

namespace llvm {
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/AsmPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define LLVM_CODEGEN_ASMPRINTER_H

#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/InlineAsm.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/ErrorHandling.h"

Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/CallingConvLower.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
#define LLVM_CODEGEN_CALLINGCONVLOWER_H

#include "llvm/ADT/SmallVector.h"
#include "llvm/CallingConv.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/Target/TargetCallingConv.h"

namespace llvm {
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/CodeGen/FunctionLoweringInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/InlineAsm.h"
#include "llvm/Instructions.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/IntrinsicLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef LLVM_CODEGEN_INTRINSICLOWERING_H
#define LLVM_CODEGEN_INTRINSICLOWERING_H

#include "llvm/Intrinsics.h"
#include "llvm/IR/Intrinsics.h"

namespace llvm {
class CallInst;
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/LexicalScopes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Metadata.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Support/DebugLoc.h"
#include "llvm/Support/ValueHandle.h"
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/MachineInstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/InlineAsm.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Support/DebugLoc.h"
#include "llvm/Target/TargetOpcodes.h"
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/CodeGen/MachineModuleInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/GlobalValue.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Metadata.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MachineLocation.h"
#include "llvm/Metadata.h"
#include "llvm/Pass.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/DebugLoc.h"
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/PseudoSourceValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef LLVM_CODEGEN_PSEUDOSOURCEVALUE_H
#define LLVM_CODEGEN_PSEUDOSOURCEVALUE_H

#include "llvm/Value.h"
#include "llvm/IR/Value.h"

namespace llvm {
class MachineFrameInfo;
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/SelectionDAGISel.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#ifndef LLVM_CODEGEN_SELECTIONDAG_ISEL_H
#define LLVM_CODEGEN_SELECTIONDAG_ISEL_H

#include "llvm/BasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/Pass.h"

namespace llvm {
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/CodeGen/SelectionDAGNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/DebugLoc.h"
#include "llvm/Support/MathExtras.h"
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Argument.h → include/llvm/IR/Argument.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#include "llvm/ADT/Twine.h"
#include "llvm/ADT/ilist_node.h"
#include "llvm/Attributes.h"
#include "llvm/Value.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Value.h"

namespace llvm {

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions include/llvm/BasicBlock.h → include/llvm/IR/BasicBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#include "llvm/ADT/Twine.h"
#include "llvm/ADT/ilist.h"
#include "llvm/Instruction.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/SymbolTableListTraits.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/SymbolTableListTraits.h"

namespace llvm {

Expand Down
7 changes: 7 additions & 0 deletions include/llvm/IR/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Intrinsics.td)

tablegen(LLVM Intrinsics.gen -gen-intrinsic)

add_custom_target(intrinsics_gen ALL
DEPENDS ${llvm_builded_incs_dir}/Intrinsics.gen)
set_target_properties(intrinsics_gen PROPERTIES FOLDER "Tablegenning")
File renamed without changes.
2 changes: 1 addition & 1 deletion include/llvm/Constant.h → include/llvm/IR/Constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef LLVM_CONSTANT_H
#define LLVM_CONSTANT_H

#include "llvm/User.h"
#include "llvm/IR/User.h"

namespace llvm {
class APInt;
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Constants.h → include/llvm/IR/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Constant.h"
#include "llvm/OperandTraits.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/OperandTraits.h"

namespace llvm {

Expand Down
File renamed without changes.
Loading

0 comments on commit 0b8c9a8

Please sign in to comment.