LLVM 19.0.0git
PointerTypeAnalysis.h
Go to the documentation of this file.
1//===- Target/DirectX/PointerTypeAnalysis.h - PointerType analysis --------===//
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//
9// Analysis pass to assign types to opaque pointers.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TARGET_DIRECTX_POINTERTYPEANALYSIS_H
14#define LLVM_TARGET_DIRECTX_POINTERTYPEANALYSIS_H
15
16#include "llvm/ADT/DenseMap.h"
17#include "llvm/IR/PassManager.h"
19#include "llvm/IR/Value.h"
20
21namespace llvm {
22
23namespace dxil {
24
25// Store the underlying type and the number of pointer indirections
27
28/// An analysis to compute the \c PointerTypes for pointers in a \c Module.
29/// Since this analysis is only run during codegen and the new pass manager
30/// doesn't support codegen passes, this is wrtten as a function in a namespace.
31/// It is very simple to transform it into a proper analysis pass.
32/// This code relies on typed pointers existing as LLVM types, but could be
33/// migrated to a custom Type if PointerType loses typed support.
34namespace PointerTypeAnalysis {
35
36/// Compute the \c PointerTypeMap for the module \c M.
37PointerTypeMap run(const Module &M);
38} // namespace PointerTypeAnalysis
39
40} // namespace dxil
41
42} // namespace llvm
43
44#endif // LLVM_TARGET_DIRECTX_POINTERTYPEANALYSIS_H
This file defines the DenseMap class.
This header defines various interfaces for pass management in LLVM.
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18