mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Added class MachineCacheInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1229 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
915b58d2ed
commit
4a48c339d6
@ -1,11 +1,13 @@
|
||||
//===-- TargetMachine.cpp - General Target Information ---------------------==//
|
||||
//
|
||||
// This file describes the general parts of a Target machine.
|
||||
// This file also implements the InstInfo interface as well...
|
||||
// This file also implements MachineInstrInfo and MachineCacheInfo.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/MachineInstrInfo.h"
|
||||
#include "llvm/Target/MachineCacheInfo.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -85,3 +87,27 @@ MachineInstrInfo::constantFitsInImmedField(MachineOpCode opCode,
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// class MachineCacheInfo
|
||||
//
|
||||
// Purpose:
|
||||
// Describes properties of the target cache architecture.
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
/*ctor*/
|
||||
MachineCacheInfo::MachineCacheInfo(const TargetMachine& tgt)
|
||||
: target(tgt)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void
|
||||
MachineCacheInfo::Initialize()
|
||||
{
|
||||
numLevels = 2;
|
||||
cacheLineSizes.push_back(16); cacheLineSizes.push_back(32);
|
||||
cacheSizes.push_back(1 << 15); cacheSizes.push_back(1 << 20);
|
||||
cacheAssoc.push_back(1); cacheAssoc.push_back(4);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user