[PATCH] D19429: Give backends an opportunity to finish layout post-relaxation

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 12:16:59 PDT 2016


colinl created this revision.
colinl added reviewers: sidneym, mlambert, khemant, rafael, rnk, kparzysz.
colinl added a subscriber: llvm-commits.
colinl set the repository for this revision to rL LLVM.

Overriding this function gives targets access to the layout post-relaxation and before writing fragments to output.

Hexagon is using this to more intelligently pad nops by using a larger encoding for the previous instruction if possible.

We aren't able to do this with the existing writeNopData since the previous instructions have already been encoded to the output stream.

I imagine other targets would be able to do similar optimizations and possibly more.

Repository:
  rL LLVM

http://reviews.llvm.org/D19429

Files:
  include/llvm/MC/MCAsmBackend.h
  lib/MC/MCAssembler.cpp
  lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
  test/MC/Hexagon/align.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19429.54699.patch
Type: text/x-patch
Size: 6427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160422/fa11b8bc/attachment.bin>


More information about the llvm-commits mailing list