Changes

Summary

  1. Revert "[DAG] Create fptosi.sat from clamped fptosi" (details)
  2. [clang][dataflow] Add base types for building dataflow analyses (details)
  3. [MC][ELF] Fix accepting abbreviated form with Type change (details)
  4. [fir] Add fir reduction builder (details)
  5. [lld-macho] Mark dylib symbols coming from -weak_framework as weak-ref. (details)
Commit a87782c34d667d1c1a18fe82a9a7abfc72fd345b by hans
Revert "[DAG] Create fptosi.sat from clamped fptosi"

It causes builds to fail with this assert:

llvm/include/llvm/ADT/APInt.h:990:
bool llvm::APInt::operator==(const llvm::APInt &) const:
Assertion `BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"' failed.

See comment on the code review.

> This adds a fold in DAGCombine to create fptosi_sat from sequences for
> smin(smax(fptosi(x))) nodes, where the min/max saturate the output of
> the fp convert to a specific bitwidth (say INT_MIN and INT_MAX). Because
> it is dealing with smin(/smax) in DAG they may currently be ISD::SMIN,
> ISD::SETCC/ISD::SELECT, ISD::VSELECT or ISD::SELECT_CC nodes which need
> to be handled similarly.
>
> A shouldConvertFpToSat method was added to control when converting may
> be profitable. The original fptosi will have a less strict semantics
> than the fptosisat, with less values that need to produce defined
> behaviour.
>
> This especially helps on ARM/AArch64 where the vcvt instructions
> naturally saturate the result.
>
> Differential Revision: https://reviews.llvm.org/D111976

This reverts commit 52ff3b009388f1bef4854f1b6470b4ec19d10b0e.
The file was modifiedllvm/test/CodeGen/RISCV/fpclamptosat.ll (diff)
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/WebAssembly/fpclamptosat.ll (diff)
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll (diff)
The file was modifiedllvm/test/CodeGen/AArch64/fpclamptosat_vec.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/fpclamptosat.ll (diff)
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.h (diff)
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h (diff)
The file was modifiedllvm/test/CodeGen/AArch64/fpclamptosat.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-fpclamptosat_vec.ll (diff)
The file was modifiedllvm/test/CodeGen/ARM/fpclamptosat.ll (diff)
Commit 6e2aecd759dc3f8bf664323388365ac234271e9b by yitzhakm
[clang][dataflow] Add base types for building dataflow analyses

This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.

Reviewed By: ymandel, xazax.hun, gribozavr2

Differential Revision: https://reviews.llvm.org/D114234
The file was addedclang/include/clang/Analysis/FlowSensitive/DataflowLattice.h
The file was addedclang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
The file was addedclang/lib/Analysis/FlowSensitive/CMakeLists.txt
The file was addedclang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
The file was modifiedclang/lib/Analysis/CMakeLists.txt (diff)
The file was addedclang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
The file was addedclang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
Commit c01c62c76c60a5a5da0496e41faae907944c92dd by abidh
[MC][ELF] Fix accepting abbreviated form with Type change

Follow up to D92052 and D94072, exposed due to D107707

Many assemblers to permit that only the first .section contains all
the attributes like '.lds_bss,"w",@nobits' and later section only
use the name ('.lds_bss') inheriting those attributes from the first
section.  I turned out that the case that Type changed was missed
when implementing it - and D107707 make it much more likely to hit
that issue. That's fixed by this commit.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D114717
The file was modifiedllvm/test/MC/ELF/section-omitted-attributes.s (diff)
The file was modifiedllvm/lib/MC/MCParser/ELFAsmParser.cpp (diff)
Commit cf3422d3df5b00d771bba837b9f51f67ab07eb64 by clementval
[fir] Add fir reduction builder

This patch introduces a bunch of builder functions
to create function calls to runtime reduction functions.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: mleair <leairmark@gmail.com>

Differential Revision: https://reviews.llvm.org/D114460

Reviewed By: awarzynski
The file was modifiedflang/unittests/Optimizer/Builder/Runtime/RuntimeCallTestBase.h (diff)
The file was addedflang/lib/Optimizer/Builder/Runtime/Reduction.cpp
The file was modifiedflang/lib/Optimizer/Builder/CMakeLists.txt (diff)
The file was addedflang/unittests/Optimizer/Builder/Runtime/ReductionTest.cpp
The file was modifiedflang/unittests/Optimizer/CMakeLists.txt (diff)
The file was addedflang/include/flang/Optimizer/Builder/Runtime/Reduction.h
Commit 74cbd71072de4f20c5cb9852dc4cf96ac7a4b5a4 by vyng
[lld-macho] Mark dylib symbols coming from -weak_framework as weak-ref.

PR:52564

Differential Revision: https://reviews.llvm.org/D114397
The file was modifiedlld/MachO/Symbols.h (diff)
The file was modifiedlld/test/MachO/weak-import.s (diff)