[PATCH] D126689: [IR] Enable opaque pointers by default
Mikael Holmén via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 17 01:51:27 PDT 2023
uabelho added a comment.
Herald added subscribers: gysit, Dinistro, bviyer, jplehr, Moerafaat, kmitropoulou, zero9178, StephenFan.
Herald added a reviewer: dcaballe.
Hi @nikic,
I know I'm very late to the party with this, but I just noticed that since opaque pointers got turned on by default, the following program does not yield an error anymore when read by opt or llc:
declare void @bar(i16)
define void @foo() {
entry:
call void @bar(float 1.000000e+0)
ret void
}
With typed pointers opt and llc would fail directly with
opt: test.ll:5:13: error: '@bar' defined with type 'void (i16)*' but expected 'void (float)*'
call void @bar(float 1.000000e+00)
^
but now, since all pointers are just pointers, noone seems to bother about the mismatching parameter type.
The verifier doesn't complain either. Maybe it should be improved to explicitly check parameter types now that we won't get that for free via the function pointer type?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126689/new/
https://reviews.llvm.org/D126689
More information about the cfe-commits
mailing list