- Remove crc32 from zlib compression namespace, people should use the llvm::crc32 instead.
Details
Diff Detail
Event Timeline
Feedback needed on:
this namespace approach will result in tooling compression methods being set at compile time, however we may want to aim for a runtime configurable approach in the future, likely a new revision of the compressed data formats that llvm interfaces with with outside tools IE:
- clang ast serialization code could be changed so compressed data could have a flag indicating a compression type.
- profile data code could be changed so compressed data could have a flag indicating a compression type as well.
Using the compile time approach for now with the runtime approach in the future SGTM. I think some flag that could specify the decompression type is what we want in the long term, but the compile time approach I think is ok for now to not block you.
clang-tools-extra/clangd/index/Serialization.cpp | ||
---|---|---|
242 ↗ | (On Diff #440736) | nit: Could we add some function that returns a string of whatever compression is used? This way we have a more descriptive error message showing what specifically is unavailable. Same comment elsewhere there's logging/error reporting but the string is "compression::serialize". |
llvm/unittests/Support/CompressionTest.cpp | ||
70 | Should this be replaced with llvm::crc32 rather than deleting this? |
llvm/unittests/Support/CompressionTest.cpp | ||
---|---|---|
70 | No Because llvm::crc32 has it's own tests already |
clang-tools-extra/clangd/index/Serialization.cpp | ||
---|---|---|
242 ↗ | (On Diff #440736) | sure, I can add a AlgorithmName property to the zlib namespace and future compression namespaces, then we can print out compression::serialize::AlgorithmName to see what is being used |
- feat: refactor llvm compression namespaces
- chore: update rel notes to note zlib::crc32 remove
- feat: add AlgorithmName to compression namespaces
- Merge remote-tracking branch 'origin/main' into ckissane.refactor-compression-namespace
llvm/docs/ReleaseNotes.rst | ||
---|---|---|
183–191 | I think maybe even more of these could be split into further patches. I would expect that this patch contain just the namespace refactoring but not necessarily any code deletion or cmake changes. I think this could be:
And if necessary, each of them would have an appropriate ReleaseNodes.rst update. | |
llvm/lib/Support/Compression.cpp | ||
30 | Should createError still be wrapped with #if LLVM_ENABLE_ZLIB? |
- Merge branch 'ckissane.refactor-compression.part-0' into ckissane.refactor-compression.part-1
LGTM. Should probably add [llvm] to the subject also. Generally it's helpful for immediately knowing which subrepo you're touching.
- remove crc32 from zlib compression namespace
- Merge branch 'ckissane.refactor-compression.part-0' into ckissane.refactor-compression.part-1
- Merge branch 'ckissane.refactor-compression.part-0.no-string-sub' into ckissane.refactor-compression.part-1
- Merge remote-tracking branch 'origin/ckissane.refactor-compression.part-0.no-string-sub' into ckissane.refactor-compression.part-1
You may push this patch and its prerequisite while other patches are still to be reviewed.
I think maybe even more of these could be split into further patches. I would expect that this patch contain just the namespace refactoring but not necessarily any code deletion or cmake changes. I think this could be:
And if necessary, each of them would have an appropriate ReleaseNodes.rst update.