[PATCH] D134915: [X86] Do not emit JCC to __x86_indirect_thunk

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 12:04:54 PDT 2022


nickdesaulniers added a comment.

Looking good, please mark comments as "Done" in phabricator UI so that reviewers know what's left to be addressed.



================
Comment at: llvm/test/CodeGen/X86/jcc-indirect-thunk-kernel.ll:1
+; RUN: llc < %s -O2 --code-model=kernel | FileCheck %s
+
----------------
Compile for performance...


================
Comment at: llvm/test/CodeGen/X86/jcc-indirect-thunk-kernel.ll:5
+
+define dso_local void @foo(void()** %something) #0 {
+; CHECK-LABEL: foo:
----------------
I think if you remove one layer of indirection then you might be able to drop the load instruction below?


================
Comment at: llvm/test/CodeGen/X86/jcc-indirect-thunk-kernel.ll:21
+if.then:
+  tail call void %0() #1
+  ret void
----------------
delete


================
Comment at: llvm/test/CodeGen/X86/jcc-indirect-thunk-kernel.ll:28
+
+attributes #0 = { optsize "target-features"="+retpoline-indirect-calls,+retpoline-external-thunk" }
----------------
but optimize this fn for size?  Are either/any of these necessary?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134915/new/

https://reviews.llvm.org/D134915



More information about the llvm-commits mailing list