Use ARMFunctionInfo to track number of constpool entries and jumptables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-11-08 00:51:41 +00:00
parent 3dd42cfe12
commit f1bbb9577a
3 changed files with 28 additions and 11 deletions

View File

@@ -14,10 +14,11 @@
#ifndef ARMJITINFO_H
#define ARMJITINFO_H
#include "llvm/Target/TargetJITInfo.h"
#include "ARMMachineFunctionInfo.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/Target/TargetJITInfo.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
@@ -85,8 +86,9 @@ namespace llvm {
/// Initialize - Initialize internal stage. Get the list of constant pool
/// Resize constant pool ids to CONSTPOOL_ENTRY addresses map.
void Initialize(const MachineFunction &MF) {
ConstPoolId2AddrMap.resize(MF.getConstantPool()->getConstants().size());
JumpTableId2AddrMap.resize(MF.getJumpTableInfo()->getJumpTables().size());
const ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
ConstPoolId2AddrMap.resize(AFI->getNumConstPoolEntries());
JumpTableId2AddrMap.resize(AFI->getNumJumpTables());
}
/// getConstantPoolEntryAddr - The ARM target puts all constant