platform/upstream/llvm.git
7 years ago[InstCombine] Add test cases showing missed opportunity to fold BITWISE_OP(BSWAP...
Craig Topper [Mon, 3 Jul 2017 05:54:12 +0000 (05:54 +0000)]
[InstCombine] Add test cases showing missed opportunity to fold BITWISE_OP(BSWAP(A),BSWAP(B))->BSWAP(BITWISE_OP(A, B)) for vectors. NFC

llvm-svn: 306998

7 years ago[InstCombine] Remove an if that should have been guaranteed by the caller. Replace...
Craig Topper [Mon, 3 Jul 2017 05:54:11 +0000 (05:54 +0000)]
[InstCombine] Remove an if that should have been guaranteed by the caller. Replace with an assert. NFC

llvm-svn: 306997

7 years agoRevert r306813: "[ELF] - Resolve references properly when using .symver directive"
Rui Ueyama [Mon, 3 Jul 2017 03:26:07 +0000 (03:26 +0000)]
Revert r306813: "[ELF] - Resolve references properly when using .symver directive"

This reverts commit r306813 because it broke linking of the
FreeBSD base system.

llvm-svn: 306996

7 years agoAMDGPU: Add operand target flags serialization
Matt Arsenault [Sun, 2 Jul 2017 23:21:48 +0000 (23:21 +0000)]
AMDGPU: Add operand target flags serialization

llvm-svn: 306995

7 years ago[X86][AVX512] Test AVX512VPOPCNTDQ CTPOP with/without AVX512BW
Simon Pilgrim [Sun, 2 Jul 2017 19:52:20 +0000 (19:52 +0000)]
[X86][AVX512] Test AVX512VPOPCNTDQ CTPOP with/without AVX512BW

llvm-svn: 306991

7 years ago[X86][AVX512VPOPCNTDQ] Improve support for v16i8/v8i16/v16i16/ CTPOP
Simon Pilgrim [Sun, 2 Jul 2017 19:32:37 +0000 (19:32 +0000)]
[X86][AVX512VPOPCNTDQ] Improve support for v16i8/v8i16/v16i16/ CTPOP

Zero extend to v16i32/v8i64, use VPOPCNTDQ instructions and truncate back.

llvm-svn: 306990

7 years ago[X86][AVX512] Cleanup tzcnt tests triples and attributes
Simon Pilgrim [Sun, 2 Jul 2017 18:51:48 +0000 (18:51 +0000)]
[X86][AVX512] Cleanup tzcnt tests triples and attributes

Avoid use of specific -mcpu

llvm-svn: 306989

7 years ago[X86][AVX512] Cleanup popcnt tests triples and attributes
Simon Pilgrim [Sun, 2 Jul 2017 18:35:22 +0000 (18:35 +0000)]
[X86][AVX512] Cleanup popcnt tests triples and attributes

Avoid use of specific -mcpu

llvm-svn: 306988

7 years ago[IR] Remove unnecessary operator new from ConstantDataArray and ConstantDataVector...
Craig Topper [Sun, 2 Jul 2017 17:08:44 +0000 (17:08 +0000)]
[IR] Remove unnecessary operator new from ConstantDataArray and ConstantDataVector. They inherit an identical version from ConstantData. NFC

llvm-svn: 306987

7 years ago[InstCombine] Use m_BitReverse pattern match helper. NFCI.
Simon Pilgrim [Sun, 2 Jul 2017 16:31:16 +0000 (16:31 +0000)]
[InstCombine] Use m_BitReverse pattern match helper. NFCI.

llvm-svn: 306986

7 years ago[InstCombine] fix crash when folding cmp+bswap vector
Sanjay Patel [Sun, 2 Jul 2017 16:05:11 +0000 (16:05 +0000)]
[InstCombine] fix crash when folding cmp+bswap vector

We assumed the constant was a scalar when creating the replacement operand.

Also, improve tests for this fold and move the tests for this fold to their own file.
I'll move the related and missing tests to this file as a follow-up.

llvm-svn: 306985

7 years ago[x86] auto-generate complete checks for tests; NFC
Sanjay Patel [Sun, 2 Jul 2017 15:24:08 +0000 (15:24 +0000)]
[x86] auto-generate complete checks for tests; NFC

These all used 'CHECK-NOT' which isn't necessary if we have complete checks.

llvm-svn: 306984

7 years ago[x86] remove unnecessary RUN for test after auto-generating checks; NFC
Sanjay Patel [Sun, 2 Jul 2017 15:16:17 +0000 (15:16 +0000)]
[x86] remove unnecessary RUN for test after auto-generating checks; NFC

llvm-svn: 306983

7 years ago[x86] update test to use FileCheck and auto-generate checks; NFC
Sanjay Patel [Sun, 2 Jul 2017 15:15:18 +0000 (15:15 +0000)]
[x86] update test to use FileCheck and auto-generate checks; NFC

llvm-svn: 306982

7 years ago[x86] auto-generate complete checks for tests; NFC
Sanjay Patel [Sun, 2 Jul 2017 14:50:35 +0000 (14:50 +0000)]
[x86] auto-generate complete checks for tests; NFC

These all used 'CHECK-NOT' which isn't necessary if we have complete checks.

llvm-svn: 306981

7 years ago[InstCombine] look through bswap/bitreverse for equality comparisons
Sanjay Patel [Sun, 2 Jul 2017 14:34:50 +0000 (14:34 +0000)]
[InstCombine] look through bswap/bitreverse for equality comparisons

I noticed this missed bswap optimization in the CGP memcmp() expansion,
and then I saw that we don't have the fold in InstCombine.

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

llvm-svn: 306980

7 years agollvm/test/Transforms/LoopVectorize/X86/slm-no-vectorize.ll: -debug is available in...
NAKAMURA Takumi [Sun, 2 Jul 2017 14:25:27 +0000 (14:25 +0000)]
llvm/test/Transforms/LoopVectorize/X86/slm-no-vectorize.ll: -debug is available in +Asserts.

llvm-svn: 306979

7 years ago[X86][SSE] Attempt to combine 64-bit and 32-bit shuffles to unary shuffles before...
Simon Pilgrim [Sun, 2 Jul 2017 14:16:25 +0000 (14:16 +0000)]
[X86][SSE] Attempt to combine 64-bit and 32-bit shuffles to unary shuffles before bit shifts

We are combining shuffles to bit shifts before unary permutes, which means we can't fold loads plus the destination register is destructive

llvm-svn: 306978

7 years ago[X86][SSE] Attempt to combine 64-bit and 16-bit shuffles to unary shuffles before...
Simon Pilgrim [Sun, 2 Jul 2017 13:19:10 +0000 (13:19 +0000)]
[X86][SSE] Attempt to combine 64-bit and 16-bit shuffles to unary shuffles before bit shifts

We are combining shuffles to bit shifts before unary permutes, which means we can't fold loads plus the destination register is destructive

The 32-bit shuffles are a bit tricky and will be dealt with in a later patch

llvm-svn: 306977

7 years ago[X86][SSE] Add test showing missed opportunity to combine to pshuflw
Simon Pilgrim [Sun, 2 Jul 2017 12:56:10 +0000 (12:56 +0000)]
[X86][SSE] Add test showing missed opportunity to combine to pshuflw

We are combining shuffles to bit shifts before unary permutes, which means we can't fold loads plus the destination register is destructive

llvm-svn: 306976

7 years agofix trivial typos in documents; NFC
Hiroshi Inoue [Sun, 2 Jul 2017 12:44:27 +0000 (12:44 +0000)]
fix trivial typos in documents; NFC

llvm-svn: 306975

7 years ago[X86][CM] update add\sub costs of vectors of 64 in X86\SLM arch
Mohammed Agabaria [Sun, 2 Jul 2017 12:16:15 +0000 (12:16 +0000)]
[X86][CM] update add\sub costs of vectors of 64 in X86\SLM arch

this patch updates the cost of addq\subq (add\subtract of vectors of 64bits)
based on the performance numbers of SLM arch.

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

llvm-svn: 306974

7 years ago[X86] Rerun "update_llc_test_checks" tool on CodeGen tests. NFC.
Gadi Haber [Sun, 2 Jul 2017 12:01:33 +0000 (12:01 +0000)]
[X86] Rerun "update_llc_test_checks" tool on CodeGen tests. NFC.

This is NFC after rerunning the "update_llc_test_checks.py" tool on the CodeGen X86 tests in order to submit a patch.
Minor differences due to added "End of Function" lines.

Reviewers: zvi
Differential Revision: https://reviews.llvm.org/D34933

llvm-svn: 306973

7 years ago[GlobalISel][X86] Support G_GLOBAL_VALUE operation.
Igor Breger [Sun, 2 Jul 2017 08:58:29 +0000 (08:58 +0000)]
[GlobalISel][X86] Support G_GLOBAL_VALUE operation.

Summary: Support G_GLOBAL_VALUE operation. For now most of the PIC configurations not implemented yet.

Reviewers: zvi, guyblank

Reviewed By: guyblank

Subscribers: rovka, kristof.beyls, llvm-commits

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

Conflicts:
test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir

llvm-svn: 306972

7 years ago[GlobalISel][X86] Support vector type G_UNMERGE_VALUES selection.
Igor Breger [Sun, 2 Jul 2017 08:15:49 +0000 (08:15 +0000)]
[GlobalISel][X86] Support vector type G_UNMERGE_VALUES selection.

Summary:
Support vector type G_UNMERGE_VALUES selection.
For now G_UNMERGE_VALUES marked as legal for any type, so nothing to do in legalizer.

Reviewers: t.p.northover, qcolombet, zvi, guyblank

Reviewed By: guyblank

Subscribers: rovka, kristof.beyls, guyblank, llvm-commits

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

llvm-svn: 306971

7 years agofix trivial typos in comments; NFC
Hiroshi Inoue [Sun, 2 Jul 2017 06:12:49 +0000 (06:12 +0000)]
fix trivial typos in comments; NFC

llvm-svn: 306969

7 years agofix trivial typos; NFC
Hiroshi Inoue [Sun, 2 Jul 2017 03:24:54 +0000 (03:24 +0000)]
fix trivial typos; NFC

suport -> support

llvm-svn: 306968

7 years ago[InstCombine] Fold (a | b) ^ (~a | ~b) --> ~(a ^ b) and (a & b) ^ (~a & ~b) --> ...
Craig Topper [Sun, 2 Jul 2017 01:15:51 +0000 (01:15 +0000)]
[InstCombine] Fold (a | b) ^ (~a | ~b) --> ~(a ^ b) and (a & b) ^ (~a & ~b) --> ~(a ^ b)

Summary:
I came across this while thinking about what would happen if one of the operands in this xor pattern was itself a inverted (A & ~B) ^ (~A & B)-> (A^B).

The patterns here assume that the (~a | ~b) will be demorganed to ~(a & b) first. Though I wonder if there's a multiple use case that would prevent the demorgan.

Reviewers: spatel

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 306967

7 years ago[CodeExtractor] Remove unneded and commented out debugging stmts.
Davide Italiano [Sun, 2 Jul 2017 00:07:18 +0000 (00:07 +0000)]
[CodeExtractor] Remove unneded and commented out debugging stmts.

llvm-svn: 306966

7 years agoAdd an option group for deprecated warnings. Add the removed
Joerg Sonnenberger [Sat, 1 Jul 2017 21:36:21 +0000 (21:36 +0000)]
Add an option group for deprecated warnings. Add the removed
-fslp-vectorize-aggressive and -fno-slp-vectorize-aggressive flags back
under this group and test for the warning. Document the future removal
in the ReleaseNotes.

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

llvm-svn: 306965

7 years ago[modules] Teach clang how to merge typedef over anonymous structs in C mode.
Vassil Vassilev [Sat, 1 Jul 2017 20:44:49 +0000 (20:44 +0000)]
[modules] Teach clang how to merge typedef over anonymous structs in C mode.

In C mode clang fails to merge the textually included definition with the one imported from a module. The C lookup rules fail to find the imported definition because its linkage is internal in non C++ mode.

This patch reinstates some of the ODR merging rules for typedefs of anonymous tags for languages other than C++.

Patch by Raphael Isemann and me (D34510).

llvm-svn: 306964

7 years ago[COFF] Add initial support for linking ARM64 binaries
Martin Storsjo [Sat, 1 Jul 2017 20:29:27 +0000 (20:29 +0000)]
[COFF] Add initial support for linking ARM64 binaries

A plain empty entry point function that returns 0 seems to produce
a binary that loads and runs fine in wine.

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

llvm-svn: 306963

7 years ago[Bash-autocompletion] Add support for older bash version.
Yuka Takahashi [Sat, 1 Jul 2017 18:32:55 +0000 (18:32 +0000)]
[Bash-autocompletion] Add support for older bash version.

Summary:
OS X seems to use older bash version which doesn't suport
_init_completion and compopt, so add support for this.

Reviewers: ruiu, v.g.vassilev, teemperor

Subscribers: cfe-commits

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

llvm-svn: 306962

7 years ago[X86][RDSEED] Split off i64 intrinsic tests and test i16/i32 on 32-bit target as...
Simon Pilgrim [Sat, 1 Jul 2017 16:42:16 +0000 (16:42 +0000)]
[X86][RDSEED] Split off i64 intrinsic tests and test i16/i32 on 32-bit target as well.

llvm-svn: 306961

7 years ago[X86][RDRAND] Split off i64 intrinsic tests and test i16/i32 on 32-bit target as...
Simon Pilgrim [Sat, 1 Jul 2017 16:41:12 +0000 (16:41 +0000)]
[X86][RDRAND] Split off i64 intrinsic tests and test i16/i32 on 32-bit target as well.

llvm-svn: 306960

7 years ago[X86] Removed reference to update_test_checks.py
Simon Pilgrim [Sat, 1 Jul 2017 16:34:29 +0000 (16:34 +0000)]
[X86] Removed reference to update_test_checks.py

llvm-svn: 306959

7 years ago[X86][AVX] Remove duplicate autogeneration note
Simon Pilgrim [Sat, 1 Jul 2017 16:32:02 +0000 (16:32 +0000)]
[X86][AVX] Remove duplicate autogeneration note

llvm-svn: 306958

7 years ago[Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME
Yuka Takahashi [Sat, 1 Jul 2017 16:30:02 +0000 (16:30 +0000)]
[Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME

Summary: `~/build/bin/clang -f[tab]` was executed without ~ expanded to $HOME, so changed this by expanding ~ to path using eval.

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

llvm-svn: 306957

7 years ago[OpenMP] Fix mapping of scalars for combined directives
Jonas Hahnfeld [Sat, 1 Jul 2017 10:40:50 +0000 (10:40 +0000)]
[OpenMP] Fix mapping of scalars for combined directives

Combined directives like 'target parallel' have two captured statements.
Sema has to check the right one from the right direction.

Previously, Sema::IsOpenMPCapturedByRef would return false for mapped
scalars on combined directives. This results in a wrong signature of
the outlined function which triggers an assertion:
void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value *>, ArrayRef<OperandBundleDef>, const llvm::Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.

Fixes PR30975 (and PR31985). New function was taken from clang-ykt.

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

llvm-svn: 306956

7 years agofix trivial typo; NFC
Hiroshi Inoue [Sat, 1 Jul 2017 08:58:47 +0000 (08:58 +0000)]
fix trivial typo; NFC

llvm-svn: 306955

7 years agofix trivial typos; NFC
Hiroshi Inoue [Sat, 1 Jul 2017 08:46:43 +0000 (08:46 +0000)]
fix trivial typos; NFC

llvm-svn: 306954

7 years agoChanged Opts.EABIVersion type string to llvm::EABI enum class
Yuka Takahashi [Sat, 1 Jul 2017 07:57:23 +0000 (07:57 +0000)]
Changed Opts.EABIVersion type string to llvm::EABI enum class

Summary:
Changed EABIVersion type from string to llvm::EABI.
It seems it was just a typo and this is intended implementation.

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

llvm-svn: 306953

7 years agofix trivial typos, NFC
Hiroshi Inoue [Sat, 1 Jul 2017 07:12:15 +0000 (07:12 +0000)]
fix trivial typos, NFC

llvm-svn: 306952

7 years ago[SelectionDAGBuilder] Use EVT::getVectorVT instead of MVT::getVectorVT to prevent...
Craig Topper [Sat, 1 Jul 2017 06:46:09 +0000 (06:46 +0000)]
[SelectionDAGBuilder] Use EVT::getVectorVT instead of MVT::getVectorVT to prevent a crash if the type isn't a simple VT.

llvm-svn: 306950

7 years agoUn-revert "[Driver] Add -fdiagnostics-hotness-threshold"
Brian Gesiak [Sat, 1 Jul 2017 05:45:26 +0000 (05:45 +0000)]
Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"

Summary:
Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the
documentation to fix an error -- I had used the wrong syntax for a link.

llvm-svn: 306948

7 years ago[AVR] Remove a bunch of now-obselete tests
Dylan McKay [Sat, 1 Jul 2017 05:23:13 +0000 (05:23 +0000)]
[AVR] Remove a bunch of now-obselete tests

The fixups in these instructions are now lowered into relocations.

llvm-svn: 306947

7 years agoRevert "[Driver] Add -fdiagnostics-hotness-threshold"
Brian Gesiak [Sat, 1 Jul 2017 04:54:53 +0000 (04:54 +0000)]
Revert "[Driver] Add -fdiagnostics-hotness-threshold"

Summary:
The commit caused a documentation breakage.

llvm-svn: 306946

7 years ago[Driver] Add -fdiagnostics-hotness-threshold
Brian Gesiak [Sat, 1 Jul 2017 04:44:38 +0000 (04:44 +0000)]
[Driver] Add -fdiagnostics-hotness-threshold

Summary:
Depends on https://reviews.llvm.org/D34867.

Add a Clang frontend option to enable optimization remark hotness
thresholds, which were added to LLVM in https://reviews.llvm.org/D34867.
This prevents diagnostics that do not meet a minimum hotness
threshold from being output. When generating optimization remarks for large
codebases with a ton of cold code paths, this option can be used
to limit the optimization remark output at a reasonable size.
Discussion of this change can be read here:
http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html

Reviewers: anemet, davidxl, hfinkel

Reviewed By: anemet

Subscribers: fhahn, cfe-commits

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

llvm-svn: 306945

7 years agoFix indentation.
Akira Hatanaka [Sat, 1 Jul 2017 04:37:54 +0000 (04:37 +0000)]
Fix indentation.

This is an attempt to fix a failing bot:

http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror

llvm-svn: 306944

7 years ago[asan] This Android lit workaround should not be needed as bug is fixed
Vitaly Buka [Sat, 1 Jul 2017 04:23:47 +0000 (04:23 +0000)]
[asan] This Android lit workaround should not be needed as bug is fixed

llvm-svn: 306942

7 years agoRevert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""
Eric Beckmann [Sat, 1 Jul 2017 03:59:54 +0000 (03:59 +0000)]
Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""

Summary:
This reverts commit 51931072a7c9a52540baf76fc30ef391d2529a2f.

This revert was originally done because the integrations of the new
WindowsResource library into LLD was causing error in chromium, due to
bugs in how resource sections were handled.  These bugs were fixed,
meaning that the features may be reintegrated.

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 306941

7 years ago[asan] Fix test on Android i686/fugu
Vitaly Buka [Sat, 1 Jul 2017 03:54:19 +0000 (03:54 +0000)]
[asan] Fix test on Android i686/fugu

printf from .preinit_array may crash.

llvm-svn: 306940

7 years agoRemove the default ARMSubtarget from the ARM TargetMachine.
Eric Christopher [Sat, 1 Jul 2017 03:41:53 +0000 (03:41 +0000)]
Remove the default ARMSubtarget from the ARM TargetMachine.

This enables us to ensure better LTO and code generation in the face of module linking.
Remove a report_fatal_error from the TargetMachine and replace it with an assert in ARMSubtarget - and remove the test that depended on the error. The assertion will still fire in the case that we were reporting before, but error reporting needs to be in front end tools if possible for options parsing.

llvm-svn: 306939

7 years ago[Cloner] Re-map simplfied cloned instructions.
Davide Italiano [Sat, 1 Jul 2017 03:29:33 +0000 (03:29 +0000)]
[Cloner] Re-map simplfied cloned instructions.

This commit pretty much rolls back the logic added in r306495
as in the testcase provided we simplify an `icmp` looking through
a PHI that hasn't been mapped yet.

I think instsimplify shouldn't do threading over select/phis or
just looking through phis in general, but this is what we have
now. Also, add a test to prevent this from happening in case somebody
wants to modify this code again.

Briefly discussed with Kyle Butt (thanks Kyle!).

llvm-svn: 306938

7 years agoRecommit "r306541 - Add zero-length check to memcpy/memset load store loop expansion""
Teresa Johnson [Sat, 1 Jul 2017 03:24:10 +0000 (03:24 +0000)]
Recommit "r306541 - Add zero-length check to memcpy/memset load store loop expansion""

With fix for use-after-free errors. We can't add the new branch and
remove the old one until we are done with the Builder constructed for
the block.

llvm-svn: 306937

7 years agoRevert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default."
Teresa Johnson [Sat, 1 Jul 2017 03:24:09 +0000 (03:24 +0000)]
Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default."

This still breaks PPC tests we have. I'll forward reproduction
instructions to dehao.

llvm-svn: 306936

7 years agore-commit r306336: Enable vectorizer-maximize-bandwidth by default.
Teresa Johnson [Sat, 1 Jul 2017 03:24:08 +0000 (03:24 +0000)]
re-commit r306336: Enable vectorizer-maximize-bandwidth by default.

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

llvm-svn: 306935

7 years agorevert r306336 for breaking ppc test.
Teresa Johnson [Sat, 1 Jul 2017 03:24:07 +0000 (03:24 +0000)]
revert r306336 for breaking ppc test.

llvm-svn: 306934

7 years agoEnable vectorizer-maximize-bandwidth by default.
Teresa Johnson [Sat, 1 Jul 2017 03:24:06 +0000 (03:24 +0000)]
Enable vectorizer-maximize-bandwidth by default.

Summary:
vectorizer-maximize-bandwidth is generally useful in terms of performance. I've tested the impact of changing this to default on speccpu benchmarks on sandybridge machines. The result shows non-negative impact:

spec/2006/fp/C++/444.namd                 26.84  -0.31%
spec/2006/fp/C++/447.dealII               46.19  +0.89%
spec/2006/fp/C++/450.soplex               42.92  -0.44%
spec/2006/fp/C++/453.povray               38.57  -2.25%
spec/2006/fp/C/433.milc                   24.54  -0.76%
spec/2006/fp/C/470.lbm                    41.08  +0.26%
spec/2006/fp/C/482.sphinx3                47.58  -0.99%
spec/2006/int/C++/471.omnetpp             22.06  +1.87%
spec/2006/int/C++/473.astar               22.65  -0.12%
spec/2006/int/C++/483.xalancbmk           33.69  +4.97%
spec/2006/int/C/400.perlbench             33.43  +1.70%
spec/2006/int/C/401.bzip2                 23.02  -0.19%
spec/2006/int/C/403.gcc                   32.57  -0.43%
spec/2006/int/C/429.mcf                   40.35  +0.27%
spec/2006/int/C/445.gobmk                 26.96  +0.06%
spec/2006/int/C/456.hmmer                  24.4  +0.19%
spec/2006/int/C/458.sjeng                 27.91  -0.08%
spec/2006/int/C/462.libquantum            57.47  -0.20%
spec/2006/int/C/464.h264ref               46.52  +1.35%

geometric mean                                   +0.29%

The regression on 453.povray seems real, but is due to secondary effects as all hot functions are bit-identical with and without the flag.

I started this patch to consult upstream opinions on this. It will be greatly appreciated if the community can help test the performance impact of this change on other architectures so that we can decided if this should be target-dependent.

Reviewers: hfinkel, mkuper, davidxl, chandlerc

Reviewed By: chandlerc

Subscribers: rengolin, sanjoy, javed.absar, bjope, dorit, magabari, RKSimon, llvm-commits, mzolotukhin

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

llvm-svn: 306933

7 years agoAnother test commit
Teresa Johnson [Sat, 1 Jul 2017 03:24:06 +0000 (03:24 +0000)]
Another test commit

llvm-svn: 306932

7 years agoStill debugging
Teresa Johnson [Sat, 1 Jul 2017 03:24:05 +0000 (03:24 +0000)]
Still debugging

llvm-svn: 306931

7 years agoStill test commit
Teresa Johnson [Sat, 1 Jul 2017 03:24:05 +0000 (03:24 +0000)]
Still test commit

llvm-svn: 306930

7 years agoAnother test commit
Teresa Johnson [Sat, 1 Jul 2017 03:24:00 +0000 (03:24 +0000)]
Another test commit

llvm-svn: 306929

7 years agoUpdate clang support for -mexecute-only/-mpure-code for backend change to use subtarg...
Eric Christopher [Sat, 1 Jul 2017 02:55:23 +0000 (02:55 +0000)]
Update clang support for -mexecute-only/-mpure-code for backend change to use subtarget feature rather than command line option.

llvm-svn: 306928

7 years agoRewrite ARM execute only support to avoid the use of a command line flag and unqualif...
Eric Christopher [Sat, 1 Jul 2017 02:55:22 +0000 (02:55 +0000)]
Rewrite ARM execute only support to avoid the use of a command line flag and unqualified ARMSubtarget lookup.

Paired with a clang commit to use the new behavior.

llvm-svn: 306927

7 years ago[ODRHash] Revert r305104 - Skip inline namespaces when hashing.
Richard Trieu [Sat, 1 Jul 2017 02:00:05 +0000 (02:00 +0000)]
[ODRHash] Revert r305104 - Skip inline namespaces when hashing.

Test inline namespaces and handle them in the ODR hash again.

llvm-svn: 306926

7 years ago[ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other...
Eugene Zelenko [Sat, 1 Jul 2017 01:35:55 +0000 (01:35 +0000)]
[ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 306925

7 years ago[AVR] Update AVRASmBackend from API change in r306906
Dylan McKay [Sat, 1 Jul 2017 01:18:12 +0000 (01:18 +0000)]
[AVR] Update AVRASmBackend from API change in r306906

llvm-svn: 306923

7 years ago[Driver] Check that the iOS deployment target is iOS 10 or earlier if
Akira Hatanaka [Sat, 1 Jul 2017 00:57:52 +0000 (00:57 +0000)]
[Driver] Check that the iOS deployment target is iOS 10 or earlier if
the target is 32-bit.

The following changes are made to the driver since 32-bit apps do not
run on iOS 11 or later:

- If the deployment target is set explicitly, either with a command-line
  option or an environment variable, the driver should report an error
  if the version is greater than iOS 10.

- In the case where the deployment target is not set explicitly and the
  default is inferred from the target triple or SDK version, it should
  use a maximum default of iOS 10.99.99.

rdar://problem/32230613

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

llvm-svn: 306922

7 years ago[X86] Move GISel accessor initialization from TargetMachine to Subtarget.
Quentin Colombet [Sat, 1 Jul 2017 00:45:50 +0000 (00:45 +0000)]
[X86] Move GISel accessor initialization from TargetMachine to Subtarget.

NFC

llvm-svn: 306921

7 years ago[ARM] Move GISel accessor initialization from TargetMachine to Subtarget.
Quentin Colombet [Sat, 1 Jul 2017 00:45:45 +0000 (00:45 +0000)]
[ARM] Move GISel accessor initialization from TargetMachine to Subtarget.

NFC

llvm-svn: 306920

7 years ago[Dominators] Reapply r306892, r306893, r306893.
Jakub Kuderski [Sat, 1 Jul 2017 00:23:01 +0000 (00:23 +0000)]
[Dominators] Reapply r306892, r306893, r306893.

This reverts commit r306907 and reapplies the patches in the title.
The patches used to make one of the
CodeGen/ARM/2011-02-07-AntidepClobber.ll test to fail because of a
missing null check.

llvm-svn: 306919

7 years ago[Modules] Implement ODR-like semantics for tag types in C/ObjC
Bruno Cardoso Lopes [Sat, 1 Jul 2017 00:06:47 +0000 (00:06 +0000)]
[Modules] Implement ODR-like semantics for tag types in C/ObjC

Allow ODR for ObjC/C in the sense that we won't keep more that
one definition around (merge them). However, ensure the decl
pass the structural compatibility check in C11 6.2.7/1, for that,
reuse the structural equivalence checks used by the ASTImporter.

Few other considerations:
- Create error diagnostics for tag types mismatches and thread
them into the structural equivalence checks.
- Note that by doing this we only support redefinition between types
that are considered "compatible types" by C.

This is mixed approach of the suggestions discussed in
http://lists.llvm.org/pipermail/cfe-dev/2017-March/053257.html

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

rdar://problem/31909368

llvm-svn: 306918

7 years agoChange enumerator default linkage type for C
Bruno Cardoso Lopes [Sat, 1 Jul 2017 00:06:27 +0000 (00:06 +0000)]
Change enumerator default linkage type for C

Redeclaration lookup should never find hidden enumerators in C, because
they do not have linkage (C11 6.2.2/6)

The linkage of an enumerator should be VisibleNoLinkage, and
isHiddenDeclarationVisible should be checking hasExternalFormalLinkage.

This is was reviewed as part of D31778, but splitted into a different
commit for clarity.

rdar://problem/31909368

llvm-svn: 306917

7 years agoA little wordsmithing of dominator verification comments.
Daniel Berlin [Fri, 30 Jun 2017 23:49:53 +0000 (23:49 +0000)]
A little wordsmithing of dominator verification comments.

llvm-svn: 306916

7 years ago[RegisterCoalescer] Account for instructions deleted by removePartialredunduncy and...
Sameer AbuAsal [Fri, 30 Jun 2017 23:49:07 +0000 (23:49 +0000)]
[RegisterCoalescer] Account for instructions deleted by removePartialredunduncy and in WorkList

Summary:
 removePartialRedundency optimization introduces a state in the
 RegisterCoalescer where an instruction pointed to in the WorkList
 is deleted from the MBB and then removed from the ErasedList.
 This patch updates the ErasedList to be used globally by not erasing
 erased Instructions from  it to solve the problem.

 The patch also accounts for the case where an Instruction was previously
 deleted and the same memory was reused by BuildMI to create a new instruction.

Reviewers: kparzysz, qcolombet

Reviewed By: qcolombet

Subscribers: MatzeB, qcolombet, llvm-commits

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

llvm-svn: 306915

7 years ago[asan] Disable test which fails on Android x86
Vitaly Buka [Fri, 30 Jun 2017 23:47:03 +0000 (23:47 +0000)]
[asan] Disable test which fails on Android x86

Other Android CPUs probably pass just by luck as ulimit was not executed.

llvm-svn: 306914

7 years agoAdd comments on sibling and parent properties in dominator trees
Daniel Berlin [Fri, 30 Jun 2017 23:46:58 +0000 (23:46 +0000)]
Add comments on sibling and parent properties in dominator trees

llvm-svn: 306913

7 years ago[ORE] Add diagnostics hotness threshold
Brian Gesiak [Fri, 30 Jun 2017 23:14:53 +0000 (23:14 +0000)]
[ORE] Add diagnostics hotness threshold

Summary:
Add an option to prevent diagnostics that do not meet a minimum hotness
threshold from being output. When generating optimization remarks for
large codebases with a ton of cold code paths, this option can be used
to limit the optimization remark output at a reasonable size. Discussion of
this change can be read here:
http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html

Reviewers: anemet, davidxl, hfinkel

Reviewed By: anemet

Subscribers: qcolombet, javed.absar, fhahn, eraman, llvm-commits

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

llvm-svn: 306912

7 years ago[CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings;...
Eugene Zelenko [Fri, 30 Jun 2017 23:06:03 +0000 (23:06 +0000)]
[CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 306911

7 years agoRevert "[Dominators] Teach IDF to use level information"
Jakub Kuderski [Fri, 30 Jun 2017 22:56:28 +0000 (22:56 +0000)]
Revert "[Dominators] Teach IDF to use level information"

This reverts commit r306894.

Revert "[Dominators] Add NearestCommonDominator verification"

This reverts commit r306893.

Revert "[Dominators] Keep tree level in DomTreeNode and use it to find NCD and answer dominance queries"

This reverts commit r306892.

llvm-svn: 306907

7 years agoRename and adjust processFixupValue.
Rafael Espindola [Fri, 30 Jun 2017 22:47:27 +0000 (22:47 +0000)]
Rename and adjust processFixupValue.

It was not processing any value. All that it ever did was force
relocations, so name it shouldForceRelocation.

llvm-svn: 306906

7 years agoFix PR 33189: Clang assertion on template destructor declaration
Hubert Tong [Fri, 30 Jun 2017 22:43:54 +0000 (22:43 +0000)]
Fix PR 33189: Clang assertion on template destructor declaration

Summary:
This patch aims to fix the bug reported at
https://bugs.llvm.org/show_bug.cgi?id=33189. Clang hits an assertion
when a template destructor declaration is present. This is caused by
later processing that does not expect to encounter a template when
looking at a destructor. The resolution is to treat the destructor as
being not declared when later processing is interested in the properties
of the destructor of a class.

Reviewers: rcraik, hubert.reinterpretcast, aaron.ballman, rsmith

Reviewed By: rsmith

Subscribers: rsmith, cfe-commits

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

Patch by Kuang He!

llvm-svn: 306905

7 years ago[ODRHash] Support Type TemplateArgument
Richard Trieu [Fri, 30 Jun 2017 22:40:33 +0000 (22:40 +0000)]
[ODRHash] Support Type TemplateArgument

llvm-svn: 306904

7 years agoReinstate "Load lazily the template specialization in multi-module setups."
Vassil Vassilev [Fri, 30 Jun 2017 22:40:17 +0000 (22:40 +0000)]
Reinstate "Load lazily the template specialization in multi-module setups."

It was reverted in r305460 but the issue appears to only break our self-host
libcxx modules bot. Reapplying it will give us a chance to get a reproducer and
fix the issue.

llvm-svn: 306903

7 years ago[Parse] Use normalized attr name for late-parsing checks.
George Burgess IV [Fri, 30 Jun 2017 22:33:24 +0000 (22:33 +0000)]
[Parse] Use normalized attr name for late-parsing checks.

llvm-svn: 306899

7 years ago[lit] Factor out listdir logic shared by different test formats.
David L. Jones [Fri, 30 Jun 2017 21:58:55 +0000 (21:58 +0000)]
[lit] Factor out listdir logic shared by different test formats.

Summary:
The lit test formats use largely the same logic for discovering tests. There are
some superficial differences in the logic, which seem reasonable enough to
handle in a single routine.

At a high level, the common goal is "look for files that end with one of these
suffixes, and skip anything starting with a dot." The balance of the logic
specific to ShTest and GoogleTest collapses quite a bit, so that
getTestsInDirectory is only a couple of lines around a call to the new function.

Reviewers: zturner, MatzeB, modocache

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 306895

7 years ago[Dominators] Teach IDF to use level information
Jakub Kuderski [Fri, 30 Jun 2017 21:51:43 +0000 (21:51 +0000)]
[Dominators] Teach IDF to use level information

Summary: This patch teaches IteratedDominanceFrontier to use the level information stored in DomTreeNodes instead of calculating it manually.

Reviewers: dberlin, sanjoy, davide

Reviewed By: davide

Subscribers: davide, llvm-commits

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

llvm-svn: 306894

7 years ago[Dominators] Add NearestCommonDominator verification
Jakub Kuderski [Fri, 30 Jun 2017 21:51:43 +0000 (21:51 +0000)]
[Dominators] Add NearestCommonDominator verification

Summary:
This patch adds another verification function for checking correctness of findNearestCommonDominator.
For every edge from U to V in the input graph, `NCD(U, V) == IDom(V) or V` -- the new function checks this condition.

Reviewers: dberlin, sanjoy, chandlerc

Reviewed By: dberlin

Subscribers: llvm-commits

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

llvm-svn: 306893

7 years ago[Dominators] Keep tree level in DomTreeNode and use it to find NCD and answer dominan...
Jakub Kuderski [Fri, 30 Jun 2017 21:51:40 +0000 (21:51 +0000)]
[Dominators] Keep tree level in DomTreeNode and use it to find NCD and answer dominance queries

Summary:
This patch makes DomTreeNodes keep their level (depth) in the DomTree. By having this information always available, it is possible to speedup and simplify findNearestCommonDominator and certain dominance queries.

In the future, level information will be also needed to perform incremental updates.

My testing doesn't show any noticeable performance differences after applying this patch. There may be some improvements when other passes are thought to use the level information.

Reviewers: dberlin, sanjoy, chandlerc, grosser

Reviewed By: dberlin

Subscribers: llvm-commits

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

llvm-svn: 306892

7 years agoRemove spurious semicolons.
Zachary Turner [Fri, 30 Jun 2017 21:48:57 +0000 (21:48 +0000)]
Remove spurious semicolons.

llvm-svn: 306891

7 years ago[llvm-pdbutil] Output the symbol offset when dumping.
Zachary Turner [Fri, 30 Jun 2017 21:35:00 +0000 (21:35 +0000)]
[llvm-pdbutil] Output the symbol offset when dumping.

Type records have a unique type index, but symbol records do
not.  Instead, symbol records refer to other symbol records
by referencing their offset in the symbol stream.  In a sense
this is the analogue of the TypeIndex, but we are not printing
it in the dumper.  Printing it not only gives us more useful
information when manually investigating the contents of a PDB,
but also allows us to write better tests by enabling us to
verify that fields that reference other symbol records do
so correctly.

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

llvm-svn: 306890

7 years ago[codeview] Use the first valid source location at the top of every MBB
Reid Kleckner [Fri, 30 Jun 2017 21:33:44 +0000 (21:33 +0000)]
[codeview] Use the first valid source location at the top of every MBB

If the instructions at the beginning of the block have no location,
we're better off using the location of the first instruction in the
current basic block. At the very least, that instruction post-dominates
this one, whereas if we don't emit a .cv_loc directive, we end up using
the potentially invalid location that falls through from the previous
block.

We could probably do better here by emitting some kind of ".cv_loc end"
directive that stops the line table entry of the previous .cv_loc
directive from bleeding out of its basic block. This would improve the
line table when an entire MBB has no valid location info.

llvm-svn: 306889

7 years ago[Hexagon] Implement frame pointer elimination with -fomit-frame-pointer
Krzysztof Parzyszek [Fri, 30 Jun 2017 21:21:40 +0000 (21:21 +0000)]
[Hexagon] Implement frame pointer elimination with -fomit-frame-pointer

It applies to leaf functions that are otherwise not required to have
a frame pointer.

llvm-svn: 306888

7 years ago[SLPVectorizer] Add isOdd() helper function, NFCI.
Dinar Temirbulatov [Fri, 30 Jun 2017 21:16:26 +0000 (21:16 +0000)]
[SLPVectorizer] Add isOdd() helper function, NFCI.

llvm-svn: 306887

7 years ago[InstCombine] Replace an unnecessary use of a matcher with just an isa and a cast...
Craig Topper [Fri, 30 Jun 2017 21:09:34 +0000 (21:09 +0000)]
[InstCombine] Replace an unnecessary use of a matcher with just an isa and a cast. NFC

We aren't looking through any levels of IR here so I don't think we need the power of a matcher or the temporary variable it requires.

llvm-svn: 306885

7 years ago[LV] Sink casts to unravel first order recurrence
Ayal Zaks [Fri, 30 Jun 2017 21:05:06 +0000 (21:05 +0000)]
[LV] Sink casts to unravel first order recurrence

Check if a single cast is preventing handling a first-order-recurrence Phi,
because the scheduling constraints it imposes on the first-order-recurrence
shuffle are infeasible; but they can be made feasible by moving the cast
downwards. Record such casts and move them when vectorizing the loop.

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

llvm-svn: 306884

7 years ago[Profile] Do not assign counters to functions without bodies
Vedant Kumar [Fri, 30 Jun 2017 21:02:14 +0000 (21:02 +0000)]
[Profile] Do not assign counters to functions without bodies

The root cause of the issues reported in D32406 and D34680 is that clang
instruments functions without bodies. Make it stop doing that, and also
teach it how to use old (incorrectly generated) profiles without
crashing.

llvm-svn: 306883

7 years agoFix a typo. NFC.
Vedant Kumar [Fri, 30 Jun 2017 21:02:14 +0000 (21:02 +0000)]
Fix a typo. NFC.

llvm-svn: 306882

7 years agoFix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR
Richard Smith [Fri, 30 Jun 2017 20:57:39 +0000 (20:57 +0000)]
Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR

This is a short-term fix for PR33650 aimed to get the modules build bots green again.

Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR
macros to try to locally specialize a global template for a global type. That's
not how C++ works.

Instead, we now centrally define how to format vectors of fundamental types and
of string (std::string and StringRef). We use flow formatting for the former
cases, since that's the obvious right thing to do; in the latter case, it's
less clear what the right choice is, but flow formatting is really bad for some
cases (due to very long strings), so we pick block formatting. (Many of the
cases that were using flow formatting for strings are improved by this change.)

Other than the flow -> block formatting change for some vectors of strings,
this should result in no functionality change.

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

Corresponding LLVM change is r306878.

llvm-svn: 306881