[PATCH] D41693: [ARM][NFC] Avoid recreating MCSubtargetInfo in ARMAsmBackend

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 02:20:16 PST 2018


asb created this revision.
asb added reviewers: fhahn, rengolin.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

After https://reviews.llvm.org/D41349, we can now directly access MCSubtargetInfo from createARM*AsmBackend. This patch makes use of this, avoiding the need to create a fresh MCSubtargetInfo (which was previously always done with a blank CPU and feature string). Given the total size of the change remains pretty tiny and we're removing the old explicit destructor, I changed the STI field to a reference rather than a pointer.


https://reviews.llvm.org/D41693

Files:
  lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
  lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h
  lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h
  lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h
  lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41693.128500.patch
Type: text/x-patch
Size: 10149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180103/60a8151a/attachment.bin>


More information about the llvm-commits mailing list