LowerTypeTests pass adds functions with a non-canonical jump table
to cfiFunctionDecls instead of cfiFunctionDefs. As the jump table
is in the regular LTO object, these functions will also need to be
exported. This change fixes the non-canonical jump table case and
adds a test similar to the existing one for canonical jump tables.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Adding another possible reviewer since @eugenis added these data structures (D34168). With the caveat that I'm not very familiar at all with this CFI transformation, the patch looks ok to me after looking at how cfiFunctionDecls is used. However it would be great to get a review from either @pcc or @eugenis.
llvm/test/LTO/Resolution/X86/export-jumptable-noncanonical.ll | ||
---|---|---|
14 | I assume this is part of a non-canonical jump table, which is why we don't internalize with this patch. How can I tell that it is part of a non-canonical rather than canonical jump table? |
No, this patch just makes it possible to compile stand-alone programs with non-canonical CFI jump tables.
llvm/test/LTO/Resolution/X86/export-jumptable-noncanonical.ll | ||
---|---|---|
14 |
Correct. The "CFI Canonical Jump Tables" module flag is set to 0 at the bottom of the file to use non-canonical jump tables. |
Thanks, Peter. I don't have commit access, so Nick, would you mind committing this for me? The Windows build failure looks unrelated.
I assume this is part of a non-canonical jump table, which is why we don't internalize with this patch. How can I tell that it is part of a non-canonical rather than canonical jump table?