[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The instrumentation for globals is coming in a separate patch. It seems more important to achieve implementation simplicity for the sanitizer passes rather than data locality because they make fundamental changes to the IR that touch the whole module (unlike other passes th

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added subscribers: fedor.sergeev, philip.pfaffe, leonardchan. leonardchan added a comment. cc: @fedor.sergeev @philip.pfaffe on this I think one of the things we want in the new PM is the data locality that we see from iterating only specific IR units (functions in this case). This w

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366379: hwasan: Initialize the pass only once. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D64843?vs=210227&id=210429#toc Repository: rL LLVM CHANGES SINCE LA

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. OK, sure. As I understand functon passes also have better data locality by running a sequence of passes over a single function. Not sure how important that is. LGTM Repository: rG LLVM Gi

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. IIUC the reason was to work around the lack of analysis availability from module passes, which is no longer a concern with the new PM. I would personally prefer to see the other sanitizers re-architected this way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a subscriber: chandlerc. eugenis added a comment. I don't know what is the best practice here. Other sanitizers have both module and function passes, is there a reason to do things differently here? @chandlerc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. Herald added subscribers: cfe-commits, hiraditya. Herald added projects: clang, LLVM. This will let us instrument globals during initialization. This required making the new PM pass a module pass, which should still provide access to analys