[llvm-commits] CVS: llvm/include/llvm/CodeGen/SSARegMap.h MachineFunction.h
Misha Brukman
brukman at cs.uiuc.edu
Tue Nov 19 18:54:00 PST 2002
Changes in directory llvm/include/llvm/CodeGen:
SSARegMap.h added (r1.1)
MachineFunction.h updated: 1.19 -> 1.20
---
Log message:
SSARegMap -- the mapping between SSARegisters and their RegisterClasses, which
imply types of SSA Registers. This is on a per-function basis, so the
MachineFunction contains the SSARegMap, and has accessor functions to it.
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MachineFunction.h
diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.19 llvm/include/llvm/CodeGen/MachineFunction.h:1.20
--- llvm/include/llvm/CodeGen/MachineFunction.h:1.19 Tue Oct 29 18:46:31 2002
+++ llvm/include/llvm/CodeGen/MachineFunction.h Tue Nov 19 18:53:10 2002
@@ -10,6 +10,7 @@
#define LLVM_CODEGEN_MACHINEFUNCTION_H
#include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/Annotation.h"
#include "Support/HashExtras.h"
#include "Support/hash_set"
@@ -46,6 +47,9 @@
bool compiledAsLeaf;
bool spillsAreaFrozen;
bool automaticVarsAreaFrozen;
+
+ // Keeping track of mapping from SSA values to registers
+ SSARegMap *SSARegMapping;
public:
MachineFunction(const Function *Fn, const TargetMachine& target);
@@ -85,6 +89,15 @@
const TargetMachine &target);
static void destruct(const Function *F);
static MachineFunction& get(const Function *F);
+
+ // Getting and storing SSARegMap information
+ const TargetRegisterClass* getRegClass(unsigned Reg) {
+ return SSARegMapping->getRegClass(Reg);
+ }
+ void addRegMap(unsigned Reg, const TargetRegisterClass *RegClass) {
+ SSARegMapping->addRegMap(Reg, RegClass);
+ }
+ void clearSSARegMap() { delete SSARegMapping; }
// Provide accessors for the MachineBasicBlock list...
typedef iplist<MachineBasicBlock> BasicBlockListType;
More information about the llvm-commits
mailing list