1. DWARFDebugLoclists: Add an api to get the location lists of a DWARF unit (details)
  2. [InstCombine] propagate fast-math-flags (FMF) to select when inverting (details)
Commit 1eea3fa063884e36165d122db32228f307793485 by pavel
DWARFDebugLoclists: Add an api to get the location lists of a DWARF unit
Summary: This avoid the need to duplicate the location lists searching
logic in various users. The "inline location list dumping" code (which
is the only user actually updated to handle DWARF v5 location lists)  is
switched to this method. After adding v4 location list support, I'll
switch other users too.
Reviewers: dblaikie, probinson, JDevlieghere, aprantl, SouraVX
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDie.cpp
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
Commit 3d6b53980ce4ee855484fc8ae6ac3f99c85e48c3 by spatel
[InstCombine] propagate fast-math-flags (FMF) to select when inverting
As noted by the FIXME comment, this is not correct based on our current
FMF semantics. We should be propagating FMF from the final value in a
sequence (in this case the
'select'). So the behavior even without this patch is wrong, but we did
not allow FMF on 'select' until recently.
But if we do the correct thing right now in this patch, we'll inevitably
introduce regressions because we have not wired up FMF propagation for
'phi' and 'select' in other passes (like SimplifyCFG) or other places in
InstCombine. I'm not seeing a better incremental way to make progress.
That said, the potential extra damage over the existing wrong behavior
from this patch is very limited. AFAIK, the only way to have different
FMF on IR in the same function is if we have LTO inlined IR from 2
modules that were compiled using different fast-math settings.
As seen in the tests, we may actually see some improvements with this
patch because adding the FMF to the 'select' allows matching to min/max
intrinsics that were previously missed (in the common case, the 'fcmp'
and 'select' should have identical FMF to begin with).
Next steps in the transition:
    Make similar changes in instcombine as needed.
   Enable phi-to-select FMF propagation in SimplifyCFG.
   Remove dependencies on fcmp with FMF.
   Deprecate FMF on fcmp.
Differential Revision:
The file was modifiedllvm/test/Transforms/InstCombine/minmax-fp.ll
The file was modifiedllvm/test/Transforms/InstCombine/unordered-fcmp-select.ll
The file was modifiedllvm/test/Transforms/InstCombine/clamp-to-minmax.ll
The file was modifiedllvm/test/Transforms/InstCombine/minmax-fold.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp