[PATCH] D91250: Support intrinsic overloading on anonymous struct based types
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 12:39:45 PST 2020
jeroen.dobbelaere updated this revision to Diff 304933.
jeroen.dobbelaere edited the summary of this revision.
jeroen.dobbelaere added a comment.
This new version uses a different approach: we now work by 'uniquifying' the initial BaseName of an intrinsic mangled named when it is based on an anonymous struct.
As an example, the testcase from D68484#2372356 <https://reviews.llvm.org/D68484#2372356> now results in:
%0 = type { i32 }
%1 = type { i32 }
define void @bar01(%0* %ptr0, %1* %ptr1) {
%1 = call i8* @llvm.noalias.decl.p0i8.p0p0s_s.i64.0(%0** null, i64 0, metadata !0)
%2 = call %0* @llvm.noalias.p0s_s.p0i8.p0p0s_s.i64.0(%0* %ptr0, i8* %1, %0** null, i64 0, metadata !0)
store %0 zeroinitializer, %0* %2, align 4, !noalias !0
%3 = call i8* @llvm.noalias.decl.p0i8.p0p0s_s.i64.1(%1** null, i64 0, metadata !3)
%4 = call %1* @llvm.noalias.p0s_s.p0i8.p0p0s_s.i64.1(%1* %ptr1, i8* %3, %1** null, i64 0, metadata !3)
store %1 zeroinitializer, %1* %4, align 4, !noalias !3
ret void
}
; Function Attrs: argmemonly nounwind
declare i8* @llvm.noalias.decl.p0i8.p0p0s_s.i64.0(%0**, i64, metadata) #0
; Function Attrs: argmemonly nounwind speculatable
declare %0* @llvm.noalias.p0s_s.p0i8.p0p0s_s.i64.0(%0*, i8*, %0**, i64, metadata) #1
; Function Attrs: argmemonly nounwind
declare i8* @llvm.noalias.decl.p0i8.p0p0s_s.i64.1(%1**, i64, metadata) #0
; Function Attrs: argmemonly nounwind speculatable
declare %1* @llvm.noalias.p0s_s.p0i8.p0p0s_s.i64.1(%1*, i8*, %1**, i64, metadata) #1
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91250/new/
https://reviews.llvm.org/D91250
Files:
llvm/include/llvm/IR/Intrinsics.h
llvm/include/llvm/IR/Module.h
llvm/lib/IR/Function.cpp
llvm/lib/IR/Module.cpp
llvm/lib/IR/Verifier.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91250.304933.patch
Type: text/x-patch
Size: 10317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201112/5e88869c/attachment.bin>
More information about the llvm-commits
mailing list