-// $Id$ -*-c++-*-
-//***************************************************************************
-// File:
-// MachineCacheInfo.h
+//===-- llvm/Target/TargetCacheInfo.h ---------------------------*- C++ -*-===//
//
-// Purpose:
-// Describes properties of the target cache architecture.
-//**************************************************************************/
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Describes properties of the target cache architecture.
+//
+//===----------------------------------------------------------------------===//
-#ifndef LLVM_TARGET_MACHINECACHEINFO_H
-#define LLVM_TARGET_MACHINECACHEINFO_H
+#ifndef LLVM_TARGET_TARGETCACHEINFO_H
+#define LLVM_TARGET_TARGETCACHEINFO_H
-#include "llvm/Target/TargetMachine.h"
#include "Support/DataTypes.h"
-#include <vector>
+namespace llvm {
-//---------------------------------------------------------------------------
-// class MachineCacheInfo
-//
-// Purpose:
-// Describes properties of the target cache architecture.
-//---------------------------------------------------------------------------
+class TargetMachine;
-class MachineCacheInfo : public NonCopyableV {
-public:
- const TargetMachine& target;
-
+struct TargetCacheInfo {
+ const TargetMachine ⌖
+ TargetCacheInfo(const TargetCacheInfo&); // DO NOT IMPLEMENT
+ void operator=(const TargetCacheInfo&); // DO NOT IMPLEMENT
protected:
unsigned int numLevels;
std::vector<unsigned short> cacheLineSizes;
std::vector<unsigned short> cacheAssoc;
public:
- /*ctor*/ MachineCacheInfo (const TargetMachine& tgt);
- /*dtor*/ virtual ~MachineCacheInfo () {}
+ TargetCacheInfo(const TargetMachine& tgt) : target(tgt) {
+ Initialize();
+ }
+ virtual ~TargetCacheInfo() {}
// Default parameters are:
// NumLevels = 2
}
};
-
-//---------------------------------------------------------------------------
+} // End llvm namespace
#endif