ReducibilityAnalysis.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // ReducibilityAnalysis.h //
  4. // Copyright (C) Microsoft Corporation. All rights reserved. //
  5. // This file is distributed under the University of Illinois Open Source //
  6. // License. See LICENSE.TXT for details. //
  7. // //
  8. // Implements reducibility analysis pass. //
  9. // //
  10. ///////////////////////////////////////////////////////////////////////////////
  11. #pragma once
  12. namespace llvm {
  13. class Module;
  14. class Function;
  15. class PassRegistry;
  16. class FunctionPass;
  17. enum class IrreducibilityAction {
  18. ThrowException,
  19. PrintLog,
  20. Ignore,
  21. };
  22. extern char &ReducibilityAnalysisID;
  23. llvm::FunctionPass *createReducibilityAnalysisPass(IrreducibilityAction Action = IrreducibilityAction::ThrowException);
  24. void initializeReducibilityAnalysisPass(llvm::PassRegistry&);
  25. bool IsReducible(const llvm::Module &M, IrreducibilityAction Action = IrreducibilityAction::ThrowException);
  26. bool IsReducible(const llvm::Function &F, IrreducibilityAction Action = IrreducibilityAction::ThrowException);
  27. }