diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-25 06:32:16 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-25 06:32:16 +0000 |
commit | c991586b924a1aaebf1002527f8eab3a7f864fd1 (patch) | |
tree | b3f0705b64d792408dc3676aae972bec0b21a971 | |
parent | 2363b4ef5b849d7eb95001b7c13c4a4518a49003 (diff) |
Regularize file header comment and include guard.
Include SparcV9RegisterInfo.h.
Add a getRegisterInfo() accessor and SparcV9RegisterInfo instance, just like
on the X86 target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13146 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/SparcV9/SparcV9InstrInfo.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.h b/lib/Target/SparcV9/SparcV9InstrInfo.h index 4dd578c47b..dcc2e15181 100644 --- a/lib/Target/SparcV9/SparcV9InstrInfo.h +++ b/lib/Target/SparcV9/SparcV9InstrInfo.h @@ -1,4 +1,4 @@ -//===-- SparcV9InstrInfo.h - Define TargetInstrInfo for SparcV9 -----*- C++ -*-===// +//===-- SparcV9InstrInfo.h - Define TargetInstrInfo for SparcV9 -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,18 +14,27 @@ // //===----------------------------------------------------------------------===// -#ifndef SPARC_INSTRINFO_H -#define SPARC_INSTRINFO_H +#ifndef SPARCV9INSTRINFO_H +#define SPARCV9INSTRINFO_H #include "llvm/Target/TargetInstrInfo.h" #include "llvm/CodeGen/MachineInstr.h" #include "SparcV9Internals.h" +#include "SparcV9RegisterInfo.h" namespace llvm { struct SparcV9InstrInfo : public TargetInstrInfo { + const SparcV9RegisterInfo RI; +public: SparcV9InstrInfo(); + /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As + /// such, whenever a client has an instance of instruction info, it should + /// always be able to get register info as well (through this method). + /// + virtual const MRegisterInfo &getRegisterInfo() const { return RI; } + // All immediate constants are in position 1 except the // store instructions and SETxx. // |