blob: a96dc4f2fc66fee83713f02e6c44785d10100225 [file] [log] [blame]
Chris Lattner171de652004-02-10 22:11:42 +00001//===- ProfileInfo.cpp - Profile Info Interface ---------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the abstract ProfileInfo interface, and the default
11// "no profile" implementation.
12//
13//===----------------------------------------------------------------------===//
14
15#include "llvm/Analysis/ProfileInfo.h"
16#include "llvm/Pass.h"
17using namespace llvm;
18
Chris Lattnerecefc962004-02-11 06:10:18 +000019// Register the ProfileInfo interface, providing a nice name to refer to.
Chris Lattner171de652004-02-10 22:11:42 +000020namespace {
21 RegisterAnalysisGroup<ProfileInfo> Z("Profile Information");
22}
23
24ProfileInfo::~ProfileInfo() {}
25
26
27//===----------------------------------------------------------------------===//
28// NoProfile ProfileInfo implementation
29//
30
31namespace {
Chris Lattner62e84f32004-03-08 21:30:35 +000032 struct NoProfileInfo : public ImmutablePass, public ProfileInfo {};
Chris Lattner171de652004-02-10 22:11:42 +000033
34 // Register this pass...
35 RegisterOpt<NoProfileInfo>
36 X("no-profile", "No Profile Information");
37
Chris Lattnerecefc962004-02-11 06:10:18 +000038 // Declare that we implement the ProfileInfo interface
Chris Lattnerb0601942004-02-11 04:47:54 +000039 RegisterAnalysisGroup<ProfileInfo, NoProfileInfo, true> Y;
Chris Lattner171de652004-02-10 22:11:42 +000040} // End of anonymous namespace