SuccessChanges

Summary

  1. GlobalISel: map 128-bit values to an FPR by default. Eventually we may want to allow a pair of GPRs but absolutely nothing in the entire world is ready for that yet.
  2. [lit] Dump some FileCheck inputs to try to debug some failing tests
  3. [lit] Fix shtest-format external_shell failures When using win32 cmd.exe, turn off command echoing at the beginning of the script (@echo off). Replace a bash shell script with a python script for the fail_with_bad_encoding test.
  4. AMDGPU: Annotate implicitarg.ptr usage We need to pass something to functions for this to work. It isn't derivable just from the kernarg segment pointer because the implicit arguments are placed after the kernel arguments. Also fixes missing test for the intrinsic.
  5. [GVN] Recommit the patch "Add phi-translate support in scalarpre" Recommit after workaround the bug PR31652. Three bugs fixed in previous recommits: The first one is to use CurrentBlock instead of PREInstr's Parent as param of performScalarPREInsertion because the Parent of a clone instruction may be uninitialized. The second one is stop PRE when CurrentBlock to its predecessor is a backedge and an operand of CurInst is defined inside of CurrentBlock. The same value defined inside of loop in last iteration can not be regarded as available. The third one is an out-of-bound array access in a flipped if guard. Right now scalarpre doesn't have phi-translate support, so it will miss some simple pre opportunities. Like the following testcase, current scalarpre cannot recognize the last "a * b" is fully redundent because a and b used by the last "a * b" expr are both defined by phis. long a[100], b[100], g1, g2, g3; __attribute__((pure)) long goo(); void foo(long a, long b, long c, long d) { g1 = a * b; if (__builtin_expect(g2 > 3, 0)) { a = c; b = d; g2 = a * b; } g3 = a * b; // fully redundant. } The patch adds phi-translate support in scalarpre. This is only a temporary solution before the newpre based on newgvn is available. Differential Revision: https://reviews.llvm.org/D32252
  6. [CMake] NFC. Add clang-tablegen-targets utility target By creating this target other projects that depend on clang-generated headers (like LLDB) will no longer be order-dependent on Clang being processed by CMake first. Also, by creating a dummy of this target in ClangConfig.cmake, projects that can build against out-of-tree clang can freely depend on the target without needing to have conditionals for if clang is in-tree or out-of-tree.
  7. [CMake] NFC. Add intrinsics_gen target to CMake Exports By creating a dummy of this target in LLVMConfig.cmake, projects that can build against out-of-tree LLVM can freely depend on the target without needing to have conditionals for if LLVM is in-tree or out-of-tree.
  8. Change INSTR_PROF_DEFAULT_NUM_VAL_PER_SITE from 8 to 16. Summary: In the current implementation, the defaul number of values per site tracked by value profiler is 8, which is too small and could introduce inaccuracies to profile. Changing it to 16 will be able to gain more accurate value profiler. Reviewers: davidxl, tejohnson Reviewed By: tejohnson Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D35964
  9. Recommit r308327 3rd time: Add a warning for missing '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files The second recommit (r309106) was reverted because the "non-default #pragma pack value chages the alignment of struct or union members in the included file" warning proved to be too aggressive for external projects like Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=749197). This recommit makes the problematic warning a non-default one, and gives it the -Wpragma-pack-suspicious-include warning option. The first recommit (r308441) caused a "non-default #pragma pack value might change the alignment of struct or union members in the included file" warning in LLVM itself. This recommit tweaks the added warning to avoid warnings for #includes that don't have any records that are affected by the non-default alignment. This tweak avoids the previously emitted warning in LLVM. Original message: This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484
  10. [ValueTracking] Remove a number of unused arguments. NFC.
  11. [AArch64] Standardize suffixes for LSE Atomics mnemonics (NFCI) This NFC changeset standardizes the suffixes used for LSE Atomics instructions. It changes the existing suffixes - 'b', 'h', 's', 'd' - to the existing standard 'B', 'H', 'W' and 'X'. This changeset is the result of the code review discussion for D35319. Patch by: steleman Differential Revision: https://reviews.llvm.org/D35927
  12. Strip trailing whitespace. NFCI.
  13. [X86] Add tests showing inability of vector non-temporal load/store intrinsic to force pointer alignment (PR33830) Clang specifies a max type alignment of 16 bytes on darwin targets, meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores.
  14. [ARM] Add the option to directly access TLS pointer This patch enables choice for accessing thread local storage pointer (like '-mtp' in gcc). Differential Revision: https://reviews.llvm.org/D34408
  15. [clang-tidy] Expand readability-redundant-function-ptr-dereference test
  16. [clang-tidy] readability-redundant-declaration: ignore friends and macros
  17. [clangd] Workaround for a test failure on Windows. Previous workaround (r308959) didn't account for a case when system drive letter is not 'C:'.
Revision 309404 by Tim Northover:
GlobalISel: map 128-bit values to an FPR by default.

Eventually we may want to allow a pair of GPRs but absolutely nothing in the
entire world is ready for that yet.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64RegisterBankInfo.cppllvm.src/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
The file was modified/llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-fallback.llllvm.src/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
The file was added/llvm/trunk/test/CodeGen/AArch64/reg-bank-128bit.mirllvm.src/test/CodeGen/AArch64/reg-bank-128bit.mir
Revision 309400 by rnk:
[lit] Dump some FileCheck inputs to try to debug some failing tests
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/lit/tests/googletest-format.pyllvm.src/utils/lit/tests/googletest-format.py
The file was modified/llvm/trunk/utils/lit/tests/shtest-shell.pyllvm.src/utils/lit/tests/shtest-shell.py
Revision 309399 by rnk:
[lit] Fix shtest-format external_shell failures

When using win32 cmd.exe, turn off command echoing at the beginning of
the script (@echo off).

Replace a bash shell script with a python script for the
fail_with_bad_encoding test.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/lit/lit/TestRunner.pyllvm.src/utils/lit/lit/TestRunner.py
The file was modified/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txtllvm.src/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt
The file was added/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.pyllvm.src/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
The file was removed/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.shllvm.src/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.sh
Revision 309398 by arsenm:
AMDGPU: Annotate implicitarg.ptr usage

We need to pass something to functions for this to work.
It isn't derivable just from the kernarg segment pointer
because the implicit arguments are placed after the
kernel arguments.

Also fixes missing test for the intrinsic.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cppllvm.src/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.hllvm.src/lib/Target/AMDGPU/AMDGPUSubtarget.h
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cppllvm.src/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.hllvm.src/lib/Target/AMDGPU/SIISelLowering.h
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.cppllvm.src/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIMachineFunctionInfo.hllvm.src/lib/Target/AMDGPU/SIMachineFunctionInfo.h
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.llllvm.src/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
The file was added/llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.implicitarg.ptr.llllvm.src/test/CodeGen/AMDGPU/llvm.amdgcn.implicitarg.ptr.ll
Revision 309397 by wmi:
[GVN] Recommit the patch "Add phi-translate support in scalarpre"

Recommit after workaround the bug PR31652.

Three bugs fixed in previous recommits: The first one is to use CurrentBlock
instead of PREInstr's Parent as param of performScalarPREInsertion because
the Parent of a clone instruction may be uninitialized. The second one is stop
PRE when CurrentBlock to its predecessor is a backedge and an operand of CurInst
is defined inside of CurrentBlock. The same value defined inside of loop in last
iteration can not be regarded as available. The third one is an out-of-bound
array access in a flipped if guard.

Right now scalarpre doesn't have phi-translate support, so it will miss some
simple pre opportunities. Like the following testcase, current scalarpre cannot
recognize the last "a * b" is fully redundent because a and b used by the last
"a * b" expr are both defined by phis.

long a[100], b[100], g1, g2, g3;
__attribute__((pure)) long goo();

void foo(long a, long b, long c, long d) {

  g1 = a * b;
  if (__builtin_expect(g2 > 3, 0)) {
    a = c;
    b = d;
    g2 = a * b;
  }
  g3 = a * b;      // fully redundant.

}

The patch adds phi-translate support in scalarpre. This is only a temporary
solution before the newpre based on newgvn is available.

Differential Revision: https://reviews.llvm.org/D32252
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/Scalar/GVN.hllvm.src/include/llvm/Transforms/Scalar/GVN.h
The file was modified/llvm/trunk/lib/Transforms/Scalar/GVN.cppllvm.src/lib/Transforms/Scalar/GVN.cpp
The file was added/llvm/trunk/test/Transforms/GVN/PRE/phi-translate-2.llllvm.src/test/Transforms/GVN/PRE/phi-translate-2.ll
The file was modified/llvm/trunk/test/Transforms/GVN/PRE/pre-gep-load.llllvm.src/test/Transforms/GVN/PRE/pre-gep-load.ll
The file was modified/llvm/trunk/test/Transforms/GVN/PRE/pre-load.llllvm.src/test/Transforms/GVN/PRE/pre-load.ll
Revision 309390 by cbieneman:
[CMake]  NFC. Add clang-tablegen-targets utility target

By creating this target other projects that depend on clang-generated headers (like LLDB) will no longer be order-dependent on Clang being processed by CMake first.

Also, by creating a dummy of this target in ClangConfig.cmake, projects that can build against out-of-tree clang can freely depend on the target without needing to have conditionals for if clang is in-tree or out-of-tree.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/CMakeLists.txtclang.src/CMakeLists.txt
The file was modified/cfe/trunk/cmake/modules/ClangConfig.cmake.inclang.src/cmake/modules/ClangConfig.cmake.in
Revision 309389 by cbieneman:
[CMake]  NFC. Add intrinsics_gen target to CMake Exports

By creating a dummy of this target in LLVMConfig.cmake, projects that can build against out-of-tree LLVM can freely depend on the target without needing to have conditionals for if LLVM is in-tree or out-of-tree.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/cmake/modules/LLVMConfig.cmake.inllvm.src/cmake/modules/LLVMConfig.cmake.in
Revision 309388 by dehao:
Change INSTR_PROF_DEFAULT_NUM_VAL_PER_SITE from 8 to 16.

Summary: In the current implementation, the defaul number of values per site tracked by value profiler is 8, which is too small and could introduce inaccuracies to profile. Changing it to 16 will be able to gain more accurate value profiler.

Reviewers: davidxl, tejohnson

Reviewed By: tejohnson

Subscribers: sanjoy, llvm-commits

Differential Revision: https://reviews.llvm.org/D35964
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/profile/InstrProfilingValue.ccompiler-rt.src/lib/profile/InstrProfilingValue.c
Revision 309386 by arphaman:
Recommit r308327 3rd time: Add a warning for missing
'#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files

The second recommit (r309106) was reverted because the "non-default #pragma
pack value chages the alignment of struct or union members in the included file"
warning proved to be too aggressive for external projects like Chromium
(https://bugs.chromium.org/p/chromium/issues/detail?id=749197). This recommit
makes the problematic warning a non-default one, and gives it the
-Wpragma-pack-suspicious-include warning option.

The first recommit (r308441) caused a "non-default #pragma pack value might
change the alignment of struct or union members in the included file" warning
in LLVM itself. This recommit tweaks the added warning to avoid warnings for
#includes that don't have any records that are affected by the non-default
alignment. This tweak avoids the previously emitted warning in LLVM.

Original message:

This commit adds a new -Wpragma-pack warning. It warns in the following cases:

- When a translation unit is missing terminating #pragma pack (pop) directives.
- When entering an included file if the current alignment value as determined
  by '#pragma pack' directives is different from the default alignment value.
- When leaving an included file that changed the state of the current alignment
  value.

rdar://10184173

Differential Revision: https://reviews.llvm.org/D35484
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticGroups.tdclang.src/include/clang/Basic/DiagnosticGroups.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.tdclang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/include/clang/Lex/PPCallbacks.hclang.src/include/clang/Lex/PPCallbacks.h
The file was modified/cfe/trunk/include/clang/Sema/Sema.hclang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/include/clang/Serialization/ASTReader.hclang.src/include/clang/Serialization/ASTReader.h
The file was modified/cfe/trunk/lib/Parse/ParsePragma.cppclang.src/lib/Parse/ParsePragma.cpp
The file was modified/cfe/trunk/lib/Sema/Sema.cppclang.src/lib/Sema/Sema.cpp
The file was modified/cfe/trunk/lib/Sema/SemaAttr.cppclang.src/lib/Sema/SemaAttr.cpp
The file was modified/cfe/trunk/lib/Serialization/ASTReader.cppclang.src/lib/Serialization/ASTReader.cpp
The file was modified/cfe/trunk/lib/Serialization/ASTWriter.cppclang.src/lib/Serialization/ASTWriter.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_simd_messages.cppclang.src/test/OpenMP/declare_simd_messages.cpp
The file was modified/cfe/trunk/test/PCH/pragma-pack.cclang.src/test/PCH/pragma-pack.c
The file was added/cfe/trunk/test/PCH/suspicious-pragma-pack.cclang.src/test/PCH/suspicious-pragma-pack.c
The file was modified/cfe/trunk/test/Parser/pragma-options.cclang.src/test/Parser/pragma-options.c
The file was modified/cfe/trunk/test/Parser/pragma-options.cppclang.src/test/Parser/pragma-options.cpp
The file was modified/cfe/trunk/test/Parser/pragma-pack.cclang.src/test/Parser/pragma-pack.c
The file was added/cfe/trunk/test/Sema/Inputs/pragma-pack1.hclang.src/test/Sema/Inputs/pragma-pack1.h
The file was added/cfe/trunk/test/Sema/Inputs/pragma-pack2.hclang.src/test/Sema/Inputs/pragma-pack2.h
The file was modified/cfe/trunk/test/Sema/pragma-pack.cclang.src/test/Sema/pragma-pack.c
The file was added/cfe/trunk/test/Sema/suspicious-pragma-pack.cclang.src/test/Sema/suspicious-pragma-pack.c
The file was added/cfe/trunk/test/SemaObjC/Inputs/empty.hclang.src/test/SemaObjC/Inputs/empty.h
The file was added/cfe/trunk/test/SemaObjC/suspicious-pragma-pack.mclang.src/test/SemaObjC/suspicious-pragma-pack.m
Revision 309385 by mcrosier:
[ValueTracking] Remove a number of unused arguments. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/ValueTracking.hllvm.src/include/llvm/Analysis/ValueTracking.h
The file was modified/llvm/trunk/lib/Analysis/ValueTracking.cppllvm.src/lib/Analysis/ValueTracking.cpp
Revision 309384 by joel_k_jones:
[AArch64] Standardize suffixes for LSE Atomics mnemonics (NFCI)

This NFC changeset standardizes the suffixes used for LSE Atomics
instructions.

It changes the existing suffixes - 'b', 'h', 's', 'd' - to the existing
standard 'B', 'H', 'W' and 'X'.

This changeset is the result of the code review discussion for D35319.

Patch by: steleman

Differential Revision: https://reviews.llvm.org/D35927
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cppllvm.src/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrAtomics.tdllvm.src/lib/Target/AArch64/AArch64InstrAtomics.td
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrFormats.tdllvm.src/lib/Target/AArch64/AArch64InstrFormats.td
Revision 309383 by rksimon:
Strip trailing whitespace. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Headers/avx512fintrin.hclang.src/lib/Headers/avx512fintrin.h
Revision 309382 by rksimon:
[X86] Add tests showing inability of vector non-temporal load/store intrinsic to force pointer alignment (PR33830)

Clang specifies a max type alignment of 16 bytes on darwin targets, meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores.
Change TypePath in RepositoryPath in Workspace
The file was added/cfe/trunk/test/CodeGen/x86-nontemporal.cclang.src/test/CodeGen/x86-nontemporal.c
Revision 309381 by spetrovic:
[ARM] Add the option to directly access TLS pointer

This patch enables choice for accessing thread local
storage pointer (like '-mtp' in gcc).

Differential Revision: https://reviews.llvm.org/D34408
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/ARM/ARM.tdllvm.src/lib/Target/ARM/ARM.td
The file was modified/llvm/trunk/lib/Target/ARM/ARMInstrInfo.tdllvm.src/lib/Target/ARM/ARMInstrInfo.td
The file was modified/llvm/trunk/lib/Target/ARM/ARMSubtarget.hllvm.src/lib/Target/ARM/ARMSubtarget.h
The file was added/llvm/trunk/test/CodeGen/ARM/readtp.llllvm.src/test/CodeGen/ARM/readtp.ll
Revision 309380 by alexfh:
[clang-tidy] Expand readability-redundant-function-ptr-dereference test
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/test/clang-tidy/readability-redundant-function-ptr-dereference.cppclang-tools-extra.src/test/clang-tidy/readability-redundant-function-ptr-dereference.cpp
Revision 309379 by alexfh:
[clang-tidy] readability-redundant-declaration: ignore friends and macros
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clang-tidy/readability/RedundantDeclarationCheck.cppclang-tools-extra.src/clang-tidy/readability/RedundantDeclarationCheck.cpp
The file was modified/clang-tools-extra/trunk/clang-tidy/readability/RedundantDeclarationCheck.hclang-tools-extra.src/clang-tidy/readability/RedundantDeclarationCheck.h
The file was added/clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration-ignore-macros.cppclang-tools-extra.src/test/clang-tidy/readability-redundant-declaration-ignore-macros.cpp
The file was modified/clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration.cppclang-tools-extra.src/test/clang-tidy/readability-redundant-declaration.cpp
Revision 309378 by ibiryukov:
[clangd] Workaround for a test failure on Windows.

Previous workaround (r308959) didn't account for a case when system drive
letter is not 'C:'.
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/test/clangd/definitions.testclang-tools-extra.src/test/clangd/definitions.test