12 Commits

Author SHA1 Message Date
Francis Visoiu Mistrih
d81fc2e8c3 [Remarks] Allow remarks::Format::YAML to take a string table
It should be allowed to take a string table in case all the strings in
the remarks point there, but it shouldn't use it during serialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372042 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 22:45:17 +00:00
Francis Visoiu Mistrih
ebe9e05e29 [Remarks][NFC] Forward declare ParsedStringTable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371870 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 17:27:28 +00:00
Francis Visoiu Mistrih
2cd46b36d1 [Remarks] Don't serialize metadata if a string table is not used
For YAML remarks with no string table, the mode should not affect the
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371106 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-05 18:30:20 +00:00
Francis Visoiu Mistrih
5093e0a4be [Remarks] Add two serialization modes for remarks: separate and standalone
The default mode is separate, where the metadata is serialized
separately from the remarks.

Another mode is the standalone mode, where the metadata is serialized
before the remarks, on the same stream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367328 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 16:01:40 +00:00
Francis Visoiu Mistrih
9466b7a1ed Reland: [Remarks] Add support for serializing metadata for every remark streamer
This allows every serializer format to implement metaSerializer() and
return the corresponding meta serializer.

Original llvm-svn: 366946
Reverted llvm-svn: 367004

This fixes the unit tests on Windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367078 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-26 01:33:30 +00:00
Simon Pilgrim
60dd9229ec Revert rL366946 : [Remarks] Add support for serializing metadata for every remark streamer
This allows every serializer format to implement metaSerializer() and
return the corresponding meta serializer.
........
Fix windows build bots
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-win-fast
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367004 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-25 10:20:39 +00:00
Francis Visoiu Mistrih
10e9418a82 [Remarks] Add support for serializing metadata for every remark streamer
This allows every serializer format to implement metaSerializer() and
return the corresponding meta serializer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366946 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 21:29:44 +00:00
Francis Visoiu Mistrih
6722c51b5b [Remarks][NFC] Rename remarks::Serializer to remarks::RemarkSerializer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366939 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 19:47:57 +00:00
Francis Visoiu Mistrih
0294e50fe5 [Remarks] Simplify the creation of remark serializers
Introduce two new functions to create a serializer, and add support for
more combinations to the YAMLStrTabSerializer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366919 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 16:36:35 +00:00
Francis Visoiu Mistrih
f802102dc4 [Remarks] Introduce a new format: yaml-strtab
This exposes better support to use a string table with a format through
an actual new remark::Format, called yaml-strtab.

This can now be used with -fsave-optimization-record=yaml-strtab.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366849 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-23 20:42:46 +00:00
Francis Visoiu Mistrih
b06f154406 [Remarks][NFC] Move the YAML serializer to its own header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366842 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-23 19:28:03 +00:00
Francis Visoiu Mistrih
04599fe58e [Remarks] Add unit tests for YAML serialization
Add tests for both the string table and non string table case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366832 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-23 18:09:12 +00:00