This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Asan static optimization (draft)

On Fri, Aug 08, 2014 at 02:26:25PM +0400, Yury Gribov wrote:
> I have been working on Asan global optimization pass lately. The goal is to
> remove redundant Asan checks from sanitized code. This should hopefully
> reduce Asan's speed/size overhead (which is currently ~2x). The patch is not
> yet ready for trunk (e.g. I haven't done bootstrap, etc. but Asan testsuite
> passed wo errors) but I thought I'd send it for preliminary review of
> algorithm and data structures (*).

Thanks for working on it, I've just quickly skimmed it and it looks

Similar optimization could be used for tsan builtins, or some of the ubsan
builtins (which is the reason why the pass is called sanopt).

> 3) in addition to redundant check removal, we could also move duplicate
> checks from e.g. branches of if-statement to their dominators.

For that you'd need to be extra careful, you would need to avoid doing that
if any path doesn't contain the check, or if there are calls that e.g. could
not return (abort/exit/have infinite loop) in between, etc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]