LLVM 20.0.0git
LowerConstantIntrinsics.h
Go to the documentation of this file.
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
20namespace llvm {
21
22class DominatorTree;
23class Function;
24class TargetLibraryInfo;
25
26bool lowerConstantIntrinsics(Function &F, const TargetLibraryInfo &TLI,
27 DominatorTree *DT);
28
30 PassInfoMixin<LowerConstantIntrinsicsPass> {
31public:
32 explicit LowerConstantIntrinsicsPass() = default;
33
34 /// Run the pass over the function.
35 ///
36 /// This will lower all remaining 'objectsize' and 'is.constant'`
37 /// intrinsic calls in this function, even when the argument has no known
38 /// size or is not a constant respectively. The resulting constant is
39 /// propagated and conditional branches are resolved where possible.
40 /// This complements the Instruction Simplification and
41 /// Instruction Combination passes of the optimized pass chain.
43};
44
45}
46
47#endif
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition: MD5.cpp:55
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool lowerConstantIntrinsics(Function &F, const TargetLibraryInfo &TLI, DominatorTree *DT)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)
Run the pass over the function.
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69