CalledValuePropagation.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- CalledValuePropagation.h - Propagate called values -------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file implements a transformation that attaches !callees metadata to
  15. // indirect call sites. For a given call site, the metadata, if present,
  16. // indicates the set of functions the call site could possibly target at
  17. // run-time. This metadata is added to indirect call sites when the set of
  18. // possible targets can be determined by analysis and is known to be small. The
  19. // analysis driving the transformation is similar to constant propagation and
  20. // makes uses of the generic sparse propagation solver.
  21. //
  22. //===----------------------------------------------------------------------===//
  23. #ifndef LLVM_TRANSFORMS_IPO_CALLEDVALUEPROPAGATION_H
  24. #define LLVM_TRANSFORMS_IPO_CALLEDVALUEPROPAGATION_H
  25. #include "llvm/IR/PassManager.h"
  26. namespace llvm {
  27. class CalledValuePropagationPass
  28. : public PassInfoMixin<CalledValuePropagationPass> {
  29. public:
  30. PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
  31. };
  32. } // namespace llvm
  33. #endif // LLVM_TRANSFORMS_IPO_CALLEDVALUEPROPAGATION_H
  34. #ifdef __GNUC__
  35. #pragma GCC diagnostic pop
  36. #endif