-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathbranch_frequencies_aggregator.h
More file actions
28 lines (23 loc) · 1.03 KB
/
branch_frequencies_aggregator.h
File metadata and controls
28 lines (23 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef AUTOFDO_BRANCH_FREQUENCIES_AGGREGATOR_H_
#define AUTOFDO_BRANCH_FREQUENCIES_AGGREGATOR_H_
#include "branch_frequencies.h"
#include "llvm_propeller_binary_content.h"
#include "llvm_propeller_options.pb.h"
#include "llvm_propeller_statistics.h"
#include "third_party/abseil/absl/status/statusor.h"
namespace devtools_crosstool_autofdo {
// `BranchFrequenciesAggregator` is an abstraction around producing
// `BranchFrequencies`, making the source of the frequency information opaque to
// the user.
class BranchFrequenciesAggregator {
public:
virtual ~BranchFrequenciesAggregator() = default;
// Returns `BranchFrequencies` for the specified binary according to the given
// options, or an `absl::Status` if valid branch frequencies can't be
// produced.
virtual absl::StatusOr<BranchFrequencies> AggregateBranchFrequencies(
const PropellerOptions& options, const BinaryContent& binary_content,
PropellerStats& stats) = 0;
};
} // namespace devtools_crosstool_autofdo
#endif // AUTOFDO_BRANCH_FREQUENCIES_AGGREGATOR_H_