SuccessChanges

Summary

  1. Revert r304953 for release 5.0.0 This is causing failures when compiling clang with -O3 as one of the structures used by clang is passed by value and uses the fastcc calling convention. Faliures manifest for stage2 mips build.
  2. [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to. Summary: This fixes PR31777. If both stores' values are ConstantInt, we merge the two stores (shifting the smaller store appropriately) and replace the earlier (and larger) store with an updated constant. In the future we should also support vectors of integers. And maybe float/double if we can. Reviewers: hfinkel, junbuml, jfb, RKSimon, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30703
  3. [InstCombine] Canonicalize clamp of float types to minmax in fast mode. Summary: This commit allows matchSelectPattern to recognize clamp of float arguments in the presence of FMF the same way as already done for integers. This case is a little different though. With integers, given the min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX "automatically". That is not the case for float, because for them only full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care about NaNs. On the other hand, some backends (e.g. X86) have only FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM nodes are illegal thus selection is not happening. So I decided to do such kind of transformation in IR (InstCombiner) instead of complicating the logic in the backend. Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper Reviewed By: efriedma Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits Patch by Andrei Elovikov <andrei.elovikov@intel.com> Differential Revision: https://reviews.llvm.org/D33186
  4. Add some tests for cast+clamp/min/max before D33186. Summary: - add more tests - pr27236.ll: rename %tmpN -> %N because otherwise a FileCheck variable for newly appeared unnamed value would use the same name as tmpN (as generated by update_test_checks.py) - run update_test_checks.py Reviewers: efriedma Reviewed By: efriedma Subscribers: n.bozhenov, llvm-commits Patch by Andrei Elovikov <andrei.elovikov@intel.com> Differential Revision: https://reviews.llvm.org/D35002
  5. [clang-tidy] Add missing documents for "IgnoreMacros" option.
  6. [clang-tidy] Ignore macros in make-unique check. Summary: The check doesn't fully support smart-ptr usages inside macros, which may cause incorrect fixes, or even crashes, ignore them for now. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36264
  7. [AMDGPU] Fixed MSVC build break Error was: field of type 'llvm::ArgDescriptor' has private default constructor const AMDGPUFunctionArgInfo AMDGPUArgumentUsageInfo::ExternFunctionInfo{}; ^
  8. [Driver] Error if ARM mode was selected explicitly for M-profile CPUs. Summary: M-class profiles do not support ARM execution mode, so providing -marm/-mno-thumb does not make sense in combination with -mcpu/-march options that support the M-profile. This is a follow-up patch to D35569 and it seemed pretty clear that we should emit an error in the driver in this case. We probably also should warn/error if the provided -mcpu/-march options do not match, e.g. -mcpu=cortex-m0 -march=armv8-a is invalid, as cortex-m0 does not support armv8-a. But that should be a separate patch I think. Reviewers: echristo, richard.barton.arm, rengolin, labrinea, charles.baylis Reviewed By: rengolin Subscribers: aemerson, javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D35826
  9. [mips][microMIPS] Extending size reduction pass with ADDIUSP and ADDIUR1SP Author: milena.vujosevic.janicic The patch extends size reduction pass for MicroMIPS. The following instructions are examined and transformed, if possible: ADDIU instruction is transformed into 16-bit instruction ADDIUSP ADDIU instruction is transformed into 16-bit instruction ADDIUR1SP Usage of u_int64_t replaced by uint64_t to avoid issues because of which previous patch version was reverted: Differential Revision: https://reviews.llvm.org/D34511
Revision 310057 by smaksimovic:
Revert r304953 for release 5.0.0

This is causing failures when compiling clang with -O3
as one of the structures used by clang is passed by
value and uses the fastcc calling convention.

Faliures manifest for stage2 mips build.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Driver/Options.tdclang.src/include/clang/Driver/Options.td
The file was modified/cfe/trunk/lib/Basic/Targets/Mips.cppclang.src/lib/Basic/Targets/Mips.cpp
The file was modified/cfe/trunk/lib/Basic/Targets/Mips.hclang.src/lib/Basic/Targets/Mips.h
The file was modified/cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cppclang.src/lib/Driver/ToolChains/Arch/Mips.cpp
The file was removed/cfe/trunk/test/CodeGen/mips-madd4.cclang.src/test/CodeGen/mips-madd4.c
The file was modified/cfe/trunk/test/Preprocessor/init.cclang.src/test/Preprocessor/init.c
Revision 310055 by filcab:
[DSE] Merge stores when the later store only writes to memory locations the early store also wrote to.

Summary:
This fixes PR31777.

If both stores' values are ConstantInt, we merge the two stores
(shifting the smaller store appropriately) and replace the earlier (and
larger) store with an updated constant.

In the future we should also support vectors of integers. And maybe
float/double if we can.

Reviewers: hfinkel, junbuml, jfb, RKSimon, bkramer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30703
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cppllvm.src/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modified/llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.llllvm.src/test/Transforms/DeadStoreElimination/PartialStore.ll
The file was modified/llvm/trunk/test/Transforms/DeadStoreElimination/combined-partial-overwrites.llllvm.src/test/Transforms/DeadStoreElimination/combined-partial-overwrites.ll
The file was added/llvm/trunk/test/Transforms/DeadStoreElimination/merge-stores-big-endian.llllvm.src/test/Transforms/DeadStoreElimination/merge-stores-big-endian.ll
The file was added/llvm/trunk/test/Transforms/DeadStoreElimination/merge-stores.llllvm.src/test/Transforms/DeadStoreElimination/merge-stores.ll
Revision 310054 by n.bozhenov:
[InstCombine] Canonicalize clamp of float types to minmax in fast mode.

Summary:
This commit allows matchSelectPattern to recognize clamp of float
arguments in the presence of FMF the same way as already done for
integers.

This case is a little different though. With integers, given the
min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX
"automatically". That is not the case for float, because for them only
full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care
about NaNs. On the other hand, some backends (e.g. X86) have only
FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM
nodes are illegal thus selection is not happening. So I decided to do
such kind of transformation in IR (InstCombiner) instead of
complicating the logic in the backend.

Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper

Reviewed By: efriedma

Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits

Patch by Andrei Elovikov <andrei.elovikov@intel.com>

Differential Revision: https://reviews.llvm.org/D33186
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/PatternMatch.hllvm.src/include/llvm/IR/PatternMatch.h
The file was modified/llvm/trunk/lib/Analysis/ValueTracking.cppllvm.src/lib/Analysis/ValueTracking.cpp
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cppllvm.src/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/clamp-to-minmax.llllvm.src/test/Transforms/InstCombine/clamp-to-minmax.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/minmax-fold.llllvm.src/test/Transforms/InstCombine/minmax-fold.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/pr27236.llllvm.src/test/Transforms/InstCombine/pr27236.ll
Revision 310053 by n.bozhenov:
Add some tests for cast+clamp/min/max before D33186.

Summary:
- add more tests
- pr27236.ll: rename %tmpN -> %N because otherwise a FileCheck
  variable for newly appeared unnamed value would use the same name as
  tmpN (as generated by update_test_checks.py)
- run update_test_checks.py

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: n.bozhenov, llvm-commits

Patch by Andrei Elovikov <andrei.elovikov@intel.com>

Differential Revision: https://reviews.llvm.org/D35002
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/clamp-to-minmax.llllvm.src/test/Transforms/InstCombine/clamp-to-minmax.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/minmax-fold.llllvm.src/test/Transforms/InstCombine/minmax-fold.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/pr27236.llllvm.src/test/Transforms/InstCombine/pr27236.ll
Revision 310051 by hokein:
[clang-tidy] Add missing documents for "IgnoreMacros" option.
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-make-shared.rstclang-tools-extra.src/docs/clang-tidy/checks/modernize-make-shared.rst
The file was modified/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-bool-literals.rstclang-tools-extra.src/docs/clang-tidy/checks/modernize-use-bool-literals.rst
The file was modified/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-using.rstclang-tools-extra.src/docs/clang-tidy/checks/modernize-use-using.rst
The file was modified/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-declaration.rstclang-tools-extra.src/docs/clang-tidy/checks/readability-redundant-declaration.rst
Revision 310050 by hokein:
[clang-tidy] Ignore macros in make-unique check.

Summary:
The check doesn't fully support smart-ptr usages inside macros, which
may cause incorrect fixes, or even crashes, ignore them for now.

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: JDevlieghere, xazax.hun, cfe-commits

Differential Revision: https://reviews.llvm.org/D36264
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clang-tidy/modernize/MakeSmartPtrCheck.cppclang-tools-extra.src/clang-tidy/modernize/MakeSmartPtrCheck.cpp
The file was modified/clang-tools-extra/trunk/clang-tidy/modernize/MakeSmartPtrCheck.hclang-tools-extra.src/clang-tidy/modernize/MakeSmartPtrCheck.h
The file was modified/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-make-unique.rstclang-tools-extra.src/docs/clang-tidy/checks/modernize-make-unique.rst
The file was added/clang-tools-extra/trunk/test/clang-tidy/modernize-make-unique-macros.cppclang-tools-extra.src/test/clang-tidy/modernize-make-unique-macros.cpp
The file was modified/clang-tools-extra/trunk/test/clang-tidy/modernize-make-unique.cppclang-tools-extra.src/test/clang-tidy/modernize-make-unique.cpp
Revision 310048 by fgross:
[AMDGPU] Fixed MSVC build break

Error was:

field of type 'llvm::ArgDescriptor' has private default constructor
const AMDGPUFunctionArgInfo AMDGPUArgumentUsageInfo::ExternFunctionInfo{};
                                                                        ^
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.hllvm.src/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
Revision 310047 by fhahn:
[Driver] Error if ARM mode was selected explicitly for M-profile CPUs.

Summary:
M-class profiles do not support ARM execution mode, so providing
-marm/-mno-thumb does not make sense in combination with -mcpu/-march
options that support the M-profile.

This is a follow-up patch to D35569 and it seemed pretty clear that we
should emit an error in the driver in this case.

We probably also should warn/error if the provided -mcpu/-march options
do not match, e.g. -mcpu=cortex-m0 -march=armv8-a is invalid, as
cortex-m0 does not support armv8-a. But that should be a separate patch
I think.


Reviewers: echristo, richard.barton.arm, rengolin, labrinea, charles.baylis

Reviewed By: rengolin

Subscribers: aemerson, javed.absar, kristof.beyls, cfe-commits

Differential Revision: https://reviews.llvm.org/D35826
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.tdclang.src/include/clang/Basic/DiagnosticDriverKinds.td
The file was modified/cfe/trunk/lib/Driver/ToolChain.cppclang.src/lib/Driver/ToolChain.cpp
The file was added/cfe/trunk/test/Driver/arm-thumb-only-cores.cclang.src/test/Driver/arm-thumb-only-cores.c
Revision 310044 by zjovanovic:
[mips][microMIPS] Extending size reduction pass with ADDIUSP and ADDIUR1SP
Author: milena.vujosevic.janicic
The patch extends size reduction pass for MicroMIPS.
The following instructions are examined and transformed, if possible:
ADDIU instruction is transformed into 16-bit instruction ADDIUSP
ADDIU instruction is transformed into 16-bit instruction ADDIUR1SP
Usage of u_int64_t replaced by uint64_t to avoid issues because of which previous patch version was reverted:
Differential Revision: https://reviews.llvm.org/D34511
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/Mips/MicroMipsSizeReduction.cppllvm.src/lib/Target/Mips/MicroMipsSizeReduction.cpp
The file was added/llvm/trunk/test/CodeGen/Mips/micromips-sizereduction/micromips-addiur1sp-addiusp.llllvm.src/test/CodeGen/Mips/micromips-sizereduction/micromips-addiur1sp-addiusp.ll