Currently the pointer argument of lifetime intrinsics is still in address space 0. When the alloca address is not 0, there is invalid bitcast instruction.
This patch changes pointer argument of lifetime intrinsics to point to alloca address space.
Paths
| Differential D31717
CodeGen: Let lifetime intrinsic use alloca address space ClosedPublic Authored by yaxunl on Apr 5 2017, 10:46 AM.
Details Summary Currently the pointer argument of lifetime intrinsics is still in address space 0. When the alloca address is not 0, there is invalid bitcast instruction. This patch changes pointer argument of lifetime intrinsics to point to alloca address space.
Diff Detail Event TimelineComment Actions
I did not know you already have a patch. Can you add reviewers to it? The only difference is that I added AllocaInt8PtrTy to CodeGenModule and a lit test for non-zero alloca addr space. I can rebase my patch on top of yours. Or I can drop this patch and add the lit test to your patch. Comment Actions I had the part for non-0 alloca too, but not sure if I posted it. It's in my GitHub branch Comment Actions
For that one we'd better stick to https://reviews.llvm.org/D31404 since the review is almost done. I will acknowledge your contribution and others in the commit message. yaxunl retitled this revision from CodeGen: Emit lifetime intrinsics with pointer argument in alloca address space to CodeGen: Let lifetime intrinsic use alloca address space. Comment ActionsRebased. Comment Actions LGTM
This revision is now accepted and ready to land.Apr 13 2017, 11:31 AM Closed by commit rL300485: CodeGen: Let lifetime intrinsic use alloca address space (authored by yaxunl). · Explain WhyApr 17 2017, 1:16 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 94256 lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenTypeCache.h
test/CodeGen/cleanup-destslot-simple.c
test/CodeGen/lifetime-asan.c
test/CodeGen/lifetime.c
test/CodeGen/lifetime2.c
test/CodeGen/temporary-lifetime-exceptions.cpp
test/CodeGen/temporary-lifetime.cpp
test/CodeGenCXX/destructors.cpp
test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
test/CodeGenCXX/nrvo.cpp
test/CodeGenCXX/stack-reuse-miscompile.cpp
test/CodeGenCXX/stack-reuse.cpp
test/CodeGenObjC/arc-blocks.m
test/CodeGenObjC/arc-bridged-cast.m
test/CodeGenObjC/arc-literals.m
test/CodeGenObjC/arc-precise-lifetime.m
test/CodeGenObjC/arc-ternary-op.m
test/CodeGenObjC/arc.m
test/CodeGenObjC/exceptions.m
test/CodeGenObjCXX/arc-move.mm
test/CodeGenObjCXX/arc-references.mm
test/CodeGenObjCXX/arc.mm
test/CodeGenObjCXX/literals.mm
|