SuccessChanges

Summary

  1. [libTooling] Provide overloads of `rewriteDescendants` that operate directly on an AST node. (details)
  2. GlobalISel/Utils.h - remove unused includes. NFCI. (details)
  3. [fuzzer] Create user provided fuzzer writeable directories when requested if they dont exist (details)
  4. Step down from security group (details)
  5. Add new hidden option -print-changed which only reports changes to IR (details)
  6. [libFuzzer] Add an option to keep initial seed inputs around. (details)
  7. [lldb-vscode] Fix TestVSCode_module (details)
  8. Eliminate the sizing template parameter N from CoalescingBitVector (details)
  9. [Analyzer][docs][NFC] Fix typo in code example (details)
  10. [InstCombine] add tests for commutative intrinsics; NFC (details)
  11. [InstCombine] canonicalize all commutative intrinsics with constant arg (details)
Commit d4f3903131292d36b3bc22c28798b8e9dae20af6 by yitzhakm
[libTooling] Provide overloads of `rewriteDescendants` that operate directly on an AST node.

The new overloads apply directly to a node, like the
`clang::ast_matchers::match` functions, Rather than generating an
`EditGenerator` combinator.

Differential Revision: https://reviews.llvm.org/D87031
The file was modifiedclang/lib/Tooling/Transformer/RewriteRule.cpp
The file was modifiedclang/include/clang/Tooling/Transformer/RewriteRule.h
The file was modifiedclang/unittests/Tooling/TransformerTest.cpp
Commit 898e42db93ae5ac87cc5ab4a93b14286b0b780ba by llvm-dev
GlobalISel/Utils.h - remove unused includes. NFCI.

Twine is unused, and TargetLowering can be reduced to a forward declaration and moved to Utils.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/Utils.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/Utils.h
Commit 711b9806547b0392ff636499cebfb73f72d4c595 by mascasa
[fuzzer] Create user provided fuzzer writeable directories when requested if they dont exist

Currently, libFuzzer will exit with an error message if a non-existent
directory is provided for any of the appropriate arguments. For cases
where libFuzzer is used in a specialized embedded environment, it would
be much easier to have libFuzzer create the directories for the user.

This patch accommodates for this scenario by allowing the user to provide
the argument `-create_missing_dirs=1` which makes libFuzzer attempt to
create the `artifact_prefix`, `exact_artifact_path`,
`features_dir` and/or corpus directory if they don't already exist rather
than throw an error and exit.

Split off from D84808 as requested [here](https://reviews.llvm.org/D84808#2208546).

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D86733
The file was modifiedcompiler-rt/test/fuzzer/fuzzer-dirs.test
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerIO.h
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerFlags.def
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerIO.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerDriver.cpp
Commit baa74e013f7e30f09b002692913a705b704a58f5 by JF Bastien
Step down from security group

Propose Ahmed as a replacement. He's fixed many security issues in LLVM for Apple in the last few years, as such he'll fit the "Individual contributors" description.

Differential Revision: https://reviews.llvm.org/D86742
The file was modifiedllvm/docs/Security.rst
Commit 7bc9924cb2fbd9f3ae53577607822ace267a04e6 by anhtuyen
Add new hidden option -print-changed which only reports changes to IR

A new hidden option -print-changed is added along with code to support
printing the IR as it passes through the opt pipeline in the new pass
manager. Only those passes that change the IR are reported, with others
only having the banner reported, indicating that they did not change the
IR, were filtered out or ignored. Filtering of output via the
-filter-print-funcs is supported and a new supporting hidden option
-filter-passes is added. The latter takes a comma separated list of pass
names and filters the output to only show those passes in the list that
change the IR. The output can also be modified via the -print-module-scope
function.

The code introduces a template base class that generalizes the comparison
of IRs that takes an IR representation as template parameter. The
constructor takes a series of lambdas that provide an event based API
for generalized reporting of IRs as they are changed in the opt pipeline
through the new pass manager.

The first of several instantiations is provided that prints the IR
in a form similar to that produced by -print-after-all with the above
mentioned filtering capabilities. This version, and the others to
follow will be introduced at the upcoming developer's conference.
See https://hotcrp.llvm.org/usllvm2020/paper/29 for more information.

Reviewed By: yrouban (Yevgeny Rouban)

Differential Revision: https://reviews.llvm.org/D86360
The file was modifiedllvm/lib/IR/LegacyPassManager.cpp
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
The file was modifiedllvm/include/llvm/Passes/StandardInstrumentations.h
The file was addedllvm/test/Other/change-printer.ll
Commit 62673c430de43837b0f177089ed184a0ffcd5678 by dokyungs
[libFuzzer] Add an option to keep initial seed inputs around.

This patch adds an option "keep_seed" to keep all initial seed inputs in the
corpus. Previously, only the initial seed inputs that find new coverage were
added to the corpus, and all the other initial inputs were discarded. We
observed in some circumstances that useful initial seed inputs are discarded as
they find no new coverage, even though they contain useful fragments in them
(e.g., SQLITE3 FuzzBench benchmark). This newly added option provides a way to
keeping seed inputs in the corpus for those circumstances. With this patch, and
with -keep_seed=1, all initial seed inputs are kept in the corpus regardless of
whether they find new coverage or not. Further, these seed inputs are not
replaced with smaller inputs even if -reduce_inputs=1.

Differential Revision: https://reviews.llvm.org/D86577
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerOptions.h
The file was modifiedcompiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerFlags.def
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerFork.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerLoop.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerCorpus.h
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerInternal.h
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerDriver.cpp
The file was addedcompiler-rt/test/fuzzer/keep-seed.test
The file was addedcompiler-rt/test/fuzzer/KeepSeedTest.cpp
Commit ddcc7ce59150c9ebc6b0b2d61e7ef4f2525c11f4 by waltermelon
[lldb-vscode] Fix TestVSCode_module

Caused by D86662. The fix is only checking some fields when the expect_debug_info_size flag is true. For some reason this was not failing on a local linux machine.
The file was modifiedlldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
Commit f26fc568402f84a94557cbe86e7aac8319d61387 by dimitry
Eliminate the sizing template parameter N from CoalescingBitVector

Since the parameter is not used anywhere, and the default size of 16
apparently causes PR47359, remove it. This ensures that IntervalMap will
automatically determine the optimal size, using its NodeSizer struct.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D87044
The file was modifiedllvm/include/llvm/ADT/CoalescingBitVector.h
Commit c9239b2bf5f00b58aaa431955f24013e0cada0a3 by Jan Korous
[Analyzer][docs][NFC] Fix typo in code example
The file was modifiedclang/docs/analyzer/checkers.rst
Commit 9bb3a9eebb3b6c2ad32c84e630f7b48076751042 by spatel
[InstCombine] add tests for commutative intrinsics; NFC
The file was addedllvm/test/Transforms/InstCombine/commutative-intrinsics.ll
Commit 2391a34f9f529705a9c7761df350e7f012cca191 by spatel
[InstCombine] canonicalize all commutative intrinsics with constant arg
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/commutative-intrinsics.ll