[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
Tue May 15 14:29:27 PDT 2018
vlad.tsyrklevich added a comment.
Otherwise looks good to me.
================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1221
GlobalValue::ExternalWeakLinkage, "", &M);
- F->replaceAllUsesWith(PlaceholderFn);
+ replaceCfiUses(F, PlaceholderFn);
----------------
This logic is slightly different because it skips block addresses. Is it possible that a local weak function would exist that would cause an exception by not being replaced here?
================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1451
else
- F->replaceAllUsesWith(CombinedGlobalElemPtr);
+ replaceCfiUses(F, CombinedGlobalElemPtr);
} else {
----------------
Ditto the above. Because of !IsDefinition I can't think of a case where a blockaddress would be valid though, so this might be fine.
https://reviews.llvm.org/D46326
More information about the llvm-commits
mailing list