Target specific SubtargetEmitter.cpp

I need to write a target specific SubtargetEmitter.cpp (lets call it MyTargetSubtargetEmitter.cpp). The reason for doing so is that I don’t to hack at the main trunk code (I don’t think it is a proper thing to do). However I don’t know how integrate as well as to tell LLVM to use my version of SubtargetEmitter.cpp when it is dealing with my target. Would anyone care to help?