From: Dan Gohman Date: Tue, 24 Jun 2008 00:53:07 +0000 (+0000) Subject: Add a note about a potential PIC optimization. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2d0d59380a0f22d32782fb9837b57ffc25c8d9f1;p=oota-llvm.git 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 --- 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. + +//===---------------------------------------------------------------------===//