[PATCH] D46326: ThinLTO+CFI: short-circuit direct calls to jump table entries

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 16:14:21 PDT 2018


vlad.tsyrklevich added inline comments.


================
Comment at: llvm/test/Transforms/LowerTypeTests/cfi-direct-call.ll:6
+
+declare void @external()
+
----------------
dmikulin wrote:
> vlad.tsyrklevich wrote:
> > This variable is named `@external` but is included in `CfiFunctionDefs` instead of `CfiFunctionsDecls` in the summary so it's treated like a local function. e.g. for direct calls it's re-written to `@external.cfi`. An direct call to an external function would be left as `@external` (instead of being re-written to `@external.cfi_jt` to point to the jump table entry.)
> Direct calls to external functions may still go through a jump table entry, if those functions are of the same type as functions called indirectly. I'll change the test case and add more test points.
Shouldn't the logic in this change prevent that from happening? (modulo the thin versus monolithic LTO logic I have already mentioned.)


https://reviews.llvm.org/D46326





More information about the llvm-commits mailing list