[llvm] r203069 - [Layering] Move GVMaterializer.h into the IR library where its

Chandler Carruth chandlerc at gmail.com
Wed Mar 5 19:50:29 PST 2014


Author: chandlerc
Date: Wed Mar  5 21:50:29 2014
New Revision: 203069

URL: http://llvm.org/viewvc/llvm-project?rev=203069&view=rev
Log:
[Layering] Move GVMaterializer.h into the IR library where its
implementation already lived.

After this commit, the only IR-library headers in include/llvm/* are
ones related to the legacy pass infrastructure that I'm planning to
leave there until the new one is farther along.

The only other headers at the top level are linking and initialization
aids that aren't really libraries but just headers.

Added:
    llvm/trunk/include/llvm/IR/GVMaterializer.h
      - copied, changed from r203066, llvm/trunk/include/llvm/GVMaterializer.h
Removed:
    llvm/trunk/include/llvm/GVMaterializer.h
Modified:
    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
    llvm/trunk/lib/IR/GVMaterializer.cpp
    llvm/trunk/lib/IR/Module.cpp

Removed: llvm/trunk/include/llvm/GVMaterializer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GVMaterializer.h?rev=203068&view=auto
==============================================================================
--- llvm/trunk/include/llvm/GVMaterializer.h (original)
+++ llvm/trunk/include/llvm/GVMaterializer.h (removed)
@@ -1,62 +0,0 @@
-//===-- llvm/GVMaterializer.h - Interface for GV materializers --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file provides an abstract interface for loading a module from some
-// place.  This interface allows incremental or random access loading of
-// functions from the file.  This is useful for applications like JIT compilers
-// or interprocedural optimizers that do not need the entire program in memory
-// at the same time.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_GVMATERIALIZER_H
-#define LLVM_GVMATERIALIZER_H
-
-#include "llvm/Support/system_error.h"
-
-namespace llvm {
-
-class Function;
-class GlobalValue;
-class Module;
-
-class GVMaterializer {
-protected:
-  GVMaterializer() {}
-
-public:
-  virtual ~GVMaterializer();
-
-  /// isMaterializable - True if GV can be materialized from whatever backing
-  /// store this GVMaterializer uses and has not been materialized yet.
-  virtual bool isMaterializable(const GlobalValue *GV) const = 0;
-
-  /// isDematerializable - True if GV has been materialized and can be
-  /// dematerialized back to whatever backing store this GVMaterializer uses.
-  virtual bool isDematerializable(const GlobalValue *GV) const = 0;
-
-  /// Materialize - make sure the given GlobalValue is fully read.
-  ///
-  virtual error_code Materialize(GlobalValue *GV) = 0;
-
-  /// Dematerialize - If the given GlobalValue is read in, and if the
-  /// GVMaterializer supports it, release the memory for the GV, and set it up
-  /// to be materialized lazily.  If the Materializer doesn't support this
-  /// capability, this method is a noop.
-  ///
-  virtual void Dematerialize(GlobalValue *) {}
-
-  /// MaterializeModule - make sure the entire Module has been completely read.
-  ///
-  virtual error_code MaterializeModule(Module *M) = 0;
-};
-
-} // End llvm namespace
-
-#endif

Copied: llvm/trunk/include/llvm/IR/GVMaterializer.h (from r203066, llvm/trunk/include/llvm/GVMaterializer.h)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GVMaterializer.h?p2=llvm/trunk/include/llvm/IR/GVMaterializer.h&p1=llvm/trunk/include/llvm/GVMaterializer.h&r1=203066&r2=203069&rev=203069&view=diff
==============================================================================
--- llvm/trunk/include/llvm/GVMaterializer.h (original)
+++ llvm/trunk/include/llvm/IR/GVMaterializer.h Wed Mar  5 21:50:29 2014
@@ -1,4 +1,4 @@
-//===-- llvm/GVMaterializer.h - Interface for GV materializers --*- C++ -*-===//
+//===- GVMaterializer.h - Interface for GV materializers --------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -15,8 +15,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_GVMATERIALIZER_H
-#define LLVM_GVMATERIALIZER_H
+#ifndef LLVM_IR_GVMATERIALIZER_H
+#define LLVM_IR_GVMATERIALIZER_H
 
 #include "llvm/Support/system_error.h"
 

Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h?rev=203069&r1=203068&r2=203069&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h Wed Mar  5 21:50:29 2014
@@ -17,8 +17,8 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/Bitcode/BitstreamReader.h"
 #include "llvm/Bitcode/LLVMBitCodes.h"
-#include "llvm/GVMaterializer.h"
 #include "llvm/IR/Attributes.h"
+#include "llvm/IR/GVMaterializer.h"
 #include "llvm/IR/OperandTraits.h"
 #include "llvm/IR/Type.h"
 #include "llvm/IR/ValueHandle.h"

Modified: llvm/trunk/lib/IR/GVMaterializer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/GVMaterializer.cpp?rev=203069&r1=203068&r2=203069&view=diff
==============================================================================
--- llvm/trunk/lib/IR/GVMaterializer.cpp (original)
+++ llvm/trunk/lib/IR/GVMaterializer.cpp Wed Mar  5 21:50:29 2014
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/GVMaterializer.h"
+#include "llvm/IR/GVMaterializer.h"
 using namespace llvm;
 
 GVMaterializer::~GVMaterializer() {}

Modified: llvm/trunk/lib/IR/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Module.cpp?rev=203069&r1=203068&r2=203069&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Module.cpp (original)
+++ llvm/trunk/lib/IR/Module.cpp Wed Mar  5 21:50:29 2014
@@ -17,9 +17,9 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
-#include "llvm/GVMaterializer.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/GVMaterializer.h"
 #include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/LeakDetector.h"





More information about the llvm-commits mailing list