r246680 - [modules] Don't waste time reading in the names the module file writer gave to blocks. We don't need these names, and decoding the corresponding bitcode has a significant cost.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 10:45:55 PDT 2015


Author: rsmith
Date: Wed Sep  2 12:45:54 2015
New Revision: 246680

URL: http://llvm.org/viewvc/llvm-project?rev=246680&view=rev
Log:
[modules] Don't waste time reading in the names the module file writer gave to blocks. We don't need these names, and decoding the corresponding bitcode has a significant cost.

Modified:
    cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=246680&r1=246679&r2=246680&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Sep  2 12:45:54 2015
@@ -3710,14 +3710,7 @@ ASTReader::ReadASTCore(StringRef FileNam
       break;
     }
 
-    // We only know the control subblock ID.
     switch (Entry.ID) {
-    case llvm::bitc::BLOCKINFO_BLOCK_ID:
-      if (Stream.ReadBlockInfoBlock()) {
-        Error("malformed BlockInfoBlock in AST file");
-        return Failure;
-      }
-      break;
     case CONTROL_BLOCK_ID:
       HaveReadControlBlock = true;
       switch (ReadControlBlock(F, Loaded, ImportedBy, ClientLoadCapabilities)) {
@@ -3744,6 +3737,7 @@ ASTReader::ReadASTCore(StringRef FileNam
       case HadErrors: return HadErrors;
       }
       break;
+
     case AST_BLOCK_ID:
       if (!HaveReadControlBlock) {
         if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)




More information about the cfe-commits mailing list