Changes

Summary

  1. [llvm-profgen] Skip duplication factor outside of body sample computation (details)
  2. [NARY-REASSOCIATE] Fix infinite recursion optimizing min\max (details)
  3. [CSKY] Complete to add basic integer instruction set (details)
  4. [Flang][flang-omp-report] Switch from std::string to StringRef (where possible) (details)
  5. [flang] flang-omp-report replace std::map with llvm::DenseMap (details)
  6. [clang-format] git-clang-format throws an assertion when removing files as part of the commit (details)
  7. [clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol (details)
Commit e8c245dcd3b9f4237cdfb9dbcc6669d0b81e7936 by wenlei
[llvm-profgen] Skip duplication factor outside of body sample computation

We incorrectly use duplication factor for total samples even though we already accumulate samples instead of taking MAX. It causes profile to have bloated total samples for functions with loop unrolled or vectorized. The change fix the issue for total sample, head sample and call target samples.

Differential Revision: https://reviews.llvm.org/D112042
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/test/tools/llvm-profgen/inline-noprobe2.test
Commit 269f563a2bcd88eba3fd4c25669713e64ab06f03 by ybrevnov
[NARY-REASSOCIATE] Fix infinite recursion optimizing min\max

To guarantee convergence of the algorithm each optimization step should decrease number of instructions when IR is modified. This property is not held in this test case. The problem is that SCEV Expander may do "unexpected" reassociation what results in creation of new min/max chains and introduction of extra instructions. As a result on each step we indefinitely optimize back and forth.

The solution is to restrict SCEV Expander to perform uncontrolled reassociations by means of "Unknown" expressions.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D112060
The file was modifiedllvm/lib/Transforms/Scalar/NaryReassociate.cpp
The file was modifiedllvm/test/Transforms/NaryReassociate/nary-req.ll
Commit de10a02fc067339224196735aa3ecec66e2d4845 by zixuan.wu
[CSKY] Complete to add basic integer instruction set

Complete the basic integer instruction set and add related predictor in CSKY.td.
And it includes the instruction definition and asm parser support.

Differential Revision: https://reviews.llvm.org/D111701
The file was modifiedllvm/lib/Target/CSKY/CSKYInstrInfo.td
The file was addedllvm/lib/Target/CSKY/CSKYSubtarget.h
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp
The file was modifiedllvm/test/MC/CSKY/basic.s
The file was modifiedllvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
The file was addedllvm/lib/Target/CSKY/CSKYSubtarget.cpp
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCTargetDesc.h
The file was modifiedllvm/lib/Target/CSKY/CSKYInstrFormats.td
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYInstPrinter.cpp
The file was modifiedllvm/lib/Target/CSKY/CSKY.td
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.h
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCExpr.h
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYInstPrinter.h
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYFixupKinds.h
The file was modifiedllvm/lib/Target/CSKY/CMakeLists.txt
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCExpr.cpp
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.cpp
Commit 660c511e5b79d3724b8a139c8865c790d77b1f8f by andrzej.warzynski
[Flang][flang-omp-report] Switch from std::string to StringRef (where possible)

This patch makes the following changes to flang-omp-report:
- Update 'normalize_clause_name' parameter to use llvm::StringRef instead of
   std::sting.
- Change usages of std::tolower to llvm::toLower from
   "ADT/StringExtras.h".
This is a one of several patches focusing on switching containers from STL to LLVM's ADT library.

Reviewed By: Leporacanthicus, clementval

Differential Revision: https://reviews.llvm.org/D111980
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp
Commit e9fe8ef4b0aa68be782a9139e08e9337ef79a462 by andrzej.warzynski
[flang] flang-omp-report replace std::map with llvm::DenseMap

This patch replaces the uses of std::map with llvm::DenseMap in the
flang-omp-report plugin. It also removed the 'constructClauseCount' map
due to no longer being needed after the plugin was stripped down.
This is a one of several patches focusing on switching containers from STL to LLVM's ADT library.

Reviewed By: kiranchandramohan, clementval

Differential Revision: https://reviews.llvm.org/D111977
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp
Commit 5e969125c6094b909493bcd8360497adcdf8f6f5 by mydeveloperday
[clang-format] git-clang-format throws an assertion when removing files as part of the commit

Following a change {D111273} to allow git-clang-format to see single lines being removed,
we introduced a regression such that if you are removing a whole file it will
assert in clang-format as its given the -lines=0:0  (lines are 1 based)

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D112056
The file was modifiedclang/tools/clang-format/git-clang-format
Commit 57e00810edd7c4359e3de9242bcbd8874d58dc64 by mydeveloperday
[clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol

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

A newline should be place between attribute and @ for objectivec

Reviewed By: benhamilton, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D111975
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
The file was modifiedclang/unittests/Format/FormatTestObjC.cpp