SuccessChanges

Summary

  1. [lldb] avoid assert in threadsanitizer tests on linux (details)
  2. [test] Use %t instead of %T to remove race conditions between config-file3.c and target-override.c (details)
  3. Replace CRLF with LF; NFC (details)
  4. [libFuzzer] Evenly select inputs to cross over with from the corpus regardless of the input's coverage. (details)
  5. [NewPM][Lint] Port -lint to NewPM (details)
  6. [MIRVRegNamer] Experimental MachineInstr stable hashing (Fowler-Noll-Vo) (details)
  7. [gn build] Port 7fff1fbd3ce (details)
  8. [libFuzzer] Scale energy assigned to each input based on input execution time. (details)
  9. [Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once (details)
Commit f369d51896e1c0f61df253b116c42771479549df by l.lunak
[lldb] avoid assert in threadsanitizer tests on linux

The tests are unsupported on linux, but they assert in
Thread::GetStopDescriptionRaw() because of empty stop reason
description. And it is empty because
InstrumentationRuntimeTSan::NotifyBreakpointHit() fails
to get report from InstrumentationRuntimeTSan::RetrieveReportData(),
which is possibly(?) the reason why this is unsupported on linux.
Add a dummy stop reason description for this case, which changes
the test result from failing to unsupported.
The file was modifiedlldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
Commit 6e09722b27ed4d48dfc668b0efc2aed88d701ebf by maskray
[test] Use %t instead of %T to remove race conditions between config-file3.c and target-override.c

Both tests operate on `%T/testbin`. If the two tests run concurrently,
one may fail.

This is likely the root cause of flaky failures reported by
https://lists.llvm.org/pipermail/llvm-dev/2020-September/144781.html

https://llvm.org/docs/CommandGuide/lit.html says:

`%T parent directory of %t (not unique, deprecated, do not use)`

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D87103
The file was modifiedclang/test/Driver/target-override.c
The file was modifiedclang/test/Driver/config-file3.c
Commit a09eef113f171809c642d790100799bc529011a9 by bryan.chan
Replace CRLF with LF; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/round.ll
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/rint.ll
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/trunc.ll
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/vscale-getelementptr.ll
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/math-1.ll
Commit b53243e19496ae59ae1ce457a40e3ea610011fd1 by dokyungs
[libFuzzer] Evenly select inputs to cross over with from the corpus regardless of the input's coverage.

This patch adds an option "cross_over_uniform_dist", which, if 1, considers all
inputs in the corpus for the crossover input selection. More specifically, this
patch uses a uniform distribution of all inputs in the corpus for the CrossOver
input selection. Note that input selection for mutation is still fully
determined by the scheduling policy (i.e., vanilla or Entropic); the uniform
distribution only applies to the secondary input selection, only for the
crossover mutation of the base input chosen by the scheduling policy. This way
the corpus inputs that have useful fragments in them, even though they are
deprioritized by the scheduling policy, have chances of getting mixed with other
inputs that are prioritized and selected as base input for mutation.

Differential Revision: https://reviews.llvm.org/D86954
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerDriver.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerFlags.def
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerLoop.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerOptions.h
The file was addedcompiler-rt/test/fuzzer/cross_over_uniform_dist.test
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerCorpus.h
Commit c9771391ce05e5cba00e29017fd6c39157df3f3c by aeubanks
[NewPM][Lint] Port -lint to NewPM

This also changes -lint from an analysis to a pass. It's similar to
-verify, and that is a normal pass, and lives in llvm/IR.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D87057
The file was modifiedllvm/include/llvm/Analysis/Lint.h
The file was modifiedllvm/lib/Analysis/Analysis.cpp
The file was modifiedllvm/lib/Analysis/Lint.cpp
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/test/Other/lint.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/include/llvm/LinkAllPasses.h
The file was modifiedllvm/lib/Passes/PassRegistry.def
Commit 7fff1fbd3ce1c069aff0f475e896d50a39deb1ac by plotfi
[MIRVRegNamer] Experimental MachineInstr stable hashing (Fowler-Noll-Vo)

This hashing scheme has been useful out of tree, and I want to start
experimenting with it. Specifically I want to experiment on the
MIRVRegNamer, MIRCanononicalizer, and eventually the MachineOutliner.

This diff is a first step, that optionally brings stable hashing to the
MIRVRegNamer (and as a result, the MIRCanonicalizer).  We've tested this
hashing scheme on a lot of MachineOperand types that llvm::hash_value
can not handle in a stable manner.

This stable hashing was also the basis for

"Global Machine Outliner for ThinLTO" in EuroLLVM 2020

http://llvm.org/devmtg/2020-04/talks.html#TechTalk_58

Credits: Kyungwoo Lee, Nikolai Tillmann

Differential Revision: https://reviews.llvm.org/D86952
The file was modifiedllvm/include/llvm/CodeGen/MachineOperand.h
The file was modifiedllvm/test/CodeGen/MIR/AMDGPU/mir-canon-multi.mir
The file was modifiedllvm/test/CodeGen/MIR/AArch64/mir-canon-jump-table.mir
The file was modifiedllvm/test/CodeGen/MIR/AArch64/mir-canon-constant-pool-hash.mir
The file was modifiedllvm/test/CodeGen/MIR/X86/mir-namer-hash-frameindex.mir
The file was modifiedllvm/test/CodeGen/MIR/AArch64/addrspace-memoperands.mir
The file was modifiedllvm/test/CodeGen/MIR/AMDGPU/parse-order-reserved-regs.mir
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt
The file was modifiedllvm/test/CodeGen/MIR/X86/mircanon-flags.mir
The file was addedllvm/lib/CodeGen/MachineStableHash.cpp
The file was modifiedllvm/test/CodeGen/MIR/Generic/CFPImmMIRCanonHash.mir
The file was addedllvm/include/llvm/CodeGen/MachineStableHash.h
The file was addedllvm/include/llvm/CodeGen/StableHashing.h
The file was modifiedllvm/test/CodeGen/MIR/AArch64/mirCanonCopyCopyProp.mir
The file was modifiedllvm/lib/CodeGen/MIRVRegNamerUtils.cpp
The file was modifiedllvm/test/CodeGen/MIR/AArch64/mirnamer.mir
The file was modifiedllvm/lib/CodeGen/MachineOperand.cpp
The file was modifiedllvm/test/CodeGen/MIR/AArch64/mirCanonIdempotent.mir
The file was modifiedllvm/test/CodeGen/MIR/AMDGPU/mircanon-memoperands.mir
The file was modifiedllvm/test/CodeGen/MIR/X86/mir-canon-hash-bb.mir
Commit 952dc7f288a271e53bae6fa082ad045ade39ffb3 by llvmgnsyncbot
[gn build] Port 7fff1fbd3ce
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
Commit 5cda4dc7b4d28fcd11307d4234c513ff779a1c6f by dokyungs
[libFuzzer] Scale energy assigned to each input based on input execution time.

This patch scales the energy computed by the Entropic schedule based on the
execution time of each input. The input execution time is compared with the
average execution time of inputs in the corpus, and, based on the amount by
which they differ, the energy is scaled from 0.1x (for inputs executing slow) to
3x (for inputs executing fast). Note that the exact scaling criteria and formula
is borrowed from AFL.

On FuzzBench, this gives a sizeable throughput increase, which in turn leads to
more coverage on several benchmarks. For details, see the following report.

https://storage.googleapis.com/fuzzer-test-suite-public/exectime-report/index.html

Differential Revision: https://reviews.llvm.org/D86092
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/FuzzerDriver.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerLoop.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerFlags.def
The file was addedcompiler-rt/test/fuzzer/entropic-scale-per-exec-time.test
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerCorpus.h
The file was addedcompiler-rt/test/fuzzer/EntropicScalePerExecTimeTest.cpp
Commit 0f1be87e294751a0941f1d9b7785ebf4d8072149 by erik.pilkington
[Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once

Previously, this code discarded the result of CheckPlaceholderExpr for
non-matrix subexpressions. Not only is this wasteful, but it was creating a
Warc-repeated-use-of-weak false-positive on the attached testcase, since the
discarded expression was still registered as a use of the weak property.

rdar://66162246

Differential revision: https://reviews.llvm.org/D87102
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/SemaObjC/arc-repeated-weak.mm