This is an archive of the discontinued LLVM Phabricator instance.

[Remarks][NFC] Move the serialization to lib/Remarks
ClosedPublic

Authored by thegameg on May 29 2019, 3:24 PM.

Details

Summary

Separate the remark serialization to YAML from the LLVM Diagnostics.

This adds a new serialization abstraction: remarks::Serializer. It's completely independent from lib/IR and it provides an easy way to replace YAML by providing a new remarks::Serializer.

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.May 29 2019, 3:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2019, 3:24 PM
JDevlieghere accepted this revision.May 30 2019, 1:16 PM

LGTM. This seems straightforward. I skipped over the YAML stuff though, as it appears to have been moved.

This revision is now accepted and ready to land.May 30 2019, 1:16 PM
This revision was automatically updated to reflect the committed changes.
sbc100 added a subscriber: sbc100.May 30 2019, 4:55 PM

This seems to have broken the BUILD_SHARED_LIBS=ON build:

FAILED: lib/libLLVMLTO.so.9svn 
: && /usr/local/google/home/sbc/dev/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3  -fuse-ld=gold -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/usr/local/google/home/sbc/dev/wasm/llvm-build/./lib  -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVMLTO.so.9svn -o lib/libLLVMLTO.so.9svn lib/LTO/CMakeFiles/LLVMLTO.dir/Caching.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/SummaryBasedOptimizations.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/UpdateCompilerUsed.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/ThinLTOCodeGenerator.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMAggressiveInstCombine.so.9svn lib/libLLVMAnalysis.so.9svn lib/libLLVMBitReader.so.9svn lib/libLLVMBitWriter.so.9svn lib/libLLVMCodeGen.so.9svn lib/libLLVMCore.so.9svn lib/libLLVMInstCombine.so.9svn lib/libLLVMLinker.so.9svn lib/libLLVMMC.so.9svn lib/libLLVMObjCARCOpts.so.9svn lib/libLLVMObject.so.9svn lib/libLLVMPasses.so.9svn lib/libLLVMScalarOpts.so.9svn lib/libLLVMSupport.so.9svn lib/libLLVMTarget.so.9svn lib/libLLVMTransformUtils.so.9svn lib/libLLVMipo.so.9svn && :
lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o:LTO.cpp:function llvm::lto::setupOptimizationRemarks(llvm::LLVMContext&, llvm::StringRef, llvm::StringRef, bool, int): error: undefined reference to 'llvm::remarks::YAMLSerializer::YAMLSerializer(llvm::raw_ostream&, llvm::remarks::UseStringTable)'

Sorry about that. Thanks @sbc100!