As mentioned on https://discourse.llvm.org/t/issues-in-llvm-tblgen-high-parallelized-build/68037, ItaniumManglingCanonicalizer is often slow to build, resulting in a bottleneck for distributed builds while waiting for LLVMSupport to complete.
SymbolRemappingReader is the only current user of ItaniumManglingCanonicalizer, and this is only used by ProfileData and llvm-cxxmap - so I propose we move both files into the ProfileData library.
Differential Revision: https://reviews.llvm.org/D143318
llvm/include/llvm/ProfileData/GCOV.h
llvm/include/llvm/ProfileData/InstrProfCorrelator.h
llvm/include/llvm/ProfileData/InstrProfWriter.h
+llvm/include/llvm/ProfileData/ItaniumManglingCanonicalizer.h
llvm/include/llvm/ProfileData/ProfileCommon.h
llvm/include/llvm/ProfileData/RawMemProfReader.h
+llvm/include/llvm/ProfileData/SymbolRemappingReader.h
llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
llvm/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h
llvm/include/llvm/Remarks/BitstreamRemarkContainer.h
llvm/include/llvm/Support/HashBuilder.h
llvm/include/llvm/Support/InitLLVM.h
llvm/include/llvm/Support/InstructionCost.h
-llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h
llvm/include/llvm/Support/MD5.h
llvm/include/llvm/Support/MemAlloc.h
llvm/include/llvm/Support/MemoryBufferRef.h
llvm/include/llvm/Support/SMTAPI.h
llvm/include/llvm/Support/SourceMgr.h
llvm/include/llvm/Support/SuffixTree.h
-llvm/include/llvm/Support/SymbolRemappingReader.h
llvm/include/llvm/Support/SystemUtils.h
llvm/include/llvm/TargetParser/TargetParser.h
llvm/include/llvm/Support/TrailingObjects.h
llvm/unittests/Passes/TestPlugin.h
llvm/unittests/ProfileData/InstrProfDataTest.cpp
llvm/unittests/ProfileData/MemProfTest.cpp
+llvm/unittests/ProfileData/SymbolRemappingReaderTest.cpp
llvm/unittests/Remarks/BitstreamRemarksFormatTest.cpp
llvm/unittests/Remarks/BitstreamRemarksParsingTest.cpp
llvm/unittests/Remarks/RemarksLinkingTest.cpp
llvm/unittests/Support/ScopedPrinterTest.cpp
llvm/unittests/Support/SHA256.cpp
llvm/unittests/Support/SuffixTreeTest.cpp
-llvm/unittests/Support/SymbolRemappingReaderTest.cpp
llvm/unittests/Support/TarWriterTest.cpp
llvm/unittests/Support/ToolOutputFileTest.cpp
llvm/unittests/Support/TypeTraitsTest.cpp
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_ITANIUMMANGLINGCANONICALIZER_H
-#define LLVM_SUPPORT_ITANIUMMANGLINGCANONICALIZER_H
+#ifndef LLVM_PROFILEDATA_ITANIUMMANGLINGCANONICALIZER_H
+#define LLVM_PROFILEDATA_ITANIUMMANGLINGCANONICALIZER_H
#include <cstdint>
};
} // namespace llvm
-#endif // LLVM_SUPPORT_ITANIUMMANGLINGCANONICALIZER_H
+#endif // LLVM_PROFILEDATA_ITANIUMMANGLINGCANONICALIZER_H
#include "llvm/IR/ProfileSummary.h"
#include "llvm/ProfileData/GCOV.h"
#include "llvm/ProfileData/SampleProf.h"
+#include "llvm/ProfileData/SymbolRemappingReader.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Discriminator.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/SymbolRemappingReader.h"
#include <cstdint>
#include <list>
#include <memory>
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_SYMBOLREMAPPINGREADER_H
-#define LLVM_SUPPORT_SYMBOLREMAPPINGREADER_H
+#ifndef LLVM_PROFILEDATA_SYMBOLREMAPPINGREADER_H
+#define LLVM_PROFILEDATA_SYMBOLREMAPPINGREADER_H
#include "llvm/ADT/StringRef.h"
+#include "llvm/ProfileData/ItaniumManglingCanonicalizer.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/ItaniumManglingCanonicalizer.h"
namespace llvm {
} // end namespace llvm
-#endif // LLVM_SUPPORT_SYMBOLREMAPPINGREADER_H
+#endif // LLVM_PROFILEDATA_SYMBOLREMAPPINGREADER_H
InstrProfCorrelator.cpp
InstrProfReader.cpp
InstrProfWriter.cpp
+ ItaniumManglingCanonicalizer.cpp
MemProf.cpp
ProfileSummaryBuilder.cpp
+ RawMemProfReader.cpp
SampleProf.cpp
SampleProfReader.cpp
SampleProfWriter.cpp
- RawMemProfReader.cpp
+ SymbolRemappingReader.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ProfileData
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/ProfileData/MemProf.h"
#include "llvm/ProfileData/ProfileCommon.h"
+#include "llvm/ProfileData/SymbolRemappingReader.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SwapByteOrder.h"
-#include "llvm/Support/SymbolRemappingReader.h"
#include "llvm/Support/VirtualFileSystem.h"
#include <algorithm>
#include <cstddef>
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/ItaniumManglingCanonicalizer.h"
+#include "llvm/ProfileData/ItaniumManglingCanonicalizer.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringRef.h"
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/SymbolRemappingReader.h"
+#include "llvm/ProfileData/SymbolRemappingReader.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/LineIterator.h"
InstructionCost.cpp
IntEqClasses.cpp
IntervalMap.cpp
- ItaniumManglingCanonicalizer.cpp
JSON.cpp
KnownBits.cpp
LEB128.cpp
StringSaver.cpp
StringRef.cpp
SuffixTree.cpp
- SymbolRemappingReader.cpp
SystemUtils.cpp
TarWriter.cpp
ThreadPool.cpp
set(LLVM_LINK_COMPONENTS
Core
Support
+ ProfileData
)
add_llvm_tool(llvm-cxxmap
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/ProfileData/SymbolRemappingReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/SymbolRemappingReader.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
CoverageMappingTest.cpp
InstrProfDataTest.cpp
InstrProfTest.cpp
- SampleProfTest.cpp
+ ItaniumManglingCanonicalizerTest.cpp
MemProfTest.cpp
+ SampleProfTest.cpp
+ SymbolRemappingReaderTest.cpp
)
target_link_libraries(ProfileDataTests PRIVATE LLVMTestingSupport)
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/ItaniumManglingCanonicalizer.h"
+#include "llvm/ProfileData/ItaniumManglingCanonicalizer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "gtest/gtest.h"
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/SymbolRemappingReader.h"
+#include "llvm/ProfileData/SymbolRemappingReader.h"
#include "llvm/Support/MemoryBuffer.h"
#include "gtest/gtest.h"
HashBuilderTest.cpp
IndexedAccessorTest.cpp
InstructionCostTest.cpp
- ItaniumManglingCanonicalizerTest.cpp
JSONTest.cpp
KnownBitsTest.cpp
LEB128Test.cpp
SpecialCaseListTest.cpp
SuffixTreeTest.cpp
SwapByteOrderTest.cpp
- SymbolRemappingReaderTest.cpp
TarWriterTest.cpp
TaskQueueTest.cpp
ThreadPool.cpp
"InstrProfCorrelator.cpp",
"InstrProfReader.cpp",
"InstrProfWriter.cpp",
+ "ItaniumManglingCanonicalizer.cpp",
"MemProf.cpp",
"ProfileSummaryBuilder.cpp",
"RawMemProfReader.cpp",
"SampleProf.cpp",
"SampleProfReader.cpp",
"SampleProfWriter.cpp",
+ "SymbolRemappingReader.cpp",
]
}
"InstructionCost.cpp",
"IntEqClasses.cpp",
"IntervalMap.cpp",
- "ItaniumManglingCanonicalizer.cpp",
"JSON.cpp",
"KnownBits.cpp",
"LEB128.cpp",
"StringRef.cpp",
"StringSaver.cpp",
"SuffixTree.cpp",
- "SymbolRemappingReader.cpp",
"SystemUtils.cpp",
"TarWriter.cpp",
"ThreadPool.cpp",
executable("llvm-cxxmap") {
deps = [
"//llvm/lib/IR",
+ "//llvm/lib/ProfileData",
"//llvm/lib/Support",
"//llvm/lib/Target:TargetsToBuild",
]
"CoverageMappingTest.cpp",
"InstrProfDataTest.cpp",
"InstrProfTest.cpp",
+ "ItaniumManglingCanonicalizerTest.cpp",
"MemProfTest.cpp",
"SampleProfTest.cpp",
+ "SymbolRemappingReaderTest.cpp",
]
}
"HashBuilderTest.cpp",
"IndexedAccessorTest.cpp",
"InstructionCostTest.cpp",
- "ItaniumManglingCanonicalizerTest.cpp",
"JSONTest.cpp",
"KnownBitsTest.cpp",
"LEB128Test.cpp",
"SpecialCaseListTest.cpp",
"SuffixTreeTest.cpp",
"SwapByteOrderTest.cpp",
- "SymbolRemappingReaderTest.cpp",
"TarWriterTest.cpp",
"TaskQueueTest.cpp",
"ThreadPool.cpp",
copts = llvm_copts,
stamp = 0,
deps = [
+ ":ProfileData",
":Support",
],
)