SnippetFile.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //===-- SnippetFile.cpp -----------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. ///
  9. /// \file
  10. /// Utilities to read a snippet file.
  11. /// Snippet files are just asm files with additional comments to specify which
  12. /// registers should be defined or are live on entry.
  13. ///
  14. //===----------------------------------------------------------------------===//
  15. #ifndef LLVM_TOOLS_LLVM_EXEGESIS_SNIPPETFILE_H
  16. #define LLVM_TOOLS_LLVM_EXEGESIS_SNIPPETFILE_H
  17. #include "BenchmarkCode.h"
  18. #include "LlvmState.h"
  19. #include "llvm/Support/Error.h"
  20. #include <vector>
  21. namespace llvm {
  22. namespace exegesis {
  23. // Reads code snippets from file `Filename`.
  24. Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
  25. StringRef Filename);
  26. } // namespace exegesis
  27. } // namespace llvm
  28. #endif