[llvm] r237730 - Revert r237708 (MIR serialization) - incremental buildbots became unstable.

Alex Lorenz arphaman at gmail.com
Tue May 19 14:41:29 PDT 2015


Author: arphaman
Date: Tue May 19 16:41:28 2015
New Revision: 237730

URL: http://llvm.org/viewvc/llvm-project?rev=237730&view=rev
Log:
Revert r237708 (MIR serialization) - incremental buildbots became unstable.

The incremental buildbots entered a pass-fail cycle where during the fail
cycle one of the tests from this commit fails for an unknown reason. I
have reverted this commit and will investigate the cause of this problem.

Removed:
    llvm/trunk/include/llvm/CodeGen/MIR/
    llvm/trunk/lib/CodeGen/MIR/
    llvm/trunk/test/CodeGen/MIR/
Modified:
    llvm/trunk/include/llvm/CodeGen/Passes.h
    llvm/trunk/include/llvm/InitializePasses.h
    llvm/trunk/include/llvm/Support/YAMLTraits.h
    llvm/trunk/lib/CodeGen/CMakeLists.txt
    llvm/trunk/lib/CodeGen/LLVMBuild.txt
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
    llvm/trunk/lib/CodeGen/Makefile
    llvm/trunk/lib/Support/YAMLTraits.cpp
    llvm/trunk/test/CodeGen/Generic/stop-after.ll
    llvm/trunk/tools/llc/llc.cpp

Modified: llvm/trunk/include/llvm/CodeGen/Passes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/Passes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/Passes.h Tue May 19 16:41:28 2015
@@ -374,10 +374,6 @@ namespace llvm {
   createMachineFunctionPrinterPass(raw_ostream &OS,
                                    const std::string &Banner ="");
 
-  /// MIRPrinting pass - this pass prints out the LLVM IR into the given stream
-  /// using the MIR serialization format.
-  MachineFunctionPass *createPrintMIRPass(raw_ostream &OS);
-
   /// createCodeGenPreparePass - Transform the code to expose more pattern
   /// matching during instruction selection.
   FunctionPass *createCodeGenPreparePass(const TargetMachine *TM = nullptr);
@@ -492,10 +488,6 @@ namespace llvm {
   /// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
   extern char &MachineFunctionPrinterPassID;
 
-  /// MIRPrintingPass - this pass prints out the LLVM IR using the MIR
-  /// serialization format.
-  extern char &MIRPrintingPassID;
-
   /// TailDuplicate - Duplicate blocks with unconditional branches
   /// into tails of their predecessors.
   extern char &TailDuplicateID;

Modified: llvm/trunk/include/llvm/InitializePasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InitializePasses.h (original)
+++ llvm/trunk/include/llvm/InitializePasses.h Tue May 19 16:41:28 2015
@@ -289,7 +289,6 @@ void initializeLoopVectorizePass(PassReg
 void initializeSLPVectorizerPass(PassRegistry&);
 void initializeBBVectorizePass(PassRegistry&);
 void initializeMachineFunctionPrinterPassPass(PassRegistry&);
-void initializeMIRPrintingPassPass(PassRegistry&);
 void initializeStackMapLivenessPass(PassRegistry&);
 void initializeMachineCombinerPass(PassRegistry &);
 void initializeLoadCombinePass(PassRegistry&);

Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Tue May 19 16:41:28 2015
@@ -1090,9 +1090,6 @@ public:
   bool setCurrentDocument();
   bool nextDocument();
 
-  /// Returns the current node that's being parsed by the YAML Parser.
-  const Node *getCurrentNode() const;
-
 private:
   llvm::SourceMgr                     SrcMgr; // must be before Strm
   std::unique_ptr<llvm::yaml::Stream> Strm;

Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/CMakeLists.txt Tue May 19 16:41:28 2015
@@ -128,4 +128,3 @@ add_dependencies(LLVMCodeGen intrinsics_
 
 add_subdirectory(SelectionDAG)
 add_subdirectory(AsmPrinter)
-add_subdirectory(MIR)

Modified: llvm/trunk/lib/CodeGen/LLVMBuild.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMBuild.txt?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMBuild.txt (original)
+++ llvm/trunk/lib/CodeGen/LLVMBuild.txt Tue May 19 16:41:28 2015
@@ -16,10 +16,10 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = AsmPrinter SelectionDAG MIR
+subdirectories = AsmPrinter SelectionDAG
 
 [component_0]
 type = Library
 name = CodeGen
 parent = Libraries
-required_libraries = Analysis Core MC Scalar Support Target TransformUtils MIR
+required_libraries = Analysis Core MC Scalar Support Target TransformUtils

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue May 19 16:41:28 2015
@@ -150,7 +150,12 @@ bool LLVMTargetMachine::addPassesToEmitF
     return true;
 
   if (StopAfter) {
-    PM.add(createPrintMIRPass(outs()));
+    // FIXME: The intent is that this should eventually write out a YAML file,
+    // containing the LLVM IR, the machine-level IR (when stopping after a
+    // machine-level pass), and whatever other information is needed to
+    // deserialize the code and resume compilation.  For now, just write the
+    // LLVM IR.
+    PM.add(createPrintModulePass(Out));
     return false;
   }
 

Modified: llvm/trunk/lib/CodeGen/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Makefile?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Makefile (original)
+++ llvm/trunk/lib/CodeGen/Makefile Tue May 19 16:41:28 2015
@@ -9,7 +9,7 @@
 
 LEVEL = ../..
 LIBRARYNAME = LLVMCodeGen
-PARALLEL_DIRS = SelectionDAG AsmPrinter MIR
+PARALLEL_DIRS = SelectionDAG AsmPrinter
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common

Modified: llvm/trunk/lib/Support/YAMLTraits.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLTraits.cpp?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/lib/Support/YAMLTraits.cpp (original)
+++ llvm/trunk/lib/Support/YAMLTraits.cpp Tue May 19 16:41:28 2015
@@ -97,10 +97,6 @@ bool Input::nextDocument() {
   return ++DocIterator != Strm->end();
 }
 
-const Node *Input::getCurrentNode() const {
-  return CurrentNode ? CurrentNode->_node : nullptr;
-}
-
 bool Input::mapTag(StringRef Tag, bool Default) {
   std::string foundTag = CurrentNode->_node->getVerbatimTag();
   if (foundTag.empty()) {

Modified: llvm/trunk/test/CodeGen/Generic/stop-after.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/stop-after.ll?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/stop-after.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/stop-after.ll Tue May 19 16:41:28 2015
@@ -1,10 +1,9 @@
 ; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP
 ; RUN: llc < %s -debug-pass=Structure -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START
 
-; STOP: -loop-reduce
+; STOP: -loop-reduce -print-module
 ; STOP: Loop Strength Reduction
 ; STOP-NEXT: Machine Function Analysis
-; STOP-NEXT: MIR Printing Pass
 
 ; START: -machine-branch-prob -gc-lowering
 ; START: FunctionPass Manager

Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=237730&r1=237729&r2=237730&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Tue May 19 16:41:28 2015
@@ -20,7 +20,6 @@
 #include "llvm/CodeGen/CommandFlags.h"
 #include "llvm/CodeGen/LinkAllAsmWriterComponents.h"
 #include "llvm/CodeGen/LinkAllCodegenComponents.h"
-#include "llvm/CodeGen/MIR/MIRParser.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/IR/LLVMContext.h"
@@ -110,8 +109,6 @@ GetOutputStream(const char *TargetName,
       StringRef IFN = InputFilename;
       if (IFN.endswith(".bc") || IFN.endswith(".ll"))
         OutputFilename = IFN.drop_back(3);
-      else if (IFN.endswith(".mir"))
-        OutputFilename = IFN.drop_back(4);
       else
         OutputFilename = IFN;
 
@@ -217,10 +214,7 @@ static int compileModule(char **argv, LL
 
   // If user just wants to list available options, skip module loading
   if (!SkipModule) {
-    if (StringRef(InputFilename).endswith_lower(".mir"))
-      M = parseMIRFile(InputFilename, Err, Context);
-    else
-      M = parseIRFile(InputFilename, Err, Context);
+    M = parseIRFile(InputFilename, Err, Context);
     if (!M) {
       Err.print(argv[0], errs());
       return 1;





More information about the llvm-commits mailing list