This is an archive of the discontinued LLVM Phabricator instance.

TargetSubtargetInfo: Move implementation to lib/CodeGen; NFC
ClosedPublic

Authored by MatzeB on Nov 21 2016, 4:59 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 78804.Nov 21 2016, 4:59 PM
MatzeB retitled this revision from to TargetSubtargetInfo: Move implementation to lib/CodeGen; NFC.
MatzeB updated this object.
MatzeB added reviewers: chandlerc, echristo.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
chandlerc edited edge metadata.Nov 21 2016, 6:17 PM

If you want to do this, we should really move the header as well. We shouldn't have classes with headers in Target and implementation in CodeGen.

However, I suspect that will present more problems... =/

If you want to do this, we should really move the header as well. We shouldn't have classes with headers in Target and implementation in CodeGen.

However, I suspect that will present more problems... =/

Well
include/llvm/Target/TargetRegisterInfo.h
include/llvm/Target/TargetFrameLowering.h
include/llvm/Target/TargetInstrInfo.h
...
are all implemented in lib/CodeGen as well, so I thought I stay consistent (even though it is silly).

chandlerc accepted this revision.Nov 21 2016, 6:24 PM
chandlerc edited edge metadata.

Sure. What's one more.

This revision is now accepted and ready to land.Nov 21 2016, 6:24 PM
echristo accepted this revision.Nov 22 2016, 12:48 PM
echristo edited edge metadata.

Chandler said he was going to look into completing moves based on this later so as an incremental step this is definitely ok.

Thanks!

-eric

This revision was automatically updated to reflect the committed changes.