瀏覽代碼

Rename VMCore directory to IR.

Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171359 91177308-0d34-0410-b5e6-96231b3b80d8
Chandler Carruth 12 年之前
父節點
當前提交
c2c50cdcdc
共有 54 個文件被更改,包括 27 次插入27 次删除
  1. 7 7
      lib/Analysis/ConstantFolding.cpp
  2. 1 1
      lib/CMakeLists.txt
  3. 0 0
      lib/IR/AsmWriter.cpp
  4. 0 0
      lib/IR/AttributeImpl.h
  5. 0 0
      lib/IR/Attributes.cpp
  6. 0 0
      lib/IR/AutoUpgrade.cpp
  7. 1 1
      lib/IR/BasicBlock.cpp
  8. 0 0
      lib/IR/CMakeLists.txt
  9. 1 1
      lib/IR/ConstantFold.cpp
  10. 0 0
      lib/IR/ConstantFold.h
  11. 1 1
      lib/IR/Constants.cpp
  12. 0 0
      lib/IR/ConstantsContext.h
  13. 0 0
      lib/IR/Core.cpp
  14. 0 0
      lib/IR/DIBuilder.cpp
  15. 0 0
      lib/IR/DataLayout.cpp
  16. 0 0
      lib/IR/DebugInfo.cpp
  17. 0 0
      lib/IR/DebugLoc.cpp
  18. 0 0
      lib/IR/Dominators.cpp
  19. 1 1
      lib/IR/Function.cpp
  20. 0 0
      lib/IR/GCOV.cpp
  21. 0 0
      lib/IR/GVMaterializer.cpp
  22. 1 1
      lib/IR/Globals.cpp
  23. 0 0
      lib/IR/IRBuilder.cpp
  24. 0 0
      lib/IR/InlineAsm.cpp
  25. 1 1
      lib/IR/Instruction.cpp
  26. 0 0
      lib/IR/Instructions.cpp
  27. 0 0
      lib/IR/IntrinsicInst.cpp
  28. 1 1
      lib/IR/LLVMBuild.txt
  29. 0 0
      lib/IR/LLVMContext.cpp
  30. 0 0
      lib/IR/LLVMContextImpl.cpp
  31. 0 0
      lib/IR/LLVMContextImpl.h
  32. 0 0
      lib/IR/LeakDetector.cpp
  33. 0 0
      lib/IR/LeaksContext.h
  34. 1 1
      lib/IR/Makefile
  35. 0 0
      lib/IR/Metadata.cpp
  36. 1 1
      lib/IR/Module.cpp
  37. 0 0
      lib/IR/Pass.cpp
  38. 0 0
      lib/IR/PassManager.cpp
  39. 0 0
      lib/IR/PassRegistry.cpp
  40. 1 1
      lib/IR/PrintModulePass.cpp
  41. 0 0
      lib/IR/SymbolTableListTraitsImpl.h
  42. 1 1
      lib/IR/TargetTransformInfo.cpp
  43. 1 1
      lib/IR/Type.cpp
  44. 1 1
      lib/IR/TypeFinder.cpp
  45. 0 0
      lib/IR/Use.cpp
  46. 0 0
      lib/IR/User.cpp
  47. 0 0
      lib/IR/Value.cpp
  48. 1 1
      lib/IR/ValueSymbolTable.cpp
  49. 0 0
      lib/IR/ValueTypes.cpp
  50. 0 0
      lib/IR/Verifier.cpp
  51. 1 1
      lib/LLVMBuild.txt
  52. 1 1
      lib/Makefile
  53. 1 1
      utils/GenLibDeps.pl
  54. 2 2
      utils/llvm-build/llvmbuild/main.py

+ 7 - 7
lib/Analysis/ConstantFolding.cpp

@@ -9,9 +9,9 @@
 //
 // This file defines routines for folding instructions into constants.
 //
-// Also, to supplement the basic VMCore ConstantExpr simplifications,
+// Also, to supplement the basic IR ConstantExpr simplifications,
 // this file defines some additional folding routines that can make use of
-// DataLayout information. These functions cannot go in VMCore due to library
+// DataLayout information. These functions cannot go in IR due to library
 // dependency issues.
 //
 //===----------------------------------------------------------------------===//
@@ -68,7 +68,7 @@ static Constant *FoldBitCast(Constant *C, Type *DestTy,
       unsigned FPWidth = SrcEltTy->getPrimitiveSizeInBits();
       Type *SrcIVTy =
         VectorType::get(IntegerType::get(C->getContext(), FPWidth), NumSrcElts);
-      // Ask VMCore to do the conversion now that #elts line up.
+      // Ask IR to do the conversion now that #elts line up.
       C = ConstantExpr::getBitCast(C, SrcIVTy);
       CDV = cast<ConstantDataVector>(C);
     }
@@ -104,7 +104,7 @@ static Constant *FoldBitCast(Constant *C, Type *DestTy,
   if (!isa<ConstantDataVector>(C) && !isa<ConstantVector>(C))
     return ConstantExpr::getBitCast(C, DestTy);
 
-  // If the element types match, VMCore can fold it.
+  // If the element types match, IR can fold it.
   unsigned NumDstElt = DestVTy->getNumElements();
   unsigned NumSrcElt = C->getType()->getVectorNumElements();
   if (NumDstElt == NumSrcElt)
@@ -131,7 +131,7 @@ static Constant *FoldBitCast(Constant *C, Type *DestTy,
     // Recursively handle this integer conversion, if possible.
     C = FoldBitCast(C, DestIVTy, TD);
 
-    // Finally, VMCore can handle this now that #elts line up.
+    // Finally, IR can handle this now that #elts line up.
     return ConstantExpr::getBitCast(C, DestTy);
   }
 
@@ -141,9 +141,9 @@ static Constant *FoldBitCast(Constant *C, Type *DestTy,
     unsigned FPWidth = SrcEltTy->getPrimitiveSizeInBits();
     Type *SrcIVTy =
       VectorType::get(IntegerType::get(C->getContext(), FPWidth), NumSrcElt);
-    // Ask VMCore to do the conversion now that #elts line up.
+    // Ask IR to do the conversion now that #elts line up.
     C = ConstantExpr::getBitCast(C, SrcIVTy);
-    // If VMCore wasn't able to fold it, bail out.
+    // If IR wasn't able to fold it, bail out.
     if (!isa<ConstantVector>(C) &&  // FIXME: Remove ConstantVector.
         !isa<ConstantDataVector>(C))
       return C;

+ 1 - 1
lib/CMakeLists.txt

@@ -1,6 +1,6 @@
 # `Support' and `TableGen' libraries are added on the top-level CMakeLists.txt
 
-add_subdirectory(VMCore)
+add_subdirectory(IR)
 add_subdirectory(CodeGen)
 add_subdirectory(Bitcode)
 add_subdirectory(Transforms)

+ 0 - 0
lib/VMCore/AsmWriter.cpp → lib/IR/AsmWriter.cpp


+ 0 - 0
lib/VMCore/AttributeImpl.h → lib/IR/AttributeImpl.h


+ 0 - 0
lib/VMCore/Attributes.cpp → lib/IR/Attributes.cpp


+ 0 - 0
lib/VMCore/AutoUpgrade.cpp → lib/IR/AutoUpgrade.cpp


+ 1 - 1
lib/VMCore/BasicBlock.cpp → lib/IR/BasicBlock.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the BasicBlock class for the VMCore library.
+// This file implements the BasicBlock class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/CMakeLists.txt → lib/IR/CMakeLists.txt


+ 1 - 1
lib/VMCore/ConstantFold.cpp → lib/IR/ConstantFold.cpp

@@ -13,7 +13,7 @@
 //
 // The current constant folding implementation is implemented in two pieces: the
 // pieces that don't need DataLayout, and the pieces that do. This is to avoid
-// a dependence in VMCore on Target.
+// a dependence in IR on Target.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/ConstantFold.h → lib/IR/ConstantFold.h


+ 1 - 1
lib/VMCore/Constants.cpp → lib/IR/Constants.cpp

@@ -301,7 +301,7 @@ bool Constant::isConstantUsed() const {
 ///     linker will never see them.
 ///  GlobalRelocations: This entry may have arbitrary relocations.
 ///
-/// FIXME: This really should not be in VMCore.
+/// FIXME: This really should not be in IR.
 Constant::PossibleRelocationsTy Constant::getRelocationInfo() const {
   if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
     if (GV->hasLocalLinkage() || GV->hasHiddenVisibility())

+ 0 - 0
lib/VMCore/ConstantsContext.h → lib/IR/ConstantsContext.h


+ 0 - 0
lib/VMCore/Core.cpp → lib/IR/Core.cpp


+ 0 - 0
lib/VMCore/DIBuilder.cpp → lib/IR/DIBuilder.cpp


+ 0 - 0
lib/VMCore/DataLayout.cpp → lib/IR/DataLayout.cpp


+ 0 - 0
lib/VMCore/DebugInfo.cpp → lib/IR/DebugInfo.cpp


+ 0 - 0
lib/VMCore/DebugLoc.cpp → lib/IR/DebugLoc.cpp


+ 0 - 0
lib/VMCore/Dominators.cpp → lib/IR/Dominators.cpp


+ 1 - 1
lib/VMCore/Function.cpp → lib/IR/Function.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the Function class for the VMCore library.
+// This file implements the Function class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/GCOV.cpp → lib/IR/GCOV.cpp


+ 0 - 0
lib/VMCore/GVMaterializer.cpp → lib/IR/GVMaterializer.cpp


+ 1 - 1
lib/VMCore/Globals.cpp → lib/IR/Globals.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the GlobalValue & GlobalVariable classes for the VMCore
+// This file implements the GlobalValue & GlobalVariable classes for the IR
 // library.
 //
 //===----------------------------------------------------------------------===//

+ 0 - 0
lib/VMCore/IRBuilder.cpp → lib/IR/IRBuilder.cpp


+ 0 - 0
lib/VMCore/InlineAsm.cpp → lib/IR/InlineAsm.cpp


+ 1 - 1
lib/VMCore/Instruction.cpp → lib/IR/Instruction.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the Instruction class for the VMCore library.
+// This file implements the Instruction class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/Instructions.cpp → lib/IR/Instructions.cpp


+ 0 - 0
lib/VMCore/IntrinsicInst.cpp → lib/IR/IntrinsicInst.cpp


+ 1 - 1
lib/VMCore/LLVMBuild.txt → lib/IR/LLVMBuild.txt

@@ -1,4 +1,4 @@
-;===- ./lib/VMCore/LLVMBuild.txt -------------------------------*- Conf -*--===;
+;===- ./lib/IR/LLVMBuild.txt -----------------------------------*- Conf -*--===;
 ;
 ;                     The LLVM Compiler Infrastructure
 ;

+ 0 - 0
lib/VMCore/LLVMContext.cpp → lib/IR/LLVMContext.cpp


+ 0 - 0
lib/VMCore/LLVMContextImpl.cpp → lib/IR/LLVMContextImpl.cpp


+ 0 - 0
lib/VMCore/LLVMContextImpl.h → lib/IR/LLVMContextImpl.h


+ 0 - 0
lib/VMCore/LeakDetector.cpp → lib/IR/LeakDetector.cpp


+ 0 - 0
lib/VMCore/LeaksContext.h → lib/IR/LeaksContext.h


+ 1 - 1
lib/VMCore/Makefile → lib/IR/Makefile

@@ -1,4 +1,4 @@
-##===- lib/VMCore/Makefile ---------------------------------*- Makefile -*-===##
+##===- lib/IR/Makefile -------------------------------------*- Makefile -*-===##
 #
 #                     The LLVM Compiler Infrastructure
 #

+ 0 - 0
lib/VMCore/Metadata.cpp → lib/IR/Metadata.cpp


+ 1 - 1
lib/VMCore/Module.cpp → lib/IR/Module.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the Module class for the VMCore library.
+// This file implements the Module class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/Pass.cpp → lib/IR/Pass.cpp


+ 0 - 0
lib/VMCore/PassManager.cpp → lib/IR/PassManager.cpp


+ 0 - 0
lib/VMCore/PassRegistry.cpp → lib/IR/PassRegistry.cpp


+ 1 - 1
lib/VMCore/PrintModulePass.cpp → lib/IR/PrintModulePass.cpp

@@ -1,4 +1,4 @@
-//===--- VMCore/PrintModulePass.cpp - Module/Function Printer -------------===//
+//===--- IR/PrintModulePass.cpp - Module/Function Printer -----------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //

+ 0 - 0
lib/VMCore/SymbolTableListTraitsImpl.h → lib/IR/SymbolTableListTraitsImpl.h


+ 1 - 1
lib/VMCore/TargetTransformInfo.cpp → lib/IR/TargetTransformInfo.cpp

@@ -1,4 +1,4 @@
-//===- llvm/VMCore/TargetTransformInfo.cpp ----------------------*- C++ -*-===//
+//===- llvm/IR/TargetTransformInfo.cpp --------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //

+ 1 - 1
lib/VMCore/Type.cpp → lib/IR/Type.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the Type class for the VMCore library.
+// This file implements the Type class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 1 - 1
lib/VMCore/TypeFinder.cpp → lib/IR/TypeFinder.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the TypeFinder class for the VMCore library.
+// This file implements the TypeFinder class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/Use.cpp → lib/IR/Use.cpp


+ 0 - 0
lib/VMCore/User.cpp → lib/IR/User.cpp


+ 0 - 0
lib/VMCore/Value.cpp → lib/IR/Value.cpp


+ 1 - 1
lib/VMCore/ValueSymbolTable.cpp → lib/IR/ValueSymbolTable.cpp

@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the ValueSymbolTable class for the VMCore library.
+// This file implements the ValueSymbolTable class for the IR library.
 //
 //===----------------------------------------------------------------------===//
 

+ 0 - 0
lib/VMCore/ValueTypes.cpp → lib/IR/ValueTypes.cpp


+ 0 - 0
lib/VMCore/Verifier.cpp → lib/IR/Verifier.cpp


+ 1 - 1
lib/LLVMBuild.txt

@@ -16,7 +16,7 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = Analysis Archive AsmParser Bitcode CodeGen DebugInfo ExecutionEngine Linker MC Object Option Support TableGen Target Transforms VMCore
+subdirectories = Analysis Archive AsmParser Bitcode CodeGen DebugInfo ExecutionEngine Linker IR MC Object Option Support TableGen Target Transforms
 
 [component_0]
 type = Group

+ 1 - 1
lib/Makefile

@@ -10,7 +10,7 @@ LEVEL = ..
 
 include $(LEVEL)/Makefile.config
 
-PARALLEL_DIRS := VMCore AsmParser Bitcode Archive Analysis Transforms CodeGen \
+PARALLEL_DIRS := IR AsmParser Bitcode Archive Analysis Transforms CodeGen \
                 Target ExecutionEngine Linker MC Object Option DebugInfo
 
 include $(LEVEL)/Makefile.common

+ 1 - 1
utils/GenLibDeps.pl

@@ -98,7 +98,7 @@ if ($PEROBJ) {
     $libpath =~ s/^BitWriter/Bitcode\/Writer/;
     $libpath =~ s/^CppBackend/Target\/CppBackend/;
     $libpath =~ s/^MSIL/Target\/MSIL/;
-    $libpath =~ s/^Core/VMCore/;
+    $libpath =~ s/^Core/IR/;
     $libpath =~ s/^Instrumentation/Transforms\/Instrumentation/;
     $libpath =~ s/^Interpreter/ExecutionEngine\/Interpreter/;
     $libpath =~ s/^JIT/ExecutionEngine\/JIT/;

+ 2 - 2
utils/llvm-build/llvmbuild/main.py

@@ -809,7 +809,7 @@ given by --build-root) at the same SUBPATH""",
     # Determine the LLVM source path, if not given.
     source_root = opts.source_root
     if source_root:
-        if not os.path.exists(os.path.join(source_root, 'lib', 'VMCore',
+        if not os.path.exists(os.path.join(source_root, 'lib', 'IR',
                                            'Function.cpp')):
             parser.error('invalid LLVM source root: %r' % source_root)
     else:
@@ -817,7 +817,7 @@ given by --build-root) at the same SUBPATH""",
         llvm_build_path = os.path.dirname(llvmbuild_path)
         utils_path = os.path.dirname(llvm_build_path)
         source_root = os.path.dirname(utils_path)
-        if not os.path.exists(os.path.join(source_root, 'lib', 'VMCore',
+        if not os.path.exists(os.path.join(source_root, 'lib', 'IR',
                                            'Function.cpp')):
             parser.error('unable to infer LLVM source root, please specify')