[LLVMdev] Move TargetRegisterInfo and TargetInstrInfo into libCodeGen
clattner at apple.com
Tue Nov 27 11:23:11 PST 2012
On Nov 27, 2012, at 10:24 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> Would anyone object to my moving the TargetRegisterInfo and TargetInstrInfo classes into libCodeGen?
> TargetInstrInfo is already halfway there with its TargetInstrInfoImpl class implementing most shared functionality. The lib/Target/TargetInstrInfo.cpp file has two remaining functions that happen to not depend on libCodeGen, but I don't think they serve any purpose as part of libTarget.
> Similarly, the functions in lib/Target/TargetRegisterInfo.cpp happen to not depend on libCodeGen, but I don't think the TRI interface has anything to offer to a libTarget client that doesn't link libCodeGen as well.
The original idea of the Target* classes is that they represent aspects of the target machine implementation, whereas the Machine* classes (in lib/CodeGen) represent a particular function being compiled. I think this distinction still makes sense, and it makes sense that CodeGen is layered on top of Target. What do you think?
More information about the llvm-dev