Commit 8ff5355
Dmitry Sidorov
[NFCI] Remove getLifetimeStartIntrinsic function from SPIRVReader (#3373)
With new lifetime.start/end rules, which are:
"The argument is either a pointer to an alloca instruction or a poison
value."
it became obsolete on main branch. Note, no test is possible to add
on the main branch.
Moreover, it seem to be redundant overall, as IR like this was legal:
%0 = alloca ...
%1 = bitcast %0
call void @llvm.lifetime.start(..., %1)
%2 = bitcast %0
call void @llvm.lifetime.end(..., %2)
Further implecations, and why this patch will be backported on older
branches. Right now there is a possibility to have a round-trip
translation failed, when it goes from main to pre-opaque pointers
branches as a bitcast from alloca to i8* will be inserted before
lifetime.start call. Later, due to the current logic, this bitcast will
be reused for lifetime.end call. But, lifetime.end won't always
post-dominate
lifetime.start (in this case the object will be considered dead at
function return block), hence the bitcast won't dominate the
lifetime.stop call, invalidating the generated module.
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
---------
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>1 parent 095a8c2 commit 8ff5355
1 file changed
+0
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | 252 | | |
270 | 253 | | |
271 | 254 | | |
| |||
1884 | 1867 | | |
1885 | 1868 | | |
1886 | 1869 | | |
1887 | | - | |
1888 | | - | |
1889 | | - | |
1890 | 1870 | | |
1891 | 1871 | | |
1892 | 1872 | | |
| |||
0 commit comments