[llvm] r199041 - [PM] Rename the IR printing pass header to a more generic and correct

Chandler Carruth chandlerc at gmail.com
Sun Jan 12 03:10:33 PST 2014


Author: chandlerc
Date: Sun Jan 12 05:10:32 2014
New Revision: 199041

URL: http://llvm.org/viewvc/llvm-project?rev=199041&view=rev
Log:
[PM] Rename the IR printing pass header to a more generic and correct
name to match the source file which I got earlier. Update the include
sites. Also modernize the comments in the header to use the more
recommended doxygen style.

Added:
    llvm/trunk/include/llvm/IR/IRPrintingPasses.h
      - copied, changed from r199040, llvm/trunk/include/llvm/IR/PrintModulePass.h
Removed:
    llvm/trunk/include/llvm/IR/PrintModulePass.h
Modified:
    llvm/trunk/include/llvm/LinkAllPasses.h
    llvm/trunk/lib/Analysis/LoopPass.cpp
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
    llvm/trunk/lib/CodeGen/Passes.cpp
    llvm/trunk/lib/IR/AsmWriter.cpp
    llvm/trunk/lib/IR/IRPrintingPasses.cpp
    llvm/trunk/lib/IR/LegacyPassManager.cpp
    llvm/trunk/lib/IR/Pass.cpp
    llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
    llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
    llvm/trunk/tools/llc/llc.cpp
    llvm/trunk/tools/llvm-extract/llvm-extract.cpp
    llvm/trunk/tools/llvm-stress/llvm-stress.cpp
    llvm/trunk/tools/opt/opt.cpp
    llvm/trunk/unittests/IR/LegacyPassManagerTest.cpp

Copied: llvm/trunk/include/llvm/IR/IRPrintingPasses.h (from r199040, llvm/trunk/include/llvm/IR/PrintModulePass.h)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRPrintingPasses.h?p2=llvm/trunk/include/llvm/IR/IRPrintingPasses.h&p1=llvm/trunk/include/llvm/IR/PrintModulePass.h&r1=199040&r2=199041&rev=199041&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/PrintModulePass.h (original)
+++ llvm/trunk/include/llvm/IR/IRPrintingPasses.h Sun Jan 12 05:10:32 2014
@@ -1,4 +1,4 @@
-//===- PrintModulePass.h - IR Printing Passes -------------------*- C++ -*-===//
+//===- IRPrintingPasses.h - Passes to print out IR constructs ---*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -6,13 +6,14 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// This file defines two passes to print out a module.  The PrintModulePass pass
-// simply prints out the entire module when it is executed.  The
-// PrintFunctionPass class is designed to be pipelined with other
-// FunctionPass's, and prints out the functions of the module as they are
-// processed.
-//
+/// \file
+///
+/// This file defines passes to print out IR in various granularities. The
+/// PrintModulePass pass simply prints out the entire module when it is
+/// executed. The PrintFunctionPass class is designed to be pipelined with
+/// other FunctionPass's, and prints out the functions of the module as they
+/// are processed.
+///
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_IR_PRINTMODULEPASS_H
@@ -26,19 +27,19 @@ class ModulePass;
 class BasicBlockPass;
 class raw_ostream;
 
-/// createPrintModulePass - Create and return a pass that writes the
-/// module to the specified raw_ostream.
+/// \brief Create and return a pass that writes the module to the specified
+/// \c raw_ostream.
 ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream = false,
                                   const std::string &Banner = "");
 
-/// createPrintFunctionPass - Create and return a pass that prints
-/// functions to the specified raw_ostream as they are processed.
+/// \brief Create and return a pass that prints functions to the specified
+/// \c raw_ostream as they are processed.
 FunctionPass *createPrintFunctionPass(const std::string &Banner,
                                       raw_ostream *OS,
                                       bool DeleteStream = false);
 
-/// createPrintBasicBlockPass - Create and return a pass that writes the
-/// BB to the specified raw_ostream.
+/// \brief Create and return a pass that writes the BB to the specified
+/// \c raw_ostream.
 BasicBlockPass *createPrintBasicBlockPass(raw_ostream *OS,
                                           bool DeleteStream = false,
                                           const std::string &Banner = "");

Removed: llvm/trunk/include/llvm/IR/PrintModulePass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/PrintModulePass.h?rev=199040&view=auto
==============================================================================
--- llvm/trunk/include/llvm/IR/PrintModulePass.h (original)
+++ llvm/trunk/include/llvm/IR/PrintModulePass.h (removed)
@@ -1,48 +0,0 @@
-//===- PrintModulePass.h - IR Printing Passes -------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines two passes to print out a module.  The PrintModulePass pass
-// simply prints out the entire module when it is executed.  The
-// PrintFunctionPass class is designed to be pipelined with other
-// FunctionPass's, and prints out the functions of the module as they are
-// processed.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_IR_PRINTMODULEPASS_H
-#define LLVM_IR_PRINTMODULEPASS_H
-
-#include <string>
-
-namespace llvm {
-class FunctionPass;
-class ModulePass;
-class BasicBlockPass;
-class raw_ostream;
-
-/// createPrintModulePass - Create and return a pass that writes the
-/// module to the specified raw_ostream.
-ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream = false,
-                                  const std::string &Banner = "");
-
-/// createPrintFunctionPass - Create and return a pass that prints
-/// functions to the specified raw_ostream as they are processed.
-FunctionPass *createPrintFunctionPass(const std::string &Banner,
-                                      raw_ostream *OS,
-                                      bool DeleteStream = false);
-
-/// createPrintBasicBlockPass - Create and return a pass that writes the
-/// BB to the specified raw_ostream.
-BasicBlockPass *createPrintBasicBlockPass(raw_ostream *OS,
-                                          bool DeleteStream = false,
-                                          const std::string &Banner = "");
-
-} // End llvm namespace
-
-#endif

Modified: llvm/trunk/include/llvm/LinkAllPasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LinkAllPasses.h (original)
+++ llvm/trunk/include/llvm/LinkAllPasses.h Sun Jan 12 05:10:32 2014
@@ -28,7 +28,7 @@
 #include "llvm/Analysis/ScalarEvolution.h"
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/IR/Function.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Transforms/Instrumentation.h"
 #include "llvm/Transforms/ObjCARC.h"

Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Sun Jan 12 05:10:32 2014
@@ -14,7 +14,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Analysis/LoopPass.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Timer.h"
 using namespace llvm;

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Sun Jan 12 05:10:32 2014
@@ -17,7 +17,7 @@
 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
 #include "llvm/CodeGen/Passes.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCInstrInfo.h"

Modified: llvm/trunk/lib/CodeGen/Passes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Passes.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Passes.cpp (original)
+++ llvm/trunk/lib/CodeGen/Passes.cpp Sun Jan 12 05:10:32 2014
@@ -18,7 +18,7 @@
 #include "llvm/CodeGen/GCStrategy.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/RegAllocRegistry.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/PassManager.h"
 #include "llvm/Support/CommandLine.h"

Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Sun Jan 12 05:10:32 2014
@@ -24,12 +24,12 @@
 #include "llvm/IR/CallingConv.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/Operator.h"
-#include "llvm/IR/PrintModulePass.h"
 #include "llvm/IR/TypeFinder.h"
 #include "llvm/IR/ValueSymbolTable.h"
 #include "llvm/Support/CFG.h"

Modified: llvm/trunk/lib/IR/IRPrintingPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/IRPrintingPasses.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/IR/IRPrintingPasses.cpp (original)
+++ llvm/trunk/lib/IR/IRPrintingPasses.cpp Sun Jan 12 05:10:32 2014
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Pass.h"

Modified: llvm/trunk/lib/IR/LegacyPassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LegacyPassManager.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LegacyPassManager.cpp (original)
+++ llvm/trunk/lib/IR/LegacyPassManager.cpp Sun Jan 12 05:10:32 2014
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/LegacyPassManager.h"
 #include "llvm/IR/LegacyPassManagers.h"
 #include "llvm/IR/Module.h"

Modified: llvm/trunk/lib/IR/Pass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Pass.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Pass.cpp (original)
+++ llvm/trunk/lib/IR/Pass.cpp Sun Jan 12 05:10:32 2014
@@ -14,7 +14,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Pass.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/PassRegistry.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/PassNameParser.h"

Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Sun Jan 12 05:10:32 2014
@@ -1924,11 +1924,11 @@ void CppWriter::printProgram(const std::
   Out << "#include <llvm/IR/DerivedTypes.h>\n";
   Out << "#include <llvm/IR/Function.h>\n";
   Out << "#include <llvm/IR/GlobalVariable.h>\n";
+  Out << "#include <llvm/IR/IRPrintingPasses.h>\n";
   Out << "#include <llvm/IR/InlineAsm.h>\n";
   Out << "#include <llvm/IR/Instructions.h>\n";
   Out << "#include <llvm/IR/LLVMContext.h>\n";
   Out << "#include <llvm/IR/Module.h>\n";
-  Out << "#include <llvm/IR/PrintModulePass.h>\n";
   Out << "#include <llvm/Support/FormattedStream.h>\n";
   Out << "#include <llvm/Support/MathExtras.h>\n";
   Out << "#include <algorithm>\n";

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp Sun Jan 12 05:10:32 2014
@@ -25,7 +25,7 @@
 #include "llvm/CodeGen/MachineModuleInfo.h"
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/IR/DataLayout.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCStreamer.h"

Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Sun Jan 12 05:10:32 2014
@@ -14,9 +14,9 @@
 //===----------------------------------------------------------------------===//
 
 
-#include "llvm/IR/LLVMContext.h"
 #include "llvm/ADT/Triple.h"
-#include "llvm/IR/PrintModulePass.h"
+#include "llvm/IR/IRPrintingPasses.h"
+#include "llvm/IR/LLVMContext.h"
 #include "llvm/CodeGen/CommandFlags.h"
 #include "llvm/CodeGen/LinkAllAsmWriterComponents.h"
 #include "llvm/CodeGen/LinkAllCodegenComponents.h"

Modified: llvm/trunk/tools/llvm-extract/llvm-extract.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-extract/llvm-extract.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-extract/llvm-extract.cpp (original)
+++ llvm/trunk/tools/llvm-extract/llvm-extract.cpp Sun Jan 12 05:10:32 2014
@@ -12,12 +12,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/IR/LLVMContext.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/IR/PrintModulePass.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/IRPrintingPasses.h"
+#include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IRReader/IRReader.h"
 #include "llvm/PassManager.h"

Modified: llvm/trunk/tools/llvm-stress/llvm-stress.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-stress/llvm-stress.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-stress/llvm-stress.cpp (original)
+++ llvm/trunk/tools/llvm-stress/llvm-stress.cpp Sun Jan 12 05:10:32 2014
@@ -11,13 +11,13 @@
 // different components in LLVM.
 //
 //===----------------------------------------------------------------------===//
-#include "llvm/IR/LLVMContext.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/Analysis/CallGraphSCCPass.h"
 #include "llvm/Analysis/Verifier.h"
-#include "llvm/IR/PrintModulePass.h"
 #include "llvm/IR/Constants.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/Instruction.h"
+#include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/Support/Debug.h"

Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Sun Jan 12 05:10:32 2014
@@ -24,9 +24,9 @@
 #include "llvm/CodeGen/CommandFlags.h"
 #include "llvm/DebugInfo.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
-#include "llvm/IR/PrintModulePass.h"
 #include "llvm/IRReader/IRReader.h"
 #include "llvm/LinkAllIR.h"
 #include "llvm/LinkAllPasses.h"

Modified: llvm/trunk/unittests/IR/LegacyPassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/LegacyPassManagerTest.cpp?rev=199041&r1=199040&r2=199041&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/LegacyPassManagerTest.cpp (original)
+++ llvm/trunk/unittests/IR/LegacyPassManagerTest.cpp Sun Jan 12 05:10:32 2014
@@ -27,11 +27,11 @@
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
-#include "llvm/IR/PrintModulePass.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"





More information about the llvm-commits mailing list