FailedChanges

Summary

  1. [AArch64] Fix some minor coding style issues in AArch64CompressJumpTables (details)
  2. Add new 'preferred_name' attribute. (details)
  3. docs: Add pointer to cmake caches for PGO (details)
  4. [CodeView] Fix inline sites that are missing code offsets. (details)
  5. [Polly][CodeGen] Remove use of ScalarEvolution. (details)
  6. [OpenMPIRBuilder] introduce createStaticWorkshareLoop (details)
  7. [CodeGen][MSan] Don't use offsets of zero-sized fields (details)
  8. [CSSPGO][llvm-profgen] Context-sensitive profile data generation (details)
  9. Set the target branch for `arc land` to main (details)
Commit 2ac4d0f45a2a301163ca53f3e23e675f4f5bdbd3 by Amara Emerson
[AArch64] Fix some minor coding style issues in AArch64CompressJumpTables
The file was modifiedllvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
Commit 98f76adf4e941738c0b9fe3b9965fa63603e9c89 by richard
Add new 'preferred_name' attribute.

This attribute permits a typedef to be associated with a class template
specialization as a preferred way of naming that class template
specialization. This permits us to specify that (for example) the
preferred way to express 'std::basic_string<char>' is as 'std::string'.

The attribute is applied to the various class templates in libc++ that have
corresponding well-known typedef names.

Differential Revision: https://reviews.llvm.org/D91311
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/utils/TableGen/ClangAttrEmitter.cpp
The file was modifiedlibcxx/include/regex
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedlibcxx/include/string
The file was modifiedlibcxx/include/string_view
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/test/SemaTemplate/attributes.cpp
The file was modifiedlibcxx/include/__config
The file was modifiedclang/lib/AST/TypePrinter.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedlibcxx/include/iosfwd
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
Commit b570f82f43a74fc842b9fd7f03bf0eca18fc9474 by thakis
docs: Add pointer to cmake caches for PGO

Also add a link to end-user PGO documentation.

Differential Revision: https://reviews.llvm.org/D92768
The file was modifiedllvm/docs/HowToBuildWithPGO.rst
The file was modifiedllvm/utils/collect_and_build_with_pgo.py
Commit 399bc48eccf0d983a8a4644c12ed9cc21ff33f33 by akhuang
[CodeView] Fix inline sites that are missing code offsets.

When an inline site has a starting code offset of 0, we sometimes
don't emit the starting offset.

Bug: https://bugs.llvm.org/show_bug.cgi?id=48377

Differential Revision: https://reviews.llvm.org/D92590
The file was modifiedllvm/test/MC/COFF/cv-loc-unreachable-2.s
The file was modifiedllvm/lib/MC/MCCodeView.cpp
The file was modifiedllvm/test/MC/COFF/cv-inline-linetable-infloop.s
The file was modifiedllvm/test/MC/COFF/cv-loc-unreachable.s
Commit 6249bfeefeed7ee2634355d4d7523b46fb00fda6 by llvm-project
[Polly][CodeGen] Remove use of ScalarEvolution.

ScalarEvolution::getSCEV cannot be used during codegen. ScalarEvolution
assumes a stable IR and control flow which is under construction during
Polly's CodeGen. In particular, it uses DominatorTree for compute the
backedge taken count. However the DominatorTree is not updated during
codegen.

In this case, SCEV was used to determine the base pointer of an array
access. Replace it by our own function. Polly generates only GEP and
BitCasts for array acceses, i.e. it is sufficient to handle these to to
find the base pointer.

Fixes llvm.org/PR48422
The file was modifiedpolly/lib/CodeGen/IRBuilder.cpp
The file was addedpolly/test/Isl/CodeGen/scev-backedgetaken.ll
Commit c102c783cd08cb1bf9119fe33cce34f6d1563881 by zinenko
[OpenMPIRBuilder] introduce createStaticWorkshareLoop

Introduce a function that creates a statically-scheduled workshare loop
out of a canonical loop created earlier by the OpenMPIRBuilder. This
basically amounts to injecting runtime calls to the preheader and the
after block and updating the trip count. Static scheduling kind is
currently hardcoded and needs to be extracted from the runtime library
into common TableGen definitions.

Differential Revision: https://reviews.llvm.org/D92476
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Commit 3e1cb0db8a79b19996fcea210b639fe513a5eaf3 by Vitaly Buka
[CodeGen][MSan] Don't use offsets of zero-sized fields

Such fields will likely have offset zero making
__sanitizer_dtor_callback poisoning wrong regions.
E.g. it can poison base class member from derived class constructor.

Differential Revision: https://reviews.llvm.org/D92727
The file was modifiedclang/lib/CodeGen/CGClass.cpp
The file was modifiedclang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
Commit 1f05b1a9f527e19fb1d7cf17689c41b7951af056 by wlei
[CSSPGO][llvm-profgen] Context-sensitive profile data generation

This stack of changes introduces `llvm-profgen` utility which generates a profile data file from given perf script data files for sample-based PGO. It’s part of(not only) the CSSPGO work. Specifically to support context-sensitive with/without pseudo probe profile, it implements a series of functionalities including perf trace parsing, instruction symbolization, LBR stack/call frame stack unwinding, pseudo probe decoding, etc. Also high throughput is achieved by multiple levels of sample aggregation and compatible format with one stop is generated at the end. Please refer to: https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s for the CSSPGO RFC.

This change supports context-sensitive profile data generation into llvm-profgen. With simultaneous sampling for LBR and call stack, we can identify leaf of LBR sample with calling context from stack sample . During the process of deriving fall through path from LBR entries, we unwind LBR by replaying all the calls and returns (including implicit calls/returns due to inlining) backwards on top of the sampled call stack. Then the state of call stack as we unwind through LBR always represents the calling context of current fall through path.

we have two types of virtual unwinding 1) LBR unwinding and 2) linear range unwinding.
Specifically, for each LBR entry which can be classified into call, return, regular branch, LBR unwinding will replay the operation by pushing, popping or switching leaf frame towards the call stack and since the initial call stack is most recently sampled, the replay should be in anti-execution order, i.e. for the regular case, pop the call stack when LBR is call, push frame on call stack when LBR is return. After each LBR processed, it also needs to align with the next LBR by going through instructions from previous LBR's target to current LBR's source, which we named linear unwinding. As instruction from linear range can come from different function by inlining, linear unwinding will do the range splitting and record counters through the range with same inline context.

With each fall through path from LBR unwinding, we aggregate each sample into counters by the calling context and eventually generate full context sensitive profile (without relying on inlining) to driver compiler's PGO/FDO.

A breakdown of noteworthy changes:
- Added `HybridSample` class as the abstraction perf sample including LBR stack and call stack
* Extended `PerfReader` to implement auto-detect whether input perf script output contains CS profile, then do the parsing. Multiple `HybridSample` are extracted
* Speed up by aggregating  `HybridSample` into `AggregatedSamples`
* Added VirtualUnwinder that consumes aggregated  `HybridSample` and implements unwinding of calls, returns, and linear path that contains implicit call/return from inlining. Ranges and branches counters are aggregated by the calling context.
 Here calling context is string type, each context is a pair of function name and callsite location info, the whole context is like `main:1 @ foo:2 @ bar`.
* Added PorfileGenerater that accumulates counters by ranges unfolding or branch target mapping, then generates context-sensitive function profile including function body, inferring callee's head sample, callsite target samples, eventually records into ProfileMap.

* Leveraged LLVM build-in(`SampleProfWriter`) writer to support different serialization format with no stop
- `getCanonicalFnName` for callee name and name from ELF section
- Added regression test for both unwinding and profile generation

Test Plan:
ninja & ninja check-llvm

Reviewed By: hoy, wenlei, wmi

Differential Revision: https://reviews.llvm.org/D89723
The file was modifiedllvm/lib/ProfileData/SampleProfWriter.cpp
The file was addedllvm/test/tools/llvm-profgen/inline-cs-noprobe.test
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h
The file was addedllvm/test/tools/llvm-profgen/Inputs/noinline-cs-noprobe.perfscript
The file was modifiedllvm/tools/llvm-profgen/llvm-profgen.cpp
The file was addedllvm/test/tools/llvm-profgen/noinline-cs-noprobe.test
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
The file was modifiedllvm/tools/llvm-profgen/CMakeLists.txt
The file was addedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was addedllvm/tools/llvm-profgen/ProfileGenerator.h
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-cs-noprobe.perfbin
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-cs-noprobe.perfscript
The file was modifiedllvm/docs/CommandGuide/llvm-profgen.rst
The file was addedllvm/test/tools/llvm-profgen/Inputs/noinline-cs-noprobe.perfbin
Commit 234d88ab5053f0c55e0269d80bcb5e03ed2c0555 by joker.eph
Set the target branch for `arc land` to main
The file was modified.arcconfig