[llvm-commits] [llvm] r133782 - in /llvm/trunk: ./ include/llvm/MC/ include/llvm/Target/ lib/CodeGen/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/Blackfin/ lib/Target/CellSPU/ lib/Target/MBlaze/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PTX/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/SystemZ/ lib/Target/X86/ lib/Target/X86/TargetDesc/ lib/Target/XCore/ utils/TableGen/
Chris Lattner
clattner at apple.com
Fri Jun 24 14:15:57 PDT 2011
On Jun 23, 2011, at 6:44 PM, Evan Cheng wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=133782&view=rev
> Log:
> Starting to refactor Target to separate out code that's needed to fully describe
> target machine from those that are only needed by codegen. The goal is to
> sink the essential target description into MC layer so we can start building
> MC based tools without needing to link in the entire codegen.
>
> First step is to refactor TargetRegisterInfo. This patch added a base class
> MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
> separate register description from the rest of the stuff.
> +++ llvm/trunk/include/llvm/MC/MCRegisterInfo.h Thu Jun 23 20:44:41 2011
>
Looks very nice!
> +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Thu Jun 23 20:44:41 2011
> @@ -39,6 +39,8 @@
> #include "llvm/ADT/BitVector.h"
> #include "llvm/ADT/SmallVector.h"
> #include "llvm/Support/CommandLine.h"
> +#include "ARMGenRegisterDesc.inc"
> +#include "ARMGenRegisterInfo.inc"
Can these two .inc files get merged? It would be nice to have one tblgen output file for registers that contains everything in one file. Basically all the -gen-register* tblgen backends can be merged to produce one output file.
> MBlazeRegisterInfo(const MBlazeSubtarget &ST, const TargetInstrInfo &tii)
> - : MBlazeGenRegisterInfo(MBlaze::ADJCALLSTACKDOWN, MBlaze::ADJCALLSTACKUP),
> + : MBlazeGenRegisterInfo(MBlazeRegDesc, MBlazeRegInfoDesc,
> + MBlaze::ADJCALLSTACKDOWN, MBlaze::ADJCALLSTACKUP),
> Subtarget(ST), TII(tii) {}
Incidentally, (and I know this isn't your fault) the ADJCALLSTACKDOWN stuff should be in InstrInfo, not register info :)
> +++ llvm/trunk/lib/Target/X86/TargetDesc/Makefile Thu Jun 23 20:44:41 2011
> @@ -0,0 +1,16 @@
> +##===- lib/Target/X86/TargetDesc/Makefile ------------------*- Makefile -*-===##
Random picky thing: should this be "X86/MCTargetDesc"? That would make it very clearly part of the MC layer.
Overall, this is really great work,
-Chris
More information about the llvm-commits
mailing list