UnrollLoop.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //===- llvm/Transforms/Utils/UnrollLoop.h - Unrolling utilities -*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file defines some loop unrolling utilities. It does not define any
  11. // actual pass or policy, but provides a single function to perform loop
  12. // unrolling.
  13. //
  14. //===----------------------------------------------------------------------===//
  15. #ifndef LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
  16. #define LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
  17. #include "llvm/ADT/StringRef.h"
  18. namespace llvm {
  19. class AssumptionCache;
  20. class Loop;
  21. class LoopInfo;
  22. class LPPassManager;
  23. class MDNode;
  24. class Pass;
  25. bool UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool AllowRuntime,
  26. bool AllowExpensiveTripCount, unsigned TripMultiple,
  27. LoopInfo *LI, Pass *PP, LPPassManager *LPM,
  28. AssumptionCache *AC);
  29. bool UnrollRuntimeLoopProlog(Loop *L, unsigned Count,
  30. bool AllowExpensiveTripCount, LoopInfo *LI,
  31. LPPassManager *LPM);
  32. MDNode *GetUnrollMetadata(MDNode *LoopID, StringRef Name);
  33. }
  34. #endif