[PATCH] D77637: [SanitizerCoverage] Add -fsanitize-coverage=inline-bool-flag

2020-04-09 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 256211. pratyai added a comment. Was unintentionally enabling the bool-flag coverage in SanitizerArgs.cpp before (line#383, `if (Add & SanitizerKind::FuzzerNoLink) { CoverageFeatures |= ... }` Couldn't catch it before because `cmake -G Ninja ../llvm` didn't

[PATCH] D77637: [SanitizerCoverage] Add -fsanitize-coverage=inline-bool-flag

2020-04-09 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 256206. pratyai marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77637/new/ https://reviews.llvm.org/D77637 Files: clang/docs/SanitizerCoverage.rst

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-08 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 256182. pratyai added a comment. Adjusted the diff in the change (`align 1` is dropped from the llvm instruction of the CHECK). The reason is that it does not get set until setAlignment is explicitly called (ref:

[PATCH] D77637: [part 2] sancov/inline-bool-flag clang flags.

2020-04-08 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai marked 2 inline comments as done. pratyai added inline comments. Comment at: clang/test/Driver/fsanitize-coverage.c:114 +// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=inline-8bit-counters,pc-table %s -### 2>&1 | FileCheck %s

[PATCH] D77637: [part 2] sancov/inline-bool-flag clang flags.

2020-04-08 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 256178. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77637/new/ https://reviews.llvm.org/D77637 Files: clang/docs/SanitizerCoverage.rst clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-08 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 256175. pratyai added a comment. oops; forgot that dropping the `alignment == 1 ? 1 : alignment / 8` bit off this diff wouldn't work with build. (running a --check-llvm, but it's a bit slow; if things break I'll update again) Repository: rG LLVM Github

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-08 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 256167. pratyai marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77244/new/ https://reviews.llvm.org/D77244 Files: llvm/include/llvm/Transforms/Instrumentation.h

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-08 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai added a comment. In D77244#1970820 , @vitalybuka wrote: > In D77244#1956930 , @pratyai wrote: > > > It looks like I broke the tests after the `i8 `-> `i1` switch. > > > > I think it's because of an existing

[PATCH] D77637: [part 2] sancov/inline-bool-flag clang flags.

2020-04-07 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai created this revision. pratyai added reviewers: kcc, vitalybuka. Herald added a project: clang. Herald added a subscriber: cfe-commits. pratyai updated this revision to Diff 255638. (must follow part 1: https://reviews.llvm.org/D77244) In the previous part, we implemented the

[PATCH] D77637: [part 2] sancov/inline-bool-flag clang flags.

2020-04-07 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 255638. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77637/new/ https://reviews.llvm.org/D77637 Files: clang/docs/SanitizerCoverage.rst clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-07 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 255619. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77244/new/ https://reviews.llvm.org/D77244 Files: llvm/include/llvm/Transforms/Instrumentation.h

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-03 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254919. pratyai retitled this revision from "sancov/inline-bool-flag feature + tests + docs." to "[part 1] sancov/inline-bool-flag instrumentation.". pratyai added a comment. Herald added a project: LLVM. Dropped files from outside llvm/.../Instrumentation*

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254508. pratyai added a comment. Added the alignment for i1 as a special case. Also the inline-bool-flag.ll test had to be changed with it. PTAL if I am missing something; I did not expect it to be much diffrerent than inline-8bit-counters.ll, but

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254509. pratyai added a comment. Added the alignment for i1 as a special case. Also the inline-bool-flag.ll test had to be changed with it. PTAL if I am missing something; I did not expect it to be much diffrerent than inline-8bit-counters.ll, but

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai added a comment. It looks like I broke the tests after the `i8 `-> `i1` switch. I think it's because of an existing bug. From https://llvm.org/docs/LangRef.html > i1:8:8 - i1 is 8-bit (byte) aligned OTOH, in `SanitizerCoverage.cpp`, we have in `CreateFunctionLocalArrayInSection()`:

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254470. pratyai added a comment. And missed a space. Sorry, I'm just not very familiar with this kind of test, and cannot spot the mistakes before going to the web UI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254468. pratyai added a comment. fsanitize-coverage.c undo was incorrect the first time :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77244/new/ https://reviews.llvm.org/D77244 Files:

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254462. pratyai added a comment. Did the same for fsanitize-coverage.c. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77244/new/ https://reviews.llvm.org/D77244 Files: clang/docs/SanitizerCoverage.rst

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-02 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254461. pratyai added a comment. Undid the `arc lint` on autocomplete.c. `arc lint` does not seem to have an option --style, but it's just one line diff anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-01 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254418. pratyai added a comment. - Switched to Int1Ty. - Switched Atomic::NonAtomic (same as just dropping the two lines?) - C++ files were clang-formatted, but arc lint couldn't find clang-format-diff before. Now it seems to have formatted the lit tests. -

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-01 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254316. pratyai added a comment. Still had a couple of lines of diff left :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77244/new/ https://reviews.llvm.org/D77244 Files: clang/docs/SanitizerCoverage.rst

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-01 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254312. pratyai added a comment. Removed some unintentional diffs. Removed some unintentional diffs from clang/lib/Frontend/CompilerInvocation.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77244/new/

[PATCH] D77244: sancov/inline-bool-flag feature + tests + docs.

2020-04-01 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai created this revision. pratyai added reviewers: kcc, vitalybuka. Herald added subscribers: Sanitizers, cfe-commits, jfb, hiraditya. Herald added projects: clang, Sanitizers. pratyai updated this revision to Diff 254312. pratyai added a comment. Removed some unintentional diffs. Removed