[PATCH] D95734: Use alias analysis to remove redundant instrumentation for Asan

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 17:17:10 PST 2021


eugenis added a comment.

In my test the invalid load is not detected.

  %call = tail call noalias dereferenceable_or_null(4) i8* @malloc(i64 4) #5, !dbg !276
  %0 = bitcast i8* %call to i32*, !dbg !277
  call void @llvm.dbg.value(metadata i32* %0, metadata !274, metadata !DIExpression()), !dbg !275
  store i32 42, i32* %0, align 4, !dbg !278, !tbaa !279
  tail call void @_Z10deallocatePv(i8* %call), !dbg !283
  %1 = load i32, i32* %0, align 4, !dbg !284, !tbaa !279

Naturally, %0 in the store instruction MustAlias %0 in the load instruction! It is the same MemoryLocation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95734/new/

https://reviews.llvm.org/D95734



More information about the llvm-commits mailing list