FailedChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [clang] Annotate trivial getters and setters on hover. (details)
  2. [clangd] Tweak parseDocumentation loop to use raw lines. NFC (details)
  3. [libc++] Attempt to workaround module invalidation bug (details)
  4. [IVDescriptors] Remove unnecessary DemandedBits.h include; NFC (details)
  5. [IVDescriptors] Remove IRBuilder.h include; NFC (details)
  6. [Reassociate] Use IRBuilderBase; NFC (details)
  7. [Object] object::ELFObjectFile::dynamic_symbol_begin(): skip symbol index 0 (details)
  8. [VNCoercion] Use IRBuilderBase; NFC (details)
  9. [IRBuilder] Move some code into the cpp file; NFC (details)
  10. [X86][SSE] lowerV8I16Shuffle - lower compaction shuffles using PACKUSDW(PBLENDW,PBLENDW) on SSE41+ (details)
  11. [CostModel][X86] Add insert/extract cost tests for sub-128bit vXi8/vXi16 vectors (details)
  12. [CostModel][X86] Add shuffle cost tests for sub-128bit vectors (details)
  13. [WebAssembly] Fix wasm.lsda() optimization in WasmEHPrepare (details)
  14. [clang-tidy]: fix false positive of cert-oop54-cpp check. (details)
  15. Disable relative paths in lit.site.cfg in presence of symlinks (details)
  16. [OpenMP][NFC] Remove unnecessary argument (details)
  17. [Attributor] Deduce attributes for non-exact functions (details)
  18. [InstCombine] Don't limit uses in eraseInstFromFunction() (details)
  19. fix typo in comment to cycle bots (details)
  20. [WebAssembly] Fix a sanitizer error in WasmEHPrepare (details)
Commit a975fde23a5e64721d75022b2a072a0b19f4b279 by sam.mccall
[clang] Annotate trivial getters and setters on hover.

Summary: (Only if their definitions are visible and they have no other docs)

Reviewers: kadircet

Subscribers: jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77408
The file was modifiedclang-tools-extra/clangd/Hover.cpp
The file was modifiedclang-tools-extra/clangd/unittests/HoverTests.cpp
Commit ebd522aaa8aad74ea44db5bb4b74f1b784da9f99 by sam.mccall
[clangd] Tweak parseDocumentation loop to use raw lines. NFC

This clears the way for the raw lines themselves to be parsed easily.

(Okay, one functional change: fix punctuation linebreaks with trailing WS)
The file was modifiedclang-tools-extra/clangd/unittests/HoverTests.cpp
The file was modifiedclang-tools-extra/clangd/Hover.cpp
Commit 62f3a9650a9f289a07a5f480764fb655178c2334 by eric
[libc++] Attempt to workaround module invalidation bug
The file was modifiedlibcxx/test/libcxx/modules/stds_include.sh.cpp
Commit a5eb1236e3b43859f7c84dad71c2b26b9a22fb8a by nikita.ppv
[IVDescriptors] Remove unnecessary DemandedBits.h include; NFC

Forward declare DemandedBits in IVDescriptors, and move include
into the cpp file. Also drop the include from LoopUtils, which
does not need it at all.
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
The file was modifiedllvm/lib/Analysis/IVDescriptors.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/LoopUtils.h
Commit 1055e9e3c87f66277e1d66b72ce8af4551e574d6 by nikita.ppv
[IVDescriptors] Remove IRBuilder.h include; NFC

IVDescriptors.h itself does not reference IRBuilder at all.
Move the include into transformation passes that do.
The file was modifiedllvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
Commit ebd5a1b0498ff0c7cf790f6d980db5a8a3e2bbb9 by nikita.ppv
[Reassociate] Use IRBuilderBase; NFC

And remove now unnecessary IRBuilder.h include in header.
The file was modifiedllvm/include/llvm/Transforms/Scalar/Reassociate.h
The file was modifiedllvm/lib/Transforms/Scalar/Reassociate.cpp
Commit 541bead8b424c46b43b3d5fcf19377db70802573 by Xing
[Object] object::ELFObjectFile::dynamic_symbol_begin(): skip symbol index 0

Summary:
Note: This revision is very similar to D62296.

In D75756, we need `getDynamicSymbolIterators()` to skip first NULL symbol in `.dynsym`. And I believe it might be worth pointing this out in a separate patch to gather you experts' opinions.

I have checked that current code base will not be affected by this change.

```
dynamic_symbol_begin()
|- dynamic_symbol_end(): Ok
`- getDynamicSymbolIterators()
   |- addDynamicElfSymbols(): llvm/tools/llvm-objdump/llvm-objdump.cpp, Line 934
   |                          Ok, NULL symbol will be omitted by Line 945-947
   |                          StringRef Name = unwrapOrError(Symbol.getName(), Obj->getName());
   |                          if (Name.empty()) continue;
   |- dumpSymbolNameFromObject(): llvm/tools/llvm-nm/llvm-nm.cpp, Line 1192
   |                          There's no test for dumping dynamic debugging symbol. This patch helps improve llvm-nm behavior. (we should add test for this later)
   `- computeSymbolSizes(): llvm/lib/Object/SymbolSize.cpp, Line 52
      |- OProfileJITEventListener::notifyObjectLoaded(): llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp, Line 92
      |                                                  Ok, NULL symbol will be omitted by Line 94-95
      |                                                  if (!Sym.getType() || *Sym.getType() != SF_Function) continue;
      |- IntelJITEventListener::notifyObjectLoaded(): llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp, Line 98
      |                                               Ok, NULL symbol will be omitted by Line 124-126 (same as previous one)
      |- PerfJITEventListener::notifyObjectLoaded(): llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp, Line 244
      |                                              Ok, NULL symbol will be omitted by Line 254-256, (same as previous one)
      |- SymbolizableObjectFile::create(): llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp, Line 73
      |                                    Ok, NULL symbol will be omitted by Line 75
      |                                    res->addSymbol()
      |                                    In addSymbol(), Line 167-168
      |                                    if (!Sec || (Obj && Obj->section_end() == *Sec)) return std::error_code();
      |- dumpCXXData(): llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp, Line 189
      |                 Ok, NULL symbol will be omitted by Line 199-202
      |                 object::section_iterator SecI = *SecIOrErr;
      |                 // Skip external symbols.
      |                 if (SecI == Obj->section_end())
      |                   continue;
      `- printLineInfoForInput(): llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp, Line 418
                                  Ok, NULL symbol will be omitted by Line 430-477
                                  if (Type == object::SymbolRef::ST_Function) {
                                    ...
                                  }
```

Reviewers: grimar, jhenderson, MaskRay

Reviewed By: jhenderson, MaskRay

Subscribers: rupprecht, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76081
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
The file was addedllvm/test/tools/llvm-nm/dynamic.test
Commit 6896d559f3ce5b273dc6d228c9653f31072bf9cc by nikita.ppv
[VNCoercion] Use IRBuilderBase; NFC

And remove include from header.
The file was modifiedllvm/lib/Transforms/Utils/VNCoercion.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/VNCoercion.h
Commit b90ea4f34194eb065ee72e0f49d2a97e8de30585 by nikita.ppv
[IRBuilder] Move some code into the cpp file; NFC

Since D73835 we no longer need to define the whole IRBuilder
implementation in the header. This patch moves some of the larger
methods out of line, into the C++ file.

Differential Revision: https://reviews.llvm.org/D77332
The file was modifiedllvm/include/llvm/IR/IRBuilder.h
The file was modifiedllvm/lib/IR/IRBuilder.cpp
Commit e5e719d8854a6bca60aff1d87f5b5eb556f55695 by llvm-dev
[X86][SSE] lowerV8I16Shuffle - lower compaction shuffles using PACKUSDW(PBLENDW,PBLENDW) on SSE41+

Similar to the lowerV16I8Shuffle implementation, for binary compaction v8i16 shuffles we can avoid the PUNPCKLDQ(PSHUFB,PSHUFB) pattern on SSE41+ targets by using PACKUSDW and PBLENDW. Before SSE41 we would need to use PACKSSDW but that requires sign extension that seems to destroy any gains, even on targets without PSHUFB.

This is a bigger gain on AMD than Intel targets but should never be a regression, and avoiding the shuffle mask load(s) is always useful.

Noticed in codegen while dealing with PR31443.
The file was modifiedllvm/test/CodeGen/X86/phaddsub.ll
The file was modifiedllvm/test/CodeGen/X86/shuffle-vs-trunc-256.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-or-bool.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-and-bool.ll
The file was modifiedllvm/test/CodeGen/X86/masked_store_trunc_usat.ll
The file was modifiedllvm/test/CodeGen/X86/shuffle-vs-trunc-512.ll
The file was modifiedllvm/test/CodeGen/X86/vector-trunc.ll
The file was modifiedllvm/test/CodeGen/X86/vector-trunc-ssat.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
The file was modifiedllvm/test/CodeGen/X86/masked_store_trunc.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-128-v8.ll
The file was modifiedllvm/test/CodeGen/X86/vector-trunc-usat.ll
The file was modifiedllvm/test/CodeGen/X86/cast-vsel.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
The file was modifiedllvm/test/CodeGen/X86/vector-trunc-packus.ll
The file was modifiedllvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
Commit 87fd686f6fddc0f5cfb78934b01c32c3c8893443 by llvm-dev
[CostModel][X86] Add insert/extract cost tests for sub-128bit vXi8/vXi16 vectors
The file was modifiedllvm/test/Analysis/CostModel/X86/vector-extract.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/vector-insert.ll
Commit 6a57ba17c032807fcea04c622cce32f2c423610f by llvm-dev
[CostModel][X86] Add shuffle cost tests for sub-128bit vectors
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-two-src.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-transpose.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-reverse.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-single-src.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-broadcast.ll
Commit 2e9839729d3708311dead60240c8d00ddc650032 by aheejin
[WebAssembly] Fix wasm.lsda() optimization in WasmEHPrepare

Summary:
When we insert a call to the personality function wrapper
(`_Unwind_CallPersonality`) for a catch pad, we store some necessary
info in `__wasm_lpad_context` struct and pass it. One of the info is the
LSDA address for the function. For this, we insert a call to
`wasm.lsda()`, which will be lowered down to the address of LSDA, and
store it in a field in `__wasm_lpad_context`.

There are exceptions to this personality call insertion: catchpads for
`catch (...)` and cleanuppads (for destructors) don't need personality
function calls, because we don't need to figure out whether the current
exception should be caught or not. (They always should.)

There was a little optimization to `wasm.lsda()` call insertion. Because
the LSDA address is the same throughout a function, we don't need to
insert a store of `wasm.lsda()` return value in every catchpad. For
example:
```
try {
  foo();
} catch (int) {
  // wasm.lsda() call and a store are inserted here, like, in
  // pseudocode,
  // %lsda = wasm.lsda();
  // store %lsda to a field in __wasm_lpad_context
  try {
    foo();
  } catch (int) {
    // We don't need to insert the wasm.lsda() and store again, because
    // to arrive here, we have already stored the LSDA address to
    // __wasm_lpad_context in the outer catch.
  }
}
```
So the previous algorithm checked if the current catch has a parent EH
pad, we didn't insert a call to `wasm.lsda()` and its store.

But this was incorrect, because what if the outer catch is `catch (...)`
or a cleanuppad?
```
try {
  foo();
} catch (...) {
  // wasm.lsda() call and a store are NOT inserted here
  try {
    foo();
  } catch (int) {
    // We need wasm.lsda() here!
  }
}
```
In this case we need to insert `wasm.lsda()` in the inner catchpad,
because the outer catchpad does not have one.

To minimize the number of inserted `wasm.lsda()` calls and stores, we
need a way to figure out whether we have encountered `wasm.lsda()` call
in any of EH pads that dominates the current EH pad. To figure that
out, we now visit EH pads in BFS order in the dominator tree so that we
visit parent BBs first before visiting its child BBs in the domtree.

We keep a set named `ExecutedLSDA`, which basically means "Do we have
`wasm.lsda()` either in the current EH pad or any of its parent EH
pads in the dominator tree?". This is to prevent scanning the domtree up
to the root in the worst case every time we examine an EH pad: each EH
pad only needs to examine its immediate parent EH pad.

- If any of its parent EH pads in the domtree has `wasm.lsda()`, this
  means we don't need `wasm.lsda()` in the current EH pad. We also insert
  the current EH pad in `ExecutedLSDA` set.
- If none of its parent EH pad has `wasm.lsda()`
  - If the current EH pad is a `catch (...)` or a cleanuppad, done.
  - If the current EH pad is neither a `catch (...)` nor a cleanuppad,
    add `wasm.lsda()` and the store in the current EH pad, and add the
    current EH pad to `ExecutedLSDA` set.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77423
The file was modifiedllvm/lib/CodeGen/WasmEHPrepare.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/wasmehprepare.ll
Commit 0f9e1e3ae750df483b7fff905a8bc89262e3179e by tamas.zolnai
[clang-tidy]: fix false positive of cert-oop54-cpp check.

Summary:
It seems we need a different matcher for binary operator
in a template context.

Fixes this issue:
https://bugs.llvm.org/show_bug.cgi?id=44499

Reviewers: aaron.ballman, alexfh, hokein, njames93

Reviewed By: aaron.ballman

Subscribers: xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D76990
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp
Commit 7db64e202f9951b1bd94ae585ec58b2d857c2246 by thakis
Disable relative paths in lit.site.cfg in presence of symlinks

See https://reviews.llvm.org/D77184#1961208
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit ceed44adfd1ae9d714eaa4f0e7fa5a1a149b4dc5 by johannes
[OpenMP][NFC] Remove unnecessary argument
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit eec6d87626e7528d5ffb3609f30fe7f1b00e30a0 by johannes
[Attributor] Deduce attributes for non-exact functions

This patch is based on D63312 and D63319. For now we create shallow wrappers for all functions that are IPO amendable.
See also [this github issue](https://github.com/llvm/llvm-project/issues/172).

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D76404
The file was addedllvm/test/Transforms/Attributor/wrapper.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 4ede730096813a9cb901b92fdd3670813cdc5bc1 by nikita.ppv
[InstCombine] Don't limit uses in eraseInstFromFunction()

eraseInstFromFunction() adds the operands of the erased instructions,
as those might now be dead as well. However, this is limited to
instructions with less than 8 operands.

This check doesn't make a lot of sense to me. As the instruction
gets removed afterwards, I don't see a potential for anything
overly pathological happening here (as we can only add those
operands to the worklist once). The impact on CTMark is in
the noise. We also have the same code in instruction sinking
and don't limit the operand count there.

Differential Revision: https://reviews.llvm.org/D77325
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
Commit eb81d440fc96117b2b44f47b7cba69c2ac066905 by thakis
fix typo in comment to cycle bots
The file was modifiedlld/lib/Core/Resolver.cpp
The file was modifiedlld/lib/Core/Error.cpp
Commit fc5d8b672b981027436a231f4e431d57bdf81407 by aheejin
[WebAssembly] Fix a sanitizer error in WasmEHPrepare

Summary:
D77423 started using a dominator tree in WasmEHPrepare, but we deleted
BBs in `prepareThrows` before we used the domtree in `prepareEHPads`,
and those CFG changes were not reflected in the domtree. This uses
`DomTreeUpdater` to make sure we update the domtree every time we delete
BBs from the CFG. This fixes ubsan/msan/expensive_check errors caught in
LLVM buildbots.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77465
The file was modifiedllvm/lib/CodeGen/WasmEHPrepare.cpp