[PATCH] ARM: refactor redundant *_dyn pseudos

Tim Northover t.p.northover at gmail.com
Mon Nov 25 04:45:54 PST 2013


Darwin distinguishes between three relocation models unlike ELF: static, dynamic-no-pic and pic. However, dynamic-no-pic is almost identical to static. The only difference is that global variables which aren't guaranteed to be known at static link-time (i.e. GOT-based accesses) should refer to a local hidden symbol with "$non_lazy_ptr" appended.

As a result, the MOVW/MOVT materialization pseudo-instructions (t2)MOV_ga_dyn are largely redundant and identical to the code-path shared by ELF and other constants: (t2)MOVi32imm, provided appropriate target flags are sent along for the ride.

This patch removes them and performs the required rerouting. It removes a few lines in total, and *I* think it's neater. What do you think?

Cheers.

Tim.

http://llvm-reviews.chandlerc.com/D2266

Files:
  lib/Target/ARM/ARMAsmPrinter.cpp
  lib/Target/ARM/ARMAsmPrinter.h
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  lib/Target/ARM/ARMExpandPseudoInsts.cpp
  lib/Target/ARM/ARMFastISel.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Target/ARM/ARMInstrInfo.td
  lib/Target/ARM/ARMInstrThumb2.td
  lib/Target/ARM/ARMMCInstLower.cpp
  lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2266.1.patch
Type: text/x-patch
Size: 17577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131125/63b39e24/attachment.bin>


More information about the llvm-commits mailing list