diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2018-08-03 09:29:38 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2018-08-03 09:29:38 +0000 |
commit | e60866a4e057e29004c3978e6f312c506a30b940 (patch) | |
tree | e8951faec822fc87dc4b046248e0c9132abd88e9 /llvm/tools/llvm-exegesis/lib/Latency.cpp | |
parent | d62c5ec2fe374dc00bcd315abbee9839b80457b2 (diff) | |
download | bcm5719-llvm-e60866a4e057e29004c3978e6f312c506a30b940.tar.gz bcm5719-llvm-e60866a4e057e29004c3978e6f312c506a30b940.zip |
[llvm-exegesis] Renaming classes and functions.
Summary: Functional No Op.
Reviewers: gchatelet
Subscribers: tschuett, courbet, llvm-commits
Differential Revision: https://reviews.llvm.org/D50231
llvm-svn: 338836
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Latency.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/Latency.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Latency.cpp b/llvm/tools/llvm-exegesis/lib/Latency.cpp index 12bc8cd32b0..b8452ac35a8 100644 --- a/llvm/tools/llvm-exegesis/lib/Latency.cpp +++ b/llvm/tools/llvm-exegesis/lib/Latency.cpp @@ -42,7 +42,7 @@ llvm::Error LatencyBenchmarkRunner::isInfeasible( return llvm::Error::success(); } -llvm::Expected<SnippetPrototype> +llvm::Expected<CodeTemplate> LatencyBenchmarkRunner::generateTwoInstructionPrototype( const Instruction &Instr) const { std::vector<unsigned> Opcodes; @@ -68,28 +68,27 @@ LatencyBenchmarkRunner::generateTwoInstructionPrototype( setRandomAliasing(Forward, ThisIB, OtherIB); if (!Back.hasImplicitAliasing()) setRandomAliasing(Back, OtherIB, ThisIB); - SnippetPrototype Prototype; - Prototype.Explanation = - llvm::formatv("creating cycle through {0}.", - State.getInstrInfo().getName(OtherOpcode)); - Prototype.Snippet.push_back(std::move(ThisIB)); - Prototype.Snippet.push_back(std::move(OtherIB)); - return std::move(Prototype); + CodeTemplate CT; + CT.Info = llvm::formatv("creating cycle through {0}.", + State.getInstrInfo().getName(OtherOpcode)); + CT.Instructions.push_back(std::move(ThisIB)); + CT.Instructions.push_back(std::move(OtherIB)); + return std::move(CT); } return llvm::make_error<BenchmarkFailure>( "Infeasible : Didn't find any scheme to make the instruction serial"); } -llvm::Expected<SnippetPrototype> -LatencyBenchmarkRunner::generatePrototype(unsigned Opcode) const { +llvm::Expected<CodeTemplate> +LatencyBenchmarkRunner::generateCodeTemplate(unsigned Opcode) const { const auto &InstrDesc = State.getInstrInfo().get(Opcode); if (auto E = isInfeasible(InstrDesc)) return std::move(E); const Instruction Instr(InstrDesc, RATC); - if (auto SelfAliasingPrototype = generateSelfAliasingPrototype(Instr)) - return SelfAliasingPrototype; + if (auto CT = generateSelfAliasingCodeTemplate(Instr)) + return CT; else - llvm::consumeError(SelfAliasingPrototype.takeError()); + llvm::consumeError(CT.takeError()); // No self aliasing, trying to create a dependency through another opcode. return generateTwoInstructionPrototype(Instr); } |