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
20namespace llvm {
21
22namespace dxil {
23
24// Store the underlying type and the number of pointer indirections
26
27/// An analysis to compute the \c PointerTypes for pointers in a \c Module.
28/// Since this analysis is only run during codegen and the new pass manager
29/// doesn't support codegen passes, this is wrtten as a function in a namespace.
30/// It is very simple to transform it into a proper analysis pass.
31/// This code relies on typed pointers existing as LLVM types, but could be
32/// migrated to a custom Type if PointerType loses typed support.
33namespace PointerTypeAnalysis {
34
35/// Compute the \c PointerTypeMap for the module \c M.
36PointerTypeMap run(const Module &M);
37} // namespace PointerTypeAnalysis
38
39} // namespace dxil
40
41} // namespace llvm
42
43#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