xref: /llvm-project/llvm/tools/llvm-exegesis/lib/SnippetFile.h (revision f0655b0d06129330f710b3cb9955cec7e778bfd0)
13e13816bSClement Courbet //===-- SnippetFile.cpp -----------------------------------------*- C++ -*-===//
23e13816bSClement Courbet //
33e13816bSClement Courbet // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
43e13816bSClement Courbet // See https://llvm.org/LICENSE.txt for license information.
53e13816bSClement Courbet // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
63e13816bSClement Courbet //
73e13816bSClement Courbet //===----------------------------------------------------------------------===//
83e13816bSClement Courbet ///
93e13816bSClement Courbet /// \file
103e13816bSClement Courbet /// Utilities to read a snippet file.
113e13816bSClement Courbet /// Snippet files are just asm files with additional comments to specify which
123e13816bSClement Courbet /// registers should be defined or are live on entry.
133e13816bSClement Courbet ///
143e13816bSClement Courbet //===----------------------------------------------------------------------===//
153e13816bSClement Courbet 
163e13816bSClement Courbet #ifndef LLVM_TOOLS_LLVM_EXEGESIS_SNIPPETFILE_H
173e13816bSClement Courbet #define LLVM_TOOLS_LLVM_EXEGESIS_SNIPPETFILE_H
183e13816bSClement Courbet 
193e13816bSClement Courbet #include "BenchmarkCode.h"
20*f0655b0dSAiden Grossman #include "BenchmarkRunner.h"
213e13816bSClement Courbet #include "LlvmState.h"
223e13816bSClement Courbet #include "llvm/Support/Error.h"
233e13816bSClement Courbet 
243e13816bSClement Courbet #include <vector>
253e13816bSClement Courbet 
263e13816bSClement Courbet namespace llvm {
273e13816bSClement Courbet namespace exegesis {
283e13816bSClement Courbet 
293e13816bSClement Courbet // Reads code snippets from file `Filename`.
303e13816bSClement Courbet Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
313e13816bSClement Courbet                                                   StringRef Filename);
323e13816bSClement Courbet 
333e13816bSClement Courbet } // namespace exegesis
343e13816bSClement Courbet } // namespace llvm
353e13816bSClement Courbet 
363e13816bSClement Courbet #endif
37