LLVM: lib/Transforms/Utils/CanonicalizeAliases.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
35
36using namespace llvm;
37
38namespace {
39
42 auto *NewAliasee = canonicalizeAlias(GA->getAliasee(), Changed);
43 if (NewAliasee != GA->getAliasee()) {
44 GA->setAliasee(NewAliasee);
46 }
47 return NewAliasee;
48 }
49
51 if (!CE)
52 return C;
53
54 std::vector<Constant *> Ops;
55 for (Use &U : CE->operands())
57 return CE->getWithOperands(Ops);
58}
59
60
61static bool canonicalizeAliases(Module &M) {
63 for (auto &GA : M.aliases())
64 canonicalizeAlias(&GA, Changed);
66}
67}
68
71 if (!canonicalizeAliases(M))
73
75}
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Module.h This file contains the declarations for the Module class.
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Definition CanonicalizeAliases.cpp:69
This is an important base class in LLVM.
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
A Use represents the edge between a Value definition and its users.
@ C
The default llvm calling convention, compatible with C.
@ CE
Windows NT (Windows on ARM)
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.