Add a note about a potential PIC optimization.
authorDan Gohman <gohman@apple.com>
Tue, 24 Jun 2008 00:53:07 +0000 (00:53 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 24 Jun 2008 00:53:07 +0000 (00:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52663 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 6f6abd478dbf35d128fe5796586bd88f89628df4..80368546c996173311cbf15d0d47215f0602adc3 100644 (file)
@@ -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.
+
+//===---------------------------------------------------------------------===//