Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. //===- LowerConstantIntrinsics.h - Lower constant int. pass -*- 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. /// \file
  9. ///
  10. /// The header file for the LowerConstantIntrinsics pass as used by the new pass
  11. /// manager.
  12. ///
  13. //===----------------------------------------------------------------------===//
  14.  
  15. #ifndef LLVM_TRANSFORMS_SCALAR_LOWERCONSTANTINTRINSICS_H
  16. #define LLVM_TRANSFORMS_SCALAR_LOWERCONSTANTINTRINSICS_H
  17.  
  18. #include "llvm/IR/PassManager.h"
  19.  
  20. namespace llvm {
  21.  
  22. class Function;
  23.  
  24. struct LowerConstantIntrinsicsPass :
  25.     PassInfoMixin<LowerConstantIntrinsicsPass> {
  26. public:
  27.   explicit LowerConstantIntrinsicsPass() = default;
  28.  
  29.   /// Run the pass over the function.
  30.   ///
  31.   /// This will lower all remaining 'objectsize' and 'is.constant'`
  32.   /// intrinsic calls in this function, even when the argument has no known
  33.   /// size or is not a constant respectively. The resulting constant is
  34.   /// propagated and conditional branches are resolved where possible.
  35.   /// This complements the Instruction Simplification and
  36.   /// Instruction Combination passes of the optimized pass chain.
  37.   PreservedAnalyses run(Function &F, FunctionAnalysisManager &);
  38. };
  39.  
  40. }
  41.  
  42. #endif
  43.