On 05/06/2016 03:25 PM, Jakub Jelinek wrote:
> Well, we already have the gimple poisoning/unpoisoning code on RTL (emitted
> after the prologue and before the epilogue), so it shouldn't be that hard.
> I'd only do the most common/easy cases inline though, like 1/2/4/8/16/32
> bytes long variables.
>
> Jakub
You are right, I didn't realize it earlier.
As I've collected statistics for tramp3d, poisoning code has following
distribution:
4:1.62%
8:3.53%
12:94.76%
which is quite interesting that 12B are such a common size :)
Probably due to a lot of time spent in ::evaluate (MultiArgEvaluator and
MultiArgEvaluator).
Considering just variables which needs_to_live_in_memory, tramp3d is still ~15x
slower.
Anyway profile report tells:
26.51% a.out libasan.so.3.0.0 [.] __asan::PoisonShadow
18.49% a.out libasan.so.3.0.0 [.] PoisonAlignedStackMemory
5.61% a.out libc-2.22.so [.] __memset_avx2
5.41% a.out a.out [.]
MultiArgEvaluator<RemoteMultiPatchEvaluatorTag>::evaluate<MultiArg2<...>
3.56% a.out libasan.so.3.0.0 [.] __asan_unpoison_stack_memory
2.69% a.out libasan.so.3.0.0 [.] __asan_poison_stack_memory
I'll continue working on that after weekend.
Martin