@@ -91,25 +91,39 @@ Transition Plan
91
91
===============
92
92
93
93
LLVM currently has many places that depend on pointee types. Each dependency on
94
- pointee types needs to be resolved in some way or another.
94
+ pointee types needs to be resolved in some way or another. This essentially
95
+ translates to figuring out how to remove all calls to
96
+ ``PointerType::getElementType `` and ``Type::getPointerElementType() ``.
95
97
96
98
Making everything use opaque pointers in one huge commit is infeasible. This
97
99
needs to be done incrementally. The following steps need to be done, in no
98
100
particular order:
99
101
100
102
* Introduce the opaque pointer type
101
103
102
- * Various ABI attributes and instructions that need a type can be changed one at
103
- a time
104
+ * Already done
104
105
105
- * This has already happened for many instructions like loads, stores, GEPs,
106
+ * Remove remaining in-tree users of pointee types
107
+
108
+ * There are many miscellaneous uses that should be cleaned up individually
109
+
110
+ * Some of the larger use cases are mentioned below
111
+
112
+ * Various ABI attributes and instructions that rely on pointee types need to be
113
+ modified to specify the type separately
114
+
115
+ * This has already happened for all instructions like loads, stores, GEPs,
106
116
and various attributes like ``byval ``
107
117
108
- * Fix up existing in-tree users of pointee types to not rely on LLVM pointer
109
- pointee types
118
+ * More cases may be found as work continues
110
119
111
- * Specifically ``PointerType::getElementType `` and
112
- ``Type::getPointerElementType() ``
120
+ * Remove calls to and deprecate ``IRBuilder `` methods that rely on pointee types
121
+
122
+ * For example, some of the ``IRBuilder::CreateGEP() `` methods use the pointer
123
+ operand's pointee type to determine the GEP operand type
124
+
125
+ * Some methods are already deprecated with ``LLVM_ATTRIBUTE_DEPRECATED ``, such
126
+ as some overloads of ``IRBuilder::CreateLoad() ``
113
127
114
128
* Allow bitcode auto-upgrade of legacy pointer type to the new opaque pointer
115
129
type (not to be turned on until ready)
@@ -123,9 +137,15 @@ particular order:
123
137
124
138
* This is mostly Clang, see ``clang::CodeGen::Address::getElementType() ``
125
139
140
+ * Figure out how to name overloaded intrinsics with pointer parameters
141
+
142
+ * See ``getMangledTypeStr() ``
143
+
126
144
* Add option to internally treat all pointer types opaque pointers and see what
127
145
breaks, starting with LLVM tests, then run Clang over large codebases
128
146
147
+ * We don't want to start mass-updating tests until we're fairly confident that opaque pointers won't cause major issues
148
+
129
149
* Replace legacy pointer types in LLVM tests with opaque pointer types
130
150
131
151
Frontend Migration Steps
0 commit comments