2004-02-10 22:11:42 +00:00
|
|
|
//===- ProfileInfo.cpp - Profile Info Interface ---------------------------===//
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the abstract ProfileInfo interface, and the default
|
|
|
|
// "no profile" implementation.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/Analysis/ProfileInfo.h"
|
|
|
|
#include "llvm/Pass.h"
|
|
|
|
using namespace llvm;
|
|
|
|
|
2004-02-11 06:10:18 +00:00
|
|
|
// Register the ProfileInfo interface, providing a nice name to refer to.
|
2004-02-10 22:11:42 +00:00
|
|
|
namespace {
|
|
|
|
RegisterAnalysisGroup<ProfileInfo> Z("Profile Information");
|
|
|
|
}
|
|
|
|
|
|
|
|
ProfileInfo::~ProfileInfo() {}
|
|
|
|
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// NoProfile ProfileInfo implementation
|
|
|
|
//
|
|
|
|
|
|
|
|
namespace {
|
2004-03-08 21:30:35 +00:00
|
|
|
struct NoProfileInfo : public ImmutablePass, public ProfileInfo {};
|
2004-02-10 22:11:42 +00:00
|
|
|
|
|
|
|
// Register this pass...
|
|
|
|
RegisterOpt<NoProfileInfo>
|
|
|
|
X("no-profile", "No Profile Information");
|
|
|
|
|
2004-02-11 06:10:18 +00:00
|
|
|
// Declare that we implement the ProfileInfo interface
|
2004-02-11 04:47:54 +00:00
|
|
|
RegisterAnalysisGroup<ProfileInfo, NoProfileInfo, true> Y;
|
2004-02-10 22:11:42 +00:00
|
|
|
} // End of anonymous namespace
|