[PATCH] D26948: TargetSubtargetInfo: Move implementation to lib/CodeGen; NFC

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 16:59:11 PST 2016


MatzeB created this revision.
MatzeB added reviewers: chandlerc, echristo.
MatzeB added a subscriber: llvm-commits.
MatzeB set the repository for this revision to rL LLVM.
Herald added subscribers: mgorny, mehdi_amini, mcrosier.

Nowadays TargetSubtargetInfo is filled with CodeGen specific interfaces
like getInstrInfo(), getFrameLowering(), getSelectionDAGInfo(), ... also most
of the tuning flags like enablePostRAScheduler(), getAntiDepBreakMode(),
enableRALocalReassignment(), ... are tweaked and tested with CodeGen only so it
is very unlikely this interface will ever be used outside of CodeGen.

Moving the class into CodeGen allows to provide a default
implementation of an interface that calls CodeGen functions. I plan to
use this in an upcoming commit.


Repository:
  rL LLVM

https://reviews.llvm.org/D26948

Files:
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/TargetSubtargetInfo.cpp
  lib/Target/CMakeLists.txt
  lib/Target/TargetSubtargetInfo.cpp


Index: lib/Target/CMakeLists.txt
===================================================================
--- lib/Target/CMakeLists.txt
+++ lib/Target/CMakeLists.txt
@@ -6,7 +6,6 @@
   TargetLoweringObjectFile.cpp
   TargetMachine.cpp
   TargetMachineC.cpp
-  TargetSubtargetInfo.cpp
 
   ADDITIONAL_HEADER_DIRS
   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Target
Index: lib/CodeGen/TargetSubtargetInfo.cpp
===================================================================
--- lib/CodeGen/TargetSubtargetInfo.cpp
+++ lib/CodeGen/TargetSubtargetInfo.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file describes the general parts of a Subtarget.
+/// \file This file describes the general parts of a Subtarget.
 //
 //===----------------------------------------------------------------------===//
 
Index: lib/CodeGen/CMakeLists.txt
===================================================================
--- lib/CodeGen/CMakeLists.txt
+++ lib/CodeGen/CMakeLists.txt
@@ -136,6 +136,7 @@
   TargetPassConfig.cpp
   TargetRegisterInfo.cpp
   TargetSchedule.cpp
+  TargetSubtargetInfo.cpp
   TwoAddressInstructionPass.cpp
   UnreachableBlockElim.cpp
   VirtRegMap.cpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26948.78804.patch
Type: text/x-patch
Size: 1217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161122/527922ea/attachment.bin>


More information about the llvm-commits mailing list