[llvm] r260509 - Don't propagate dereferenceable attribute through gc.relocate in InstCombine
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 05:11:31 PST 2016
----- Original Message -----
> From: "Artur Pilipenko via llvm-commits" <llvm-commits at lists.llvm.org>
> To: llvm-commits at lists.llvm.org
> Sent: Thursday, February 11, 2016 5:22:46 AM
> Subject: [llvm] r260509 - Don't propagate dereferenceable attribute through gc.relocate in InstCombine
>
> Author: apilipenko
> Date: Thu Feb 11 05:22:46 2016
> New Revision: 260509
>
> URL: http://llvm.org/viewvc/llvm-project?rev=260509&view=rev
> Log:
> Don't propagate dereferenceable attribute through gc.relocate in
> InstCombine
In the future, please make sure that the rationale for a change is included in the commit message. The review summary said, "There is no need to propagate dereferenceable attribute through gc.relocate because isDereferenceableAndAligned pointer looks through relocations."
-Hal
>
> Reviewed By: reames
>
> Differential Revision: http://reviews.llvm.org/D16143
>
> Modified:
> llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
> llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll
>
> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=260509&r1=260508&r2=260509&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Thu
> Feb 11 05:22:46 2016
> @@ -1850,12 +1850,6 @@ Instruction *InstCombiner::visitCallInst
> // isKnownNonNull -> nonnull attribute
> if (isKnownNonNullAt(DerivedPtr, II, DT, TLI))
> II->addAttribute(AttributeSet::ReturnIndex,
> Attribute::NonNull);
> -
> - // isDereferenceablePointer -> deref attribute
> - if (isDereferenceablePointer(DerivedPtr, DL))
> - if (Argument *A = dyn_cast<Argument>(DerivedPtr))
> - II->addDereferenceableAttr(AttributeSet::ReturnIndex,
> - A->getDereferenceableBytes());
> }
>
> // TODO: bitcast(relocate(p)) -> relocate(bitcast(p))
>
> Modified: llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll?rev=260509&r1=260508&r2=260509&view=diff
> ==============================================================================
> --- llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll (original)
> +++ llvm/trunk/test/Transforms/InstCombine/gc.relocate.ll Thu Feb 11
> 05:22:46 2016
> @@ -9,17 +9,6 @@ declare zeroext i1 @return_i1()
> declare token @llvm.experimental.gc.statepoint.p0f_i1f(i64, i32, i1
> ()*, i32, i32, ...)
> declare i32 addrspace(1)*
> @llvm.experimental.gc.relocate.p1i32(token, i32, i32)
>
> -define i32 addrspace(1)* @deref(i32 addrspace(1)* dereferenceable(8)
> %dparam) gc "statepoint-example" {
> -; Checks that a dereferenceabler pointer
> -; CHECK-LABEL: @deref
> -; CHECK: call dereferenceable(8)
> -entry:
> - %load = load i32, i32 addrspace(1)* %dparam
> - %tok = tail call token (i64, i32, i1 ()*, i32, i32, ...)
> @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()*
> @return_i1, i32 0, i32 0, i32 0, i32 0, i32 addrspace(1)* %dparam)
> - %relocate = call i32 addrspace(1)*
> @llvm.experimental.gc.relocate.p1i32(token %tok, i32 7, i32 7)
> - ret i32 addrspace(1)* %relocate
> -}
> -
> define i32 @explicit_nonnull(i32 addrspace(1)* nonnull %dparam) gc
> "statepoint-example" {
> ; Checks that a nonnull pointer
> ; CHECK-LABEL: @explicit_nonnull
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list