It saves about 1.13% size for chrome.dll.pdb on chrome official build.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Nice!
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | ||
---|---|---|
78 | To minimize the amount of code that needs to know or assume the size of LocalVarDefRange, I recommend exposing a method, maybe called toOpaqueValue, which returns a uint64_t. Then, all of these methods don't need to do memcpy, they just call that method, and compare or operate on integer values as you have them. You may also need createFromOpaqueValue or something like that. | |
91 | Prefer sizeof(Val) to hardcoding 8. It's worth adding static_assert(sizeof(uint64_t) == sizeof(LocalVarDefRange)); to ensure that the bitfields are packed as expected. | |
520 | Instead of inheritance, can all those methods be defined here? |
- Address comments.
- Rename LocalVarDefRange to LocalVarDef as it no longer has range info inside.
lgtm, thanks!
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | ||
---|---|---|
521 | You may need to use ULL sufixes so that this compiles as you expect on LLP64 platforms, such as Windows x64. |
To minimize the amount of code that needs to know or assume the size of LocalVarDefRange, I recommend exposing a method, maybe called toOpaqueValue, which returns a uint64_t. Then, all of these methods don't need to do memcpy, they just call that method, and compare or operate on integer values as you have them. You may also need createFromOpaqueValue or something like that.