diff options
| author | Clement Courbet <courbet@google.com> | 2018-10-25 07:44:01 +0000 |
|---|---|---|
| committer | Clement Courbet <courbet@google.com> | 2018-10-25 07:44:01 +0000 |
| commit | 41c8af3924ca539faa3ea871f09ab37ba7f3b7d1 (patch) | |
| tree | 068a77624d5c7aa8fd8c0be3ec4457ae58537236 /llvm/tools/llvm-exegesis/llvm-exegesis.cpp | |
| parent | 128fcffb062789a77d65ce2966ffa0ef718e3d47 (diff) | |
| download | bcm5719-llvm-41c8af3924ca539faa3ea871f09ab37ba7f3b7d1.tar.gz bcm5719-llvm-41c8af3924ca539faa3ea871f09ab37ba7f3b7d1.zip | |
[MCSched] Bind PFM Counters to the CPUs instead of the SchedModel.
Summary:
The pfm counters are now in the ExegesisTarget rather than the
MCSchedModel (PR39165).
This also compresses the pfm counter tables (PR37068).
Reviewers: RKSimon, gchatelet
Subscribers: mgrang, llvm-commits
Differential Revision: https://reviews.llvm.org/D52932
llvm-svn: 345243
Diffstat (limited to 'llvm/tools/llvm-exegesis/llvm-exegesis.cpp')
| -rw-r--r-- | llvm/tools/llvm-exegesis/llvm-exegesis.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp index 689a1e097c6..a28e68ec006 100644 --- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp +++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp @@ -94,6 +94,13 @@ static cl::opt<std::string> AnalysisInconsistenciesOutputFile("analysis-inconsistencies-output-file", cl::desc(""), cl::init("-")); +static cl::opt<std::string> + CpuName("mcpu", + cl::desc( + "cpu name to use for pfm counters, leave empty to autodetect"), + cl::init("")); + + static ExitOnError ExitOnErr; #ifdef LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET @@ -321,7 +328,7 @@ void benchmarkMain() { LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET(); #endif - const LLVMState State; + const LLVMState State(CpuName); const auto Opcodes = getOpcodesOrDie(State.getInstrInfo()); std::vector<BenchmarkCode> Configurations; @@ -399,7 +406,7 @@ static void analysisMain() { llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetDisassembler(); // Read benchmarks. - const LLVMState State; + const LLVMState State(""); const std::vector<InstructionBenchmark> Points = ExitOnErr(InstructionBenchmark::readYamls(State, BenchmarkFile)); llvm::outs() << "Parsed " << Points.size() << " benchmark points\n"; |

