From 2d0d59380a0f22d32782fb9837b57ffc25c8d9f1 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 24 Jun 2008 00:53:07 +0000 Subject: [PATCH] Add a note about a potential PIC optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52663 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/README.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 6f6abd478db..80368546c99 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1709,3 +1709,10 @@ _test: it would be better to codegen as: x+~y (notl+addl) //===---------------------------------------------------------------------===// + +We should consider using __i686.get_pc_thunk.bx for MOVPC32r (used for PIC) +on targets that support it, such as Linux and similar targets, in place of +the call-a-label trick. It's said to be friendlier to branch-prediction +hardware because it pairs a ret with the call. + +//===---------------------------------------------------------------------===// -- 2.34.1