SuccessChanges

Summary

  1. [RISCV] Fix RISCVTTIImpl::getIntImmCost for immediates where getMinSignedBits() > 64 APInt::getSExtValue will assert if getMinSignedBits() > 64. This can happen, for instance, if examining an i128. Avoid this assertion by checking Imm.getMinSignedBits() <= 64 before doing getTLI()->isLegalAddImmediate(Imm.getSExtValue()). We could directly check getMinSignedBits() <= 12 but it seems better to reuse the isLegalAddImmediate helper for this. Differential Revision: https://reviews.llvm.org/D64390
  2. [docs][llvm-nm] Improve some wording In particular, the --debug-syms switch really doesn't have anything to do with debuggers, so I've updated the document accordingly.
  3. [SelectionDAG] Simplify some calls to getSetCCResultType. NFC DAGTypeLegalizer and SelectionDAGLegalize has helper functions wrapping the call to TLI.getSetCCResultType(...). Use those helpers in more places.
  4. [LegalizeTypes] Fix saturation bug for smul.fix.sat Summary: Make sure we use SETGE instead of SETGT when checking if the sign bit is zero at SMULFIXSAT expansion. The faulty expansion occured when doing "expand" of SMULFIXSAT and the scale was exactly matching the size of the smaller type. For example doing i64 Z = SMULFIXSAT X, Y, 32 and expanding X/Y/Z into using two i32 values. The problem was that we sometimes did not saturate to min when overflowing. Here is an example using Q3.4 numbers: Consider that we are multiplying X and Y. X = 0x80 (-8.0 as Q3.4) Y = 0x20 (2.0 as Q3.4) To avoid loss of precision we do a widening multiplication, getting a 16 bit result Z = 0xF000 (-16.0 as Q7.8) To detect negative overflow we should check if the five most significant bits in Z are less than -1. Assume that we name the 4 most significant bits as HH and the next 4 bits as HL. Then we can do the check by examining if (HH < -1) or (HH == -1 && "sign bit in HL is zero"). The fault was that we have been doing the check as (HH < -1) or (HH == -1 && HL > 0) instead of (HH < -1) or (HH == -1 && HL >= 0). In our example HH is -1 and HL is 0, so the old code did not trigger saturation and simply truncated the result to 0x00 (0.0). With the bugfix we instead detect that we should saturate to min, and the result will be set to 0x80 (-8.0). Reviewers: leonardchan, bevinh Reviewed By: leonardchan Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64331
  5. Retire VS2015 Support As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017. Differential Revision: https://reviews.llvm.org/D64326
  6. [docs][llvm-dwarfdump] Make some option descriptions clearer and more precise Some of the wording in the doc (taken largely from the help text), was a little imprecise in some cases, so this patch makes it a little more precise. Reviewed by: JDevlieghere, probinson Differential Revision: https://reviews.llvm.org/D64332
  7. [llvm-profdata] Don't make the output overwrite the input file. Some file systems may not allow this behavior, the test fails on our internal system ("Permission denied").
Revision 365462 by asb:
[RISCV] Fix RISCVTTIImpl::getIntImmCost for immediates where getMinSignedBits() > 64

APInt::getSExtValue will assert if getMinSignedBits() > 64. This can happen,
for instance, if examining an i128. Avoid this assertion by checking
Imm.getMinSignedBits() <= 64 before doing
getTLI()->isLegalAddImmediate(Imm.getSExtValue()). We could directly check
getMinSignedBits() <= 12 but it seems better to reuse the isLegalAddImmediate
helper for this.

Differential Revision: https://reviews.llvm.org/D64390
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/RISCV/RISCVTargetTransformInfo.cpptrunk/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
The file was modified/llvm/trunk/test/Transforms/ConstantHoisting/RISCV/immediates.lltrunk/test/Transforms/ConstantHoisting/RISCV/immediates.ll
Revision 365461 by jhenderson:
[docs][llvm-nm] Improve some wording

In particular, the --debug-syms switch really doesn't have anything to
do with debuggers, so I've updated the document accordingly.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/llvm-nm.rsttrunk/docs/CommandGuide/llvm-nm.rst
Revision 365456 by bjope:
[SelectionDAG] Simplify some calls to getSetCCResultType. NFC

DAGTypeLegalizer and SelectionDAGLegalize has helper
functions wrapping the call to TLI.getSetCCResultType(...).
Use those helpers in more places.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpptrunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpptrunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpptrunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Revision 365455 by bjope:
[LegalizeTypes] Fix saturation bug for smul.fix.sat

Summary:
Make sure we use SETGE instead of SETGT when checking
if the sign bit is zero at SMULFIXSAT expansion.

The faulty expansion occured when doing "expand" of
SMULFIXSAT and the scale was exactly matching the
size of the smaller type. For example doing
  i64 Z = SMULFIXSAT X, Y, 32
and expanding X/Y/Z into using two i32 values.

The problem was that we sometimes did not saturate
to min when overflowing.

Here is an example using Q3.4 numbers:

Consider that we are multiplying X and Y.
  X = 0x80 (-8.0 as Q3.4)
  Y = 0x20 (2.0 as Q3.4)
To avoid loss of precision we do a widening
multiplication, getting a 16 bit result
  Z = 0xF000 (-16.0 as Q7.8)

To detect negative overflow we should check if
the five most significant bits in Z are less than -1.
Assume that we name the 4 most significant bits
as HH and the next 4 bits as HL. Then we can do the
check by examining if
(HH < -1) or (HH == -1 && "sign bit in HL is zero").

The fault was that we have been doing the check as
(HH < -1) or (HH == -1 && HL > 0)
instead of
(HH < -1) or (HH == -1 && HL >= 0).

In our example HH is -1 and HL is 0, so the old
code did not trigger saturation and simply truncated
the result to 0x00 (0.0). With the bugfix we instead
detect that we should saturate to min, and the result
will be set to 0x80 (-8.0).

Reviewers: leonardchan, bevinh

Reviewed By: leonardchan

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64331
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpptrunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/smul_fix_sat.lltrunk/test/CodeGen/X86/smul_fix_sat.ll
Revision 365452 by rksimon:
Retire VS2015 Support

As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html

This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017.

Differential Revision: https://reviews.llvm.org/D64326
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/cmake/modules/CheckCompilerVersion.cmaketrunk/cmake/modules/CheckCompilerVersion.cmake
The file was modified/llvm/trunk/docs/GettingStarted.rsttrunk/docs/GettingStarted.rst
The file was modified/llvm/trunk/docs/GettingStartedVS.rsttrunk/docs/GettingStartedVS.rst
The file was modified/llvm/trunk/docs/ReleaseNotes.rsttrunk/docs/ReleaseNotes.rst
Revision 365451 by jhenderson:
[docs][llvm-dwarfdump] Make some option descriptions clearer and more precise

Some of the wording in the doc (taken largely from the help text), was a
little imprecise in some cases, so this patch makes it a little more
precise.

Reviewed by: JDevlieghere, probinson

Differential Revision: https://reviews.llvm.org/D64332
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/llvm-dwarfdump.rsttrunk/docs/CommandGuide/llvm-dwarfdump.rst
Revision 365450 by hokein:
[llvm-profdata] Don't make the output overwrite the input file.

Some file systems may not allow this behavior, the test fails on our internal
system ("Permission denied").
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/llvm-profdata/same-filename.testtrunk/test/tools/llvm-profdata/same-filename.test

Summary

  1. Retire VS2015 Support As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017. Differential Revision: https://reviews.llvm.org/D64326
Revision 365454 by rksimon:
Retire VS2015 Support

As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html

This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017.

Differential Revision: https://reviews.llvm.org/D64326
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/www/get_started.htmltrunk/www/get_started.html

Summary

  1. Fixed assertion
  2. dummy variable extraction on a function scope Summary: - Added extraction to a dummy variable - using auto for the dummy variable type for now - Works on a function scope - Adding braces to create a compound statement not supported yet - added unit tests Reviewers: sammccall, kadircet Subscribers: mgorny, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63773
Revision 365460 by sureyeaah:
Fixed assertion
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/refactor/tweaks/ExtractVariable.cpptrunk/clangd/refactor/tweaks/ExtractVariable.cpp
Revision 365453 by sureyeaah:
dummy variable extraction on a function scope

Summary:
- Added extraction to a dummy variable
- using auto for the dummy variable type for now
- Works on a function scope
- Adding braces to create a compound statement not supported yet
- added unit tests

Reviewers: sammccall, kadircet

Subscribers: mgorny, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63773
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/refactor/tweaks/CMakeLists.txttrunk/clangd/refactor/tweaks/CMakeLists.txt
The file was added/clang-tools-extra/trunk/clangd/refactor/tweaks/ExtractVariable.cpptrunk/clangd/refactor/tweaks/ExtractVariable.cpp
The file was modified/clang-tools-extra/trunk/clangd/unittests/TweakTests.cpptrunk/clangd/unittests/TweakTests.cpp