LLVM/project c44bd37llvm/lib/Target/X86 X86FloatingPoint.cpp X86.h, llvm/test/CodeGen/X86 x87-stack-pop.mir

[X86][NewPM] Port X86 FP Stackifier Pass to NewPM



Reviewers: arsenm, RKSimon, paperchalice, phoebewang

Reviewed By: arsenm, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/167911
DeltaFile
+77-38llvm/lib/Target/X86/X86FloatingPoint.cpp
+8-2llvm/lib/Target/X86/X86.h
+2-2llvm/lib/Target/X86/X86TargetMachine.cpp
+2-1llvm/test/CodeGen/X86/x87-stack-pop.mir
+2-1llvm/test/DebugInfo/MIR/InstrRef/x86-fp-stackifier-drop-locations.mir
+1-1llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+92-451 files not shown
+93-467 files

LLVM/project c40779alldb/test/API/commands/frame/var-dil/basics/GlobalVariableLookup TestFrameVarDILGlobalVariableLookup.py

[LLDB] Use skipIf instead of expectedFail
DeltaFile
+1-1lldb/test/API/commands/frame/var-dil/basics/GlobalVariableLookup/TestFrameVarDILGlobalVariableLookup.py
+1-11 files

LLVM/project 3e28992compiler-rt/lib/scudo/standalone mem_map_linux.cpp, compiler-rt/lib/scudo/standalone/tests map_test.cpp

[scudo] Always zero on linux even if the memory cannot be released. (#167788)

If a caller has locked memory, then the madvise call will fail. In that
case, zero the memory so that we don't return non-zeroed memory for
calloc calls since we thought the memory had been released.
DeltaFile
+46-0compiler-rt/lib/scudo/standalone/tests/map_test.cpp
+6-1compiler-rt/lib/scudo/standalone/mem_map_linux.cpp
+52-12 files

LLVM/project e51163clldb/test/Shell/SymbolFile/DWARF/x86 dwarf5-macho.c

[LLDB] Use %clang_host instead of %clang in test (NFC)
DeltaFile
+2-2lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-macho.c
+2-21 files

LLVM/project 6429549llvm/test/Transforms/LoopVectorize single-early-exit-deref-assumptions.ll

[LV] Add early-exit tests, where deref assumes are not in preheader.

Test case for vectorizing std::find_if with
builtin_assume_dereferenceable. Currently not vectorized.

https://godbolt.org/z/6jbsd4EjT
DeltaFile
+150-0llvm/test/Transforms/LoopVectorize/single-early-exit-deref-assumptions.ll
+150-01 files

LLVM/project 1184128llvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test lit.cfg.py

[LP] Assign weights when peeling last iteration.
DeltaFile
+66-0llvm/test/Transforms/LoopUnroll/peel-last-iteration-bfi.ll
+28-15llvm/test/Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll
+17-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+1-0llvm/test/lit.cfg.py
+112-164 files

LLVM/project c1e4550llvm/include/llvm/IR ProfDataUtils.h, llvm/lib/IR ProfDataUtils.cpp

[MergeICmp][profcheck] Propagate profile info
DeltaFile
+25-12llvm/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll
+32-2llvm/lib/Transforms/Scalar/MergeICmps.cpp
+21-7llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll
+3-0llvm/include/llvm/IR/ProfDataUtils.h
+1-1llvm/lib/IR/ProfDataUtils.cpp
+82-225 files

LLVM/project e7a9788llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests function-weak.ll

[LTT] Mark as unkown weak function tests.
DeltaFile
+3-2llvm/test/Transforms/LowerTypeTests/function-weak.ll
+3-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+6-22 files

LLVM/project 99a9fcellvm/lib/Transforms/Scalar MemCpyOptimizer.cpp, llvm/test/Transforms/MemCpyOpt memset-memcpy-dbgloc.ll

[MemCpyOpt][profcheck] Set `unknown` branch weights for certain selects
DeltaFile
+5-3llvm/test/Transforms/MemCpyOpt/memset-memcpy-dbgloc.ll
+3-0llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+8-32 files

LLVM/project 9a54c8dllvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Other new-pm-O0-defaults.ll

[LTT][profcheck] Set branch weights for complex llvm.type.test lowering
DeltaFile
+38-11llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+21-2llvm/test/Transforms/LowerTypeTests/section.ll
+1-0llvm/test/Other/new-pm-O0-defaults.ll
+60-133 files

LLVM/project 3d41cbbllvm/lib/Transforms/Scalar PartiallyInlineLibCalls.cpp, llvm/test/Transforms/PartiallyInlineLibCalls/X86 good-prototype.ll

[PILC][profcheck] Bias branch weights when optimizing sqrt (#167742)

Biasing towards the native `sqrt`​ not returning NaN.  


Issue #147390
DeltaFile
+13-1llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
+9-4llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
+22-52 files

LLVM/project 471d804llvm/cmake/modules AddLLVM.cmake

[CMake][unittests] Teach export_executable_symbols about ALIAS targets (#167932)

DynamicLibraryTests has a workaround for AIX that calls
export_executable_symbols after add_llvm_unittest, instead of just
passing the `EXPORT_SYMBOLS` switch. At this point, the
default_gtest(_main) libraries is added to the linked library set.
However, default_gtest(_main) are ALIAS libraries. This PR replaces the
ALIAS libraries with the ALIASED_TARGET before passing it to
extract_symbols.py.

Fixes failure of the clang-ppc64-aix buildbot after #164794.
DeltaFile
+8-0llvm/cmake/modules/AddLLVM.cmake
+8-01 files

LLVM/project 5385f41clang-tools-extra/clang-tidy/google TodoCommentCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Update google todo checker with style guide changes. (#165565)

The [Google style guide] now allows (and recommends) writing TODOs with
the following format:

```cpp
// TODO: bug reference - details about what needs to be done.
```

With this change the checker accepts the new style and suggests in in
the fix-it hint. The previous style is still accepted.

[Google style guide]:
https://google.github.io/styleguide/cppguide.html#TODO_Comments
DeltaFile
+75-11clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp
+40-0clang-tools-extra/test/clang-tidy/checkers/google/readability-todo-hyphen.cpp
+40-0clang-tools-extra/test/clang-tidy/checkers/google/readability-todo-parentheses.cpp
+0-26clang-tools-extra/test/clang-tidy/checkers/google/readability-todo.cpp
+11-0clang-tools-extra/docs/clang-tidy/checks/google/readability-todo.rst
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+170-371 files not shown
+172-377 files

LLVM/project 28594e2llvm/lib/Transforms/Scalar MemCpyOptimizer.cpp, llvm/test/Transforms/MemCpyOpt memset-memcpy-dbgloc.ll

[MemCpyOpt][profcheck] Set `unknown` branch weights for certain selects
DeltaFile
+5-3llvm/test/Transforms/MemCpyOpt/memset-memcpy-dbgloc.ll
+3-0llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+8-32 files

LLVM/project 2bc1823llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Other new-pm-O0-defaults.ll

[LTT][profcheck] Set branch weights for complex llvm.type.test lowering
DeltaFile
+38-11llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+21-2llvm/test/Transforms/LowerTypeTests/section.ll
+1-0llvm/test/Other/new-pm-O0-defaults.ll
+60-133 files

LLVM/project 473fd29llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests function-weak.ll

[LTT] Mark as unkown weak function tests.
DeltaFile
+3-2llvm/test/Transforms/LowerTypeTests/function-weak.ll
+3-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+6-22 files

LLVM/project aeacb0bllvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test lit.cfg.py

[LP] Assign weights when peeling last iteration.
DeltaFile
+66-0llvm/test/Transforms/LoopUnroll/peel-last-iteration-bfi.ll
+28-15llvm/test/Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll
+17-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+1-0llvm/test/lit.cfg.py
+112-164 files

LLVM/project cd79889llvm/include/llvm/IR ProfDataUtils.h, llvm/lib/IR ProfDataUtils.cpp

[MergeICmp][profcheck] Propagate profile info
DeltaFile
+25-12llvm/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll
+32-2llvm/lib/Transforms/Scalar/MergeICmps.cpp
+21-7llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll
+3-0llvm/include/llvm/IR/ProfDataUtils.h
+1-1llvm/lib/IR/ProfDataUtils.cpp
+82-225 files

LLVM/project af22175llvm/lib/Transforms/Scalar PartiallyInlineLibCalls.cpp, llvm/test/Transforms/PartiallyInlineLibCalls/X86 good-prototype.ll

[PILC][profcheck] Bias branch weights when optimizing sqrt
DeltaFile
+13-1llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
+9-4llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
+22-52 files

LLVM/project 0a86635llvm/test/Transforms/PartiallyInlineLibCalls/X86 good-prototype.ll

[PILC][NFC] Run UTC on `good-prototype.ll` (#167741)

Prefacing PR #167742 (stacked above this), noticed that running UTC made some changes unrelated to the aforementioned PR. Factoring them out here.
DeltaFile
+21-3llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
+21-31 files

LLVM/project 606a0c2flang/lib/Optimizer/Builder CUDAIntrinsicCall.cpp, flang/test/Lower/CUDA cuda-device-proc.cuf

[flang][cuda][NFC] Use NVVM barrier op with reduction (#167940)

Simplify the lowering by using the barrier op from NVVM updated in
#167036
DeltaFile
+21-24flang/lib/Optimizer/Builder/CUDAIntrinsicCall.cpp
+9-9flang/test/Lower/CUDA/cuda-device-proc.cuf
+30-332 files

LLVM/project 92e5608llvm/lib/Transforms/Vectorize LoadStoreVectorizer.cpp, llvm/test/CodeGen/AMDGPU splitkit-getsubrangeformask.ll fmul-2-combine-multi-use.ll

[Transform][LoadStoreVectorizer] allow redundant in Chain (#163019)

This can absorb redundant loads when forming vector load. Can be used to
fix the situation created by VectorCombine. See:
https://discourse.llvm.org/t/what-is-the-purpose-of-vectorizeloadinsert-in-the-vectorcombine-pass/88532
DeltaFile
+83-88llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
+65-87llvm/test/CodeGen/AMDGPU/fmul-2-combine-multi-use.ll
+57-40llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/multiple_tails.ll
+50-26llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
+25-26llvm/test/CodeGen/AMDGPU/branch-folding-implicit-def-subreg.ll
+9-24llvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll
+289-2918 files not shown
+323-33114 files

LLVM/project be717afflang/include/flang/Optimizer/Dialect FIROps.td FortranVariableInterface.td, flang/include/flang/Optimizer/HLFIR HLFIROps.td

[NFC][flang] Introduce FortranObjectViewOpInterface. (#166841)

This patch adds initial version of `FortranObjectViewOpInterface`
that helps walking def-use chains containing "pass-through"
operations (like `fir.convert`, etc.). The new interface is used
in FIR AliasAnalysis to demonstrate potential usage (I know we have
such walks elsewhere in Flang, but I am only changing FIR AliasAnalysis
in this patch).

This is an NFC change. I noticed that if I remove followBoxData
code there are no failing LIT tests, but I decided to keep it
in order to keep the change looking more like NFC.

This change is a follow-up on the discussion in #164020:
it is unclear if the `FortranObjectViewOpInterface` methods and their
usage, as in this patch, apply to the ViewLike operations that
use the core MLIR `ViewLikeOpInterface`. So this patch is the path
towards simplifying Flang code while also enabling a future discussion
about having such an interface in core MLIR.
DeltaFile
+64-43flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+53-8flang/include/flang/Optimizer/Dialect/FIROps.td
+55-0flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
+33-0flang/lib/Optimizer/Dialect/FIROps.cpp
+19-7flang/include/flang/Optimizer/HLFIR/HLFIROps.td
+6-0flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
+230-586 files

LLVM/project 83118dellvm/utils/lit/lit DiffUpdater.py, llvm/utils/lit/tests diff-test-update.py

[utils] support both files originating from split-file in DiffUpdater (#166679)

With this change DiffUpdater can update expected files even if both
files are created by split-files, if one of them ends with ".expected".
This is useful when a file is created and then modified during the test.
DeltaFile
+13-8llvm/utils/lit/lit/DiffUpdater.py
+0-11llvm/utils/lit/tests/Inputs/diff-test-update/split-both.test
+9-0llvm/utils/lit/tests/Inputs/diff-test-update/split-both.out
+9-0llvm/utils/lit/tests/Inputs/diff-test-update/split-both.in
+2-1llvm/utils/lit/tests/diff-test-update.py
+1-0llvm/utils/lit/tests/Inputs/diff-test-update/.gitignore
+34-206 files

LLVM/project b8868c1llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port f038dfd22d11
DeltaFile
+0-2llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+0-21 files

LLVM/project 6e74217llvm/utils/gn/secondary/lldb/source/Plugins/Language/CPlusPlus BUILD.gn

[gn build] Port 94fb85646daf
DeltaFile
+1-1llvm/utils/gn/secondary/lldb/source/Plugins/Language/CPlusPlus/BUILD.gn
+1-11 files

LLVM/project e797ec6libc/src/__support str_to_float.h high_precision_decimal.h, libc/src/wchar wcstof.cpp wcstof.h

[libc] Templatize strtofloatingpoint and implement wcstof. (#167755)

This change follows the pattern of
315dfe5865962d8a3d60e21d1fffce5214fe54ef by making strtofloat also
accept wchar_t* strings
(in addition to regular char*). It uses overloads from wctype_utils or
specialized functions to ensure comparison with literal characters (or
literal strings) pick char or wchar_t variants based on the argument
type.

The wcstof implementation is added, with unit test cases copied from
strtof test suite.
DeltaFile
+97-123libc/src/__support/str_to_float.h
+199-0libc/test/src/wchar/wcstof_test.cpp
+32-13libc/src/__support/high_precision_decimal.h
+30-0libc/src/wchar/wcstof.cpp
+21-0libc/src/wchar/wcstof.h
+12-0libc/test/src/wchar/CMakeLists.txt
+391-1365 files not shown
+414-13611 files

LLVM/project bcbd16fflang/lib/Semantics resolve-directives.cpp

[flang][OpenMP] Remove dead code left over after PR143715, NFC

In PrivatizeAssociatedLoopIndexAndCheckLoopLevel we now descend all the
way down the chain of nested OpenMPLoopDirectives ahead of time, so
innerMostNest can only be a nullptr, or a DoConstruct.
DeltaFile
+0-16flang/lib/Semantics/resolve-directives.cpp
+0-161 files

LLVM/project 12edc56llvm/lib/CodeGen RegAllocFast.cpp

[RegAllocFast] Add helper methods for getting/setting regunit state(NFC) (#167931)

The methods will help reduce the number of static_casts after changing
MCRegUnit to a strong typedef.
DeltaFile
+20-9llvm/lib/CodeGen/RegAllocFast.cpp
+20-91 files

LLVM/project 1b723f2lldb/bindings/python python-typemaps.swig python-typemaps.h

Revert "[lldb] Limit Py_buffer_RAII to SWIG < 4.1" (#167934)

Reverts llvm/llvm-project#167808
DeltaFile
+10-16lldb/bindings/python/python-typemaps.swig
+19-0lldb/bindings/python/python-typemaps.h
+29-162 files