LLVM  16.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 
20 namespace llvm {
21 
22 namespace 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.
33 namespace PointerTypeAnalysis {
34 
35 /// Compute the \c PointerTypeMap for the module \c M.
36 PointerTypeMap run(const Module &M);
37 } // namespace PointerTypeAnalysis
38 
39 } // namespace dxil
40 
41 } // namespace llvm
42 
43 #endif // LLVM_TARGET_DIRECTX_POINTERTYPEANALYSIS_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
DenseMap.h
llvm::dxil::PointerTypeAnalysis::run
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
Definition: PointerTypeAnalysis.cpp:189
llvm::DenseMap< const Value *, Type * >
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
PassManager.h
TypedPointerType.h