SerialSnippetGenerator.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //===-- SerialSnippetGenerator.h --------------------------------*- 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. /// A SnippetGenerator implementation to create serial instruction snippets.
  11. ///
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_TOOLS_LLVM_EXEGESIS_SERIALSNIPPETGENERATOR_H
  14. #define LLVM_TOOLS_LLVM_EXEGESIS_SERIALSNIPPETGENERATOR_H
  15. #include "Error.h"
  16. #include "MCInstrDescView.h"
  17. #include "SnippetGenerator.h"
  18. namespace llvm {
  19. namespace exegesis {
  20. class SerialSnippetGenerator : public SnippetGenerator {
  21. public:
  22. using SnippetGenerator::SnippetGenerator;
  23. ~SerialSnippetGenerator() override;
  24. Expected<std::vector<CodeTemplate>>
  25. generateCodeTemplates(InstructionTemplate Variant,
  26. const BitVector &ForbiddenRegisters) const override;
  27. };
  28. } // namespace exegesis
  29. } // namespace llvm
  30. #endif // LLVM_TOOLS_LLVM_EXEGESIS_SERIALSNIPPETGENERATOR_H