SuccessChanges

Summary

  1. Let @skipUnlessAddressSanitizer imply @skipIfAsan (details)
  2. [MLICM] Remove unneeded option so the test doesn't fail. (details)
  3. [LoopUnroll] Simplify latch/header block handling (NFC). (details)
  4. [AMDGPU] Bail alloca vectorization if GEP not found (details)
  5. [NFC, StackSafety] Move FunctionInfo into :: namespace (details)
  6. [NFC, StackSafety] Remove unnecessary data (details)
  7. [DwarfExpression] Support entry values for indirect parameters (details)
  8. [sancov] Accommodate sancov and coverage report server for use under Windows (details)
  9. [clang][docs] Document additional bits of libc that -ffreestanding envs must provide (details)
  10. [debuginfo] Fix broken tests from MachineLICM salvaging fix (details)
  11. [analyzer][RetainCount] Tie diagnostics to osx.cocoa.RetainCount rather then RetainCountBase, for the most part (details)
  12. [analyzer][MallocChecker] Make NewDeleteLeaks depend on DynamicMemoryModeling rather than NewDelete (details)
  13. [NFC] Fix formatting for the 'aix-ld.c' test case. (details)
  14. Modify verifier checks to support musttail + preallocated (details)
Commit 09de6e0fbd0b6ca7fa8760ac3513be6bbbba5a81 by Adrian Prantl
Let @skipUnlessAddressSanitizer imply @skipIfAsan

Don't run tests that use address sanitizer inside an address-sanitized
LLDB. The tests don't support that configuration. Incidentally they
were skipped on green dragon for a different reason, so this hasn't
come up there before.
The file was modifiedlldb/packages/Python/lldbsuite/test/decorators.py
Commit 01fee8aa24a6070542cfa55b2c32036d1d5869b8 by ditaliano
[MLICM] Remove unneeded option so the test doesn't fail.
The file was modifiedllvm/test/DebugInfo/MIR/X86/mlicm-hoist-post-regalloc.mir
Commit 5cf90d6cf1b811a6693383c487f79d24d5b306bb by flo
[LoopUnroll] Simplify latch/header block handling (NFC).

I think the current code dealing with connecting the unrolled iterations
is a bit more complicated than necessary currently. To connect the
unrolled iterations, we have to update the unrolled latch blocks to
branch to the header of the next unrolled iteration.

We need to do this regardless whether the latch is exiting or not.

Additionally, we try to turn the conditional branch in the exiting block
to an unconditional one. This is an optimization only; alternatively we
could leave the conditional branches in place and rely on other passes
to simplify the conditions.

Logically, this is a separate step from connecting the latches to the
headers, but it is convenient to fold them into the same loop, if the
latch is also exiting. For headers (or other non-latch exiting blocks,
this is done separately).

Hopefully the patch with additional comments makes things a bit clearer.

Reviewers: efriedma, dmgreen, hfinkel, Whitney

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D80544
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
Commit 512e806a33e80058a409d205a378a6e6fc2ef39d by Stanislav.Mekhanoshin
[AMDGPU] Bail alloca vectorization if GEP not found

Differential Revision: https://reviews.llvm.org/D80587
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-alloca-vector-to-vector.ll
Commit ecb66f50eeb73c32f8fd955a97bb070fbdd519ed by Vitaly Buka
[NFC, StackSafety] Move FunctionInfo into :: namespace
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/StackSafetyAnalysis.h
Commit 9abb0e8d5be2ffad06ccfcc2d5530997ad093b81 by Vitaly Buka
[NFC, StackSafety] Remove unnecessary data
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/StackSafetyAnalysis.h
Commit 6e39379bbbe1d8aba658f638dfc42f0ba0cbb926 by Vedant Kumar
[DwarfExpression] Support entry values for indirect parameters

Summary:
A struct argument can be passed-by-value to a callee via a pointer to a
temporary stack copy. Add support for emitting an entry value DBG_VALUE
when an indirect parameter DBG_VALUE becomes unavailable. This is done
by omitting DW_OP_stack_value from the entry value expression, to make
the expression describe the location of an object.

rdar://63373691

Reviewers: djtodoro, aprantl, dstenb

Subscribers: hiraditya, lldb-commits, llvm-commits

Tags: #lldb, #llvm

Differential Revision: https://reviews.llvm.org/D80345
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param-with-offset.mir
The file was modifiedlldb/test/API/functionalities/param_entry_vals/basic_entry_values/main.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
The file was addedllvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir
Commit 6a74ad6baad45b8572d196f7f290593ed62075b5 by Vitaly Buka
[sancov] Accommodate sancov and coverage report server for use under Windows

Summary:
This patch makes the following changes to SanCov and its complementary Python script in order to resolve issues pertaining to non-UNIX file paths in JSON symbolization information:
* Convert all paths to use forward slash.
* Update `coverage-report-server.py` to correctly handle paths to sources which contain spaces.
* Remove Linux platform restriction for all SanCov unit tests. All SanCov tests passed when ran on my local Windows machine.

Patch by Douglas Gliner.

Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

Reviewed By: vitalybuka

Subscribers: vsk, Dor1s, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D51018
The file was modifiedllvm/test/tools/sancov/blacklist.test
The file was modifiedllvm/test/tools/sancov/symbolize_noskip_dead_files.test
The file was modifiedllvm/test/tools/sancov/merge.test
The file was modifiedllvm/test/tools/sancov/validation.test
The file was modifiedllvm/test/tools/sancov/symbolize.test
The file was modifiedllvm/test/tools/sancov/print.test
The file was modifiedllvm/test/tools/sancov/covered_functions.test
The file was modifiedllvm/test/tools/sancov/not_covered_functions.test
The file was modifiedllvm/tools/sancov/coverage-report-server.py
The file was modifiedllvm/test/tools/sancov/stats.test
The file was modifiedllvm/tools/sancov/sancov.cpp
Commit 1e06b169be3e59799b8dcaf16d1d03bd4c12da42 by Jonathan Roelofs
[clang][docs] Document additional bits of libc that -ffreestanding envs must provide

Differential Revision: https://reviews.llvm.org/D80436
The file was modifiedclang/docs/CommandGuide/clang.rst
Commit 9eacda51fa23abf4f6503ff533dcb70071cbe569 by chris.jackson
[debuginfo] Fix broken tests from MachineLICM salvaging fix

Previous commit: bd7ff5d94f

- Added missing x86 triples
- Added missing asserts
The file was modifiedllvm/test/DebugInfo/MIR/X86/mlicm-sink.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/mlicm-hoist-post-regalloc.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/mlicm-hoist-pre-regalloc.mir
Commit 5192783bb29c32196f87044de113fc43d7dfaae8 by dkszelethus
[analyzer][RetainCount] Tie diagnostics to osx.cocoa.RetainCount rather then RetainCountBase, for the most part

Similarly to other patches of mine, I'm trying to uniformize the checker
interface so that dependency checkers don't emit diagnostics. The checker that
made me most anxious so far was definitely RetainCount, because it is definitely
impacted by backward compatibility concerns, and implements a checker hierarchy
that is a lot different to other examples of similar size. Also, I don't have
authority, nor expertise regarding ObjC related code, so I welcome any
objection/discussion!

Differential Revision: https://reviews.llvm.org/D78099
The file was modifiedclang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
The file was modifiedclang/test/Analysis/incorrect-checker-names.mm
The file was modifiedclang/test/Analysis/inlining/Inputs/expected-plists/path-notes.m.plist
The file was modifiedclang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
The file was modifiedclang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
The file was modifiedclang/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
The file was modifiedclang/test/Analysis/test-separate-retaincount.cpp
The file was modifiedclang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
The file was modifiedclang/test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist
The file was modifiedclang/test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist
The file was modifiedclang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
The file was modifiedclang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h
The file was modifiedclang/test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist
The file was modifiedclang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
Commit efd1a8e66eaa13afff709ebf16ff6280caa82ead by dkszelethus
[analyzer][MallocChecker] Make NewDeleteLeaks depend on DynamicMemoryModeling rather than NewDelete

If you remember the mail [1] I sent out about how I envision the future of the
already existing checkers to look dependencywise, one my main points was that no
checker that emits diagnostics should be a dependency. This is more problematic
for some checkers (ahem, RetainCount [2]) more than for others, like this one.

The MallocChecker family is a mostly big monolithic modeling class some small
reporting checkers that only come to action when we are constructing a warning
message, after the actual bug was detected. The implication of this is that
NewDeleteChecker doesn't really do anything to depend on, so this change was
relatively simple.

The only thing that complicates this change is that FreeMemAux (MallocCheckers
method that models general memory deallocation) returns after calling a bug
reporting method, regardless whether the report was ever emitted (which may not
always happen, for instance, if the checker responsible for the report isn't
enabled). This return unfortunately happens before cleaning up the maps in the
GDM keeping track of the state of symbols (whether they are released, whether
that release was successful, etc). What this means is that upon disabling some
checkers, we would never clean up the map and that could've lead to false
positives, e.g.:

error: 'warning' diagnostics seen but not expected:
  File clang/test/Analysis/NewDelete-intersections.mm Line 66: Potential leak of memory pointed to by 'p'
  File clang/test/Analysis/NewDelete-intersections.mm Line 73: Potential leak of memory pointed to by 'p'
  File clang/test/Analysis/NewDelete-intersections.mm Line 77: Potential leak of memory pointed to by 'p'

error: 'warning' diagnostics seen but not expected:
  File clang/test/Analysis/NewDelete-checker-test.cpp Line 111: Undefined or garbage value returned to caller
  File clang/test/Analysis/NewDelete-checker-test.cpp Line 200: Potential leak of memory pointed to by 'p'

error: 'warning' diagnostics seen but not expected:
  File clang/test/Analysis/new.cpp Line 137: Potential leak of memory pointed to by 'x'
There two possible approaches I had in mind:

Make bug reporting methods of MallocChecker returns whether they succeeded, and
proceed with the rest of FreeMemAux if not,
Halt execution with a sink node upon failure. I decided to go with this, as
described in the code.
As you can see from the removed/changed test files, before the big checker
dependency effort landed, there were tests to check for all the weird
configurations of enabled/disabled checkers and their messy interactions, I
largely repurposed these.

[1] http://lists.llvm.org/pipermail/cfe-dev/2019-August/063070.html
[2] http://lists.llvm.org/pipermail/cfe-dev/2019-August/063205.html

Differential Revision: https://reviews.llvm.org/D77474
The file was removedclang/test/Analysis/Malloc+NewDelete_intersections.cpp
The file was modifiedclang/test/Analysis/NewDelete-intersections.mm
The file was modifiedclang/test/Analysis/new.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
The file was modifiedclang/test/Analysis/NewDelete-checker-test.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/Checkers.td
Commit a924dac44f31ffa19508165fc61a9f10cd1d4836 by wanyu9511
[NFC] Fix formatting for the 'aix-ld.c' test case.

Summary:
Based on comments received in D80415 pertinent to test case format, the following fixes are provided to other tests in 'aix-ld.c' for the sake of consistency and readability,
  - Align flags in RUN directives vertically.
  - Align patterns in CHECK directives vertically.
  - Remove the ‘-o %t.o’ as it’s unnecessary for tests with ‘-###’.
  - Fix typos in comments.

Reviewers: ZarkoCA, hubert.reinterpretcast, daltenty

Reviewed By: hubert.reinterpretcast

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80532
The file was modifiedclang/test/Driver/aix-ld.c
Commit 9a0b0855a96ad91e082c6fb066e0ebabe72eb6b3 by aeubanks
Modify verifier checks to support musttail + preallocated

Summary:
preallocated and musttail can work together, but we don't want to call
@llvm.call.preallocated.setup() to modify the stack in musttail calls.
So we shouldn't have the "preallocated" operand bundle when a
preallocated call is musttail.

Also disallow use of preallocated on calls without preallocated.

Codegen not yet implemented.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80581
The file was modifiedllvm/test/Verifier/preallocated-valid.ll
The file was modifiedllvm/test/Verifier/preallocated-invalid.ll
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/IR/Verifier.cpp