[PATCH] D42453: Use branch funnels for virtual calls when retpoline mitigation is enabled.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 18:02:31 PST 2018
chandlerc added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:877
+// Create a binary search jump table that implements an indirect call to a
+// limited set of callees. This expands to inline asm that implements the jump
----------------
A jump table usually refers to an *indirect* jump using a table of addresses...
Maybe "search tree" or "branch funnel" or some other term would be more clear here and elsewhere?
================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1106-1108
+ AsmOS << "leaq ${" << Args.size() << ":c}+" << T.Offset
+ << "(%rip), %r11\n";
+ Args.push_back(CombinedGlobalAddr);
----------------
Emitting all of this with (I assume) inline assembly seems like a really messy design. It makes all of this entirely x86-specific, but *this* part is completely independent of architecture.
Why not emit LLVM IR? Is there no pattern of IR that actually lowers to reasonable branches? I find that a little bit surprising, but maybe we should just fix the lowering in that case?
https://reviews.llvm.org/D42453
More information about the llvm-commits
mailing list