1 //===- ProfileInfo.cpp - Profile Info Interface ---------------------------===//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
10 // This file implements the abstract ProfileInfo interface, and the default
11 // "no profile" implementation.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/Analysis/ProfileInfo.h"
16 #include "llvm/Pass.h"
19 // Register the AliasAnalysis interface, providing a nice name to refer to.
21 RegisterAnalysisGroup<ProfileInfo> Z("Profile Information");
24 ProfileInfo::~ProfileInfo() {}
27 //===----------------------------------------------------------------------===//
28 // NoProfile ProfileInfo implementation
32 struct NoProfileInfo : public ImmutablePass, public ProfileInfo {
33 unsigned getExecutionCount(BasicBlock *BB) { return 0; }
36 // Register this pass...
37 RegisterOpt<NoProfileInfo>
38 X("no-profile", "No Profile Information");
40 // Declare that we implement the AliasAnalysis interface
41 RegisterAnalysisGroup<ProfileInfo, NoProfileInfo> Y;
42 } // End of anonymous namespace