SuccessChanges

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

Summary

  1. [TargetLowering] Extract simplifySetCCs ctpop into a separate function. NFCI (details)
  2. [DebugInfo] Support for DWARF operator DW_OP_over (details)
  3. [LangRef] Rename the names of metadata in load/store's syntax (NFC) (details)
  4. This test includes a source that will produce basic blocks and hence sections with -fbasic-block-sections=all. (details)
  5. Add support for !noundef metatdata on loads (details)
  6. Un-indent the section on 'Writing Target Stop-Hooks in Python' (details)
  7. Revert "Register TargetCXXABI.def as a textual header" (details)
  8. [lldb] Enable cmake policy CMP0077 for option() (details)
  9. [ARM] Add a very basic active_lane_mask cost (details)
  10. [ARM] Basic getArithmeticReductionCost reduction costs (details)
  11. [NFC] fix some typos in LoopUnrollPass (details)
Commit 278bd068918b7df1fe3a2a31a15122f2a708d883 by craig.topper
[TargetLowering] Extract simplifySetCCs ctpop into a separate function. NFCI

As requested in D89346. This allows us to add some early outs.

I reordered some checks a little bit to make the more common bail outs happen earlier. Like checking opcode before checking hasOneUse. And I moved the bit width check to make sure it was safe to look through a truncate to the spot where we look through truncates instead of after.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D89494
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit 0538353b3be3e2a3b1114b6ae238165726727e1c by AlokKumar.Sharma
[DebugInfo] Support for DWARF operator DW_OP_over

LLVM rejects DWARF operator DW_OP_over. This DWARF operator is needed
for Flang to support assumed rank array.

  Summary:
Currently LLVM rejects DWARF operator DW_OP_over. Below error is
produced when llvm finds this operator.
[..]
invalid expression
!DIExpression(151, 20, 16, 48, 30, 35, 80, 34, 6)
warning: ignoring invalid debug info in over.ll
[..]
There were some parts missing in support of this operator, which are
now completed.

  Testing
-added a unit testcase
-check-debuginfo
-check-llvm

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D89208
The file was modifiedllvm/lib/IR/DebugInfoMetadata.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
The file was modifiedllvm/docs/LangRef.rst
The file was addedllvm/test/DebugInfo/X86/dwarfdump-over.ll
The file was addedllvm/test/Bitcode/DW_OP_over.ll
Commit 701cf4b5a59cf647c38694d1ee9735e0309f9291 by aqjune
[LangRef] Rename the names of metadata in load/store's syntax (NFC)

Discussed in D89050
The file was modifiedllvm/docs/LangRef.rst
Commit 2e5b701d9306e45d37d370b1496bff9604605c93 by tmsriram
This test includes a source that will produce basic blocks and hence sections with -fbasic-block-sections=all.

The test reorders the basic blocks to be dis-contiguous in the address space and checks if the back trace contains the right symbol.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D89179
The file was addedlldb/test/Shell/Unwind/basic-block-sections.test
The file was addedlldb/test/Shell/Unwind/Inputs/basic-block-sections.c
Commit 62a0ec1612bd6dee94f900f971afd409ddb62859 by aqjune
Add support for !noundef metatdata on loads

This patch adds metadata !noundef and makes load instructions can optionally have it.
A load with !noundef always return a well-defined value (has no undef bit or isn't poison).
If the loaded value isn't well defined, the behavior is undefined.

This metadata can be used to encode the assumption from C/C++ that certain reads of variables should have well-defined values.
It is helpful for optimizing freeze instructions away, because freeze can be removed when its operand has well-defined value, and showing that a load from arbitrary location is well-defined is usually hard otherwise.

The same information can be encoded with llvm.assume with operand bundle; using metadata is chosen because I wasn't sure whether code motion can be freely done when llvm.assume is inserted from clang instead.
The existing codebase already is stripping unknown metadata when doing code motion, so using metadata is UB-safe as well.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89050
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/freeze-noundef.ll
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/include/llvm/IR/FixedMetadataKinds.def
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 32021eeff0cd4786722e0dd7c31acf7554c6fd0a by Jason Molenda
Un-indent the section on 'Writing Target Stop-Hooks in Python'
it was ending up in a code block from the previous section,
instead of being its own section.
The file was modifiedlldb/docs/use/python-reference.rst
Commit 5564ee495bddeb12d3a9a617631cfa478cf67959 by davelee.com
Revert "Register TargetCXXABI.def as a textual header"

Unbreak module builds.

TargetCXXABI.def has been removed in a revert: 79829a47040512fe54001db839ac59146ca55aec.

This reverts commit 0ff9116b36781d6fa61c25841edd53dc8f366bec.
The file was modifiedclang/include/clang/module.modulemap
Commit ae4fe1984f0e47259b5e476a73749185cc24e1ac by davelee.com
[lldb] Enable cmake policy CMP0077 for option()

In lldb, explicitly set the "option() honors normal variables" CMake policy. This applies for
standalone lldb builds and matches what llvm, clang, etc do. This prevents potentially unwanted
clearing of variables like `LLVM_ENABLE_WARNINGS`, and also prevents unnecessary build warnings.

See: https://cmake.org/cmake/help/latest/policy/CMP0077.html

Differential Revision: https://reviews.llvm.org/D89614
The file was modifiedlldb/CMakeLists.txt
Commit d79ee3a807115f8b96f9f8aa13d99cdea1652980 by david.green
[ARM] Add a very basic active_lane_mask cost

This adds a very basic cost for active_lane_mask under MVE - making the
assumption that they will be free and then apologizing for that in a
comment.

In reality they may either be free (by being nicely folded into a tail
predicated loop), cost the same as a VCTP or be expanded into vdup's,
adds and cmp's. It is difficult to detect the difference from a single
getIntrinsicInstrCost call, so makes the assumption that the vectorizer
is adding them, and only added them where it makes sense.

We may need to change this in the future to better model predicate costs
in the vectorizer, especially at -Os or non-tail predicated loops. The
vectorizer currently does not query the cost of these instructions but
that will change in the future and a zero cost there probably makes the
most sense at the moment.

Differential Revision: https://reviews.llvm.org/D88989
The file was addedllvm/test/Analysis/CostModel/ARM/mve-active_lane_mask.ll
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
Commit b93d74ac9c4e304db6fbc434992c098104ba94a5 by david.green
[ARM] Basic getArithmeticReductionCost reduction costs

This adds some basic costs for MVE reductions - currently just costing
the simple legal add vectors as a single MVE instruction. More complex
costing can be added in the future when the framework more readily
allows it.

Differential Revision: https://reviews.llvm.org/D88980
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modifiedllvm/test/Analysis/CostModel/ARM/mve-vecreduce-add.ll
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Commit 60b19424bb2aebb9b4843e760e165129edcebaf7 by david.green
[NFC] fix some typos in LoopUnrollPass

This patch fixes a couple of typos in the LoopUnrollPass.cpp comments

Differential Revision: https://reviews.llvm.org/D89603
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnrollPass.cpp