[PATCH] D33946: [InlineCost] Find identical loads in the callee
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 14:08:12 PDT 2017
hfinkel added inline comments.
================
Comment at: lib/Analysis/InlineCost.cpp:1133
+ case Intrinsic::dbg_value:
+ // These intrinsics don't clobber loads so that we don't need to
+ // disable load elimination.
----------------
haicheng wrote:
> hfinkel wrote:
> > llvm.ptr.annotation seems like it might belong in this list too (maybe this is the same list as isAssumeLikeIntrinsic in ValueTracking.cpp?).
> I think all free intrinsics can be put here including (see TargetTransformInfoImpl.h getIntrinsicCost()):
>
> Intrinsic::annotation:
> Intrinsic::assume:
> Intrinsic::dbg_declare:
> Intrinsic::dbg_value:
> Intrinsic::invariant_start:
> Intrinsic::invariant_end:
> Intrinsic::lifetime_start:
> Intrinsic::lifetime_end:
> Intrinsic::objectsize:
> Intrinsic::ptr_annotation:
> Intrinsic::var_annotation:
> Intrinsic::experimental_gc_result:
> Intrinsic::experimental_gc_relocate:
> Intrinsic::coro_alloc:
> Intrinsic::coro_begin:
> Intrinsic::coro_free:
> Intrinsic::coro_end:
> Intrinsic::coro_frame:
> Intrinsic::coro_size:
> Intrinsic::coro_suspend:
> Intrinsic::coro_param:
> Intrinsic::coro_subfn_addr:
>
> What do you think?
>
That seems dangerous. I don't think it's a good idea to derive semantic information from the cost model.
Repository:
rL LLVM
https://reviews.llvm.org/D33946
More information about the llvm-commits
mailing list