GIMatchDagPredicateDependencyEdge.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //===- GIMatchDagPredicateDependencyEdge.cpp - Have inputs before check ---===//
  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. #include "GIMatchDagPredicateDependencyEdge.h"
  9. #include "GIMatchDagInstr.h"
  10. #include "GIMatchDagOperands.h"
  11. #include "GIMatchDagPredicate.h"
  12. #include "llvm/Support/raw_ostream.h"
  13. using namespace llvm;
  14. LLVM_DUMP_METHOD void
  15. GIMatchDagPredicateDependencyEdge::print(raw_ostream &OS) const {
  16. OS << getRequiredMI()->getName();
  17. if (getRequiredMO())
  18. OS << "[" << getRequiredMO()->getName() << "]";
  19. OS << " ==> " << getPredicate()->getName() << "["
  20. << getPredicateOp()->getName() << "]";
  21. }
  22. #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  23. LLVM_DUMP_METHOD void GIMatchDagPredicateDependencyEdge::dump() const {
  24. print(errs());
  25. }
  26. #endif // if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  27. raw_ostream &llvm::operator<<(raw_ostream &OS,
  28. const GIMatchDagPredicateDependencyEdge &E) {
  29. E.print(OS);
  30. return OS;
  31. }