[PATCH] [RFC][PATCH] Minor opt to access pointers to globals via pcrel GOT entries

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Fri Jan 23 16:12:54 PST 2015


Hi Rafael, updated the patch after your comments.

As talked on IRC, by dealing directly with MCExpr we gain all folding benefits that lowerConstant computes while getting rid of several layers and indirections of cstexprs contaning lots of getelementptrs, pointers and casts. Also, this patch generates equivalent .s or .o outputs, there's no need to implement this coming from a .s (one can always change the assembly source to use GOTPCREL instead).

Thanks,


http://reviews.llvm.org/D6922

Files:
  include/llvm/CodeGen/AsmPrinter.h
  include/llvm/Target/TargetLoweringObjectFile.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/Target/X86/X86TargetObjectFile.cpp
  lib/Target/X86/X86TargetObjectFile.h
  test/MC/X86/cstexpr-gotpcrel.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6922.18697.patch
Type: text/x-patch
Size: 17535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150124/ceed3c63/attachment.bin>


More information about the llvm-commits mailing list