Commit Graph

127349 Commits

Author SHA1 Message Date
Teresa Johnson
ce0afe6f7f [ThinLTO] Remove imported available externally defs from comdats.
Summary:
Available externally definitions are considered declarations for the
linker and eventually dropped. As such they are not allowed to be
in comdats. Remove any such imported functions from comdats.

Reviewers: rafael

Subscribers: davidxl, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D16120

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 18:47:20 +00:00
Xinliang David Li
04638a608b [PGO] Enable compression in pgo instrumentation
This reduces sizes of instrumented object files, final binaries,
process images, and raw profile data.

The format of the indexed profile data remain the same.

Differential Revision: http://reviews.llvm.org/D16388 
 





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 18:13:49 +00:00
Silviu Baranga
e942cf87e8 [SCEV][LAA] Re-commit r260085 and r260086, this time with a fix for the memory
sanitizer issue. The PredicatedScalarEvolution's copy constructor
wasn't copying the Generation value, and was leaving it un-initialized.

Original commit message:

[SCEV][LAA] Add no wrap SCEV predicates and use use them to improve strided pointer detection

Summary:
This change adds no wrap SCEV predicates with:
  - support for runtime checking
  - support for expression rewriting:
      (sext ({x,+,y}) -> {sext(x),+,sext(y)}
      (zext ({x,+,y}) -> {zext(x),+,sext(y)}

Note that we are sign extending the increment of the SCEV, even for
the zext case. This is needed to cover the fairly common case where y would
be a (small) negative integer. In order to do this, this change adds two new
flags: nusw and nssw that are applicable to AddRecExprs and permit the
transformations above.

We also change isStridedPtr in LAA to be able to make use of
these predicates. With this feature we should now always be able to
work around overflow issues in the dependence analysis.

Reviewers: mzolotukhin, sanjoy, anemet

Subscribers: mzolotukhin, sanjoy, llvm-commits, rengolin, jmolloy, hfinkel

Differential Revision: http://reviews.llvm.org/D15412



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260112 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 17:02:45 +00:00
Adrian Prantl
c44fb84ad0 Add a unit test for r259973.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 17:02:34 +00:00
Haicheng Wu
b21e2903ef [JumpThreading] Change a return of ComputeValueKnownInPredecessors()
Change a return statement of ComputeValueKnownInPredecessors() to be the same as
the rest return statements of the function. Otherwise, it might return true with
an empty Result when the current basic block has no predecessors and trigger the
first assert of JumpThreading::ProcessThreadableEdges().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 17:00:39 +00:00
Matt Arsenault
98d69cc318 SelectionDAG: Lower some range metadata to AssertZext
If a range has a lower bound of 0, add an AssertZext from the
nearest floor power of two.

This allows operations with some workitem intrinsics with known
maximum ranges to use fast 24-bit multiplies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 16:28:19 +00:00
Michael Zuckerman
76a73b5b30 [AVX512][PROLQ][PROLD] Change imm8 to int
Differential Revision: http://reviews.llvm.org/D16983



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 15:13:32 +00:00
Igor Breger
a2a4a6e1dc [SLP] Fix placement of debug statement (NFC)
By Ayal Zaks (ayal.zaks@intel.com)

Differential Revision: http://reviews.llvm.org/D16976

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 14:11:39 +00:00
Igor Breger
d23febf42f AVX512: Change builtin function name for scalar intrinsics. Add "mask" to function name to reflect the function behavior.
Differential Revision: http://reviews.llvm.org/D16958

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 12:38:03 +00:00
Silviu Baranga
bbaff75d11 Revert r260086 and r260085. They have broken the memory
sanitizer bots.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 11:56:15 +00:00
Silviu Baranga
147a2681b1 [LoopVersioning] Don't assert when there are no memchecks
We shouldn't assert when there are no memchecks, since we
can have SCEV checks. There is already an assert covering
the case where there are no SCEV checks or memchecks.

This also changes the LAA pointer wrapping versioning test
to use the loop versioning pass (this was how I managed to
trigger the assert in the loop versioning pass).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 11:15:29 +00:00
Silviu Baranga
41fcf12691 [SCEV][LAA] Add no wrap SCEV predicates and use use them to improve strided pointer detection
Summary:
This change adds no wrap SCEV predicates with:
  - support for runtime checking
  - support for expression rewriting:
      (sext ({x,+,y}) -> {sext(x),+,sext(y)}
      (zext ({x,+,y}) -> {zext(x),+,sext(y)}

Note that we are sign extending the increment of the SCEV, even for
the zext case. This is needed to cover the fairly common case where y would
be a (small) negative integer. In order to do this, this change adds two new
flags: nusw and nssw that are applicable to AddRecExprs and permit the
transformations above.

We also change isStridedPtr in LAA to be able to make use of
these predicates. With this feature we should now always be able to
work around overflow issues in the dependence analysis.

Reviewers: mzolotukhin, sanjoy, anemet

Subscribers: mzolotukhin, sanjoy, llvm-commits, rengolin, jmolloy, hfinkel

Differential Revision: http://reviews.llvm.org/D15412

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 10:45:50 +00:00
Maxim Ostapenko
428ffed300 [asan] Introduce new hidden -asan-use-private-alias option.
As discussed in https://github.com/google/sanitizers/issues/398, with current
implementation of poisoning globals we can have some CHECK failures or false
positives in case of mixing instrumented and non-instrumented code due to ASan
poisons innocent globals from non-sanitized binary/library. We can use private
aliases to avoid such errors. In addition, to preserve ODR violation detection,
we introduce new __odr_asan_gen_XXX symbol for each instrumented global that
indicates if this global was already registered. To detect ODR violation in
runtime, we should only check the value of indicator and report an error if it
isn't equal to zero.

Differential Revision: http://reviews.llvm.org/D15642


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 08:30:57 +00:00
Dan Gohman
f80c9dda08 [WebAssembly] Add another optimization idea to README.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 03:42:36 +00:00
Craig Topper
0fe9ca1cf2 [X86] Change FeatureIFMA string to 'avx512ifma'. Matches gcc and fixes PR26461.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 01:23:15 +00:00
Craig Topper
86ed0da10d [Support] Use hexdigit. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 01:03:01 +00:00
Craig Topper
69a0c7cce3 [Support] Fix the examples and assertion for format_hex_no_prefix to take into account that there are no prefix characters to include in Width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 01:02:55 +00:00
NAKAMURA Takumi
5b9f36bf1a Disable llvm/test/tools/llvm-profdata/value-prof.proftext on win32 for now. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260064 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 23:03:38 +00:00
Simon Pilgrim
392b9d21fc [X86][SSE] Resolve target shuffle inputs to sentinels to permit more combines
The combineX86ShufflesRecursively only supports unary shuffles, but was missing the opportunity to combine binary shuffles with a zero / undef second input.

This patch resolves target shuffle inputs, converting the shuffle mask elements to SM_SentinelUndef/SM_SentinelZero where possible. It then resolves the updated mask to check if we have created a faux unary shuffle.

Additionally, we now attempt to recursively call combineX86ShufflesRecursively for all input operands (we used to just recurse for unary integer shuffles and unary unpacks) - it safely returns early if its not a target shuffle.

Differential Revision: http://reviews.llvm.org/D16683


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 22:51:06 +00:00
Simon Pilgrim
fb040e04aa [X86][SSE] Regenerate PSHUFB shuffle mask comments tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 22:22:09 +00:00
Daniel Berlin
d4797742f9 Make check line consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 20:57:46 +00:00
Nico Weber
732c5d90b7 Revert 259942, r259943, r259948.
The Windows bots have been failing for the last two days, with:

FAILED: C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe -c LLVMContextImpl.cpp
D:\buildslave\clang-x64-ninja-win7\llvm\lib\IR\LLVMContextImpl.cpp(137) :
    error C2248: 'llvm::TrailingObjects<llvm::AttributeSetImpl,
                                        llvm::IndexAttrPair>::operator delete' :
        cannot access private member declared in class 'llvm::AttributeSetImpl'
    TrailingObjects.h(298) : see declaration of
        'llvm::TrailingObjects<llvm::AttributeSetImpl,
                               llvm::IndexAttrPair>::operator delete'
    AttributeImpl.h(213) : see declaration of 'llvm::AttributeSetImpl'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 20:09:18 +00:00
Keno Fischer
3440864413 [docs] Add a note that the Visual Studio C++ tools are required
Watching new contributors trying to build LLVM on Windows, one of the
very common failure modes was getting a version of Visual Studio
that did not have a C++ compiler for CMake to put up. Trying to create
a C++ project in Visual Studio will cause Visual Studio to go and
download the C++ tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 19:36:54 +00:00
Philip Reames
e51c15a4f4 [docs] Remove now confusing references to cofigure/autoconf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260042 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 16:35:04 +00:00
Philip Reames
a22f43f7dc [docs] Wordsmithing to program layout descriptio in GettingStarted
This just incrementally improves what was already there; it's questionable whether this content belongs in the getting started guide at all.

Patch by Ben Nathanson w/permission w/minor edtis by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 16:23:32 +00:00
Philip Reames
56df681177 [docs] Clarify disk space usage of debug builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:58:35 +00:00
Roman Divacky
60973707ae Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:50:55 +00:00
Philip Reames
55cdcca8e2 [docs] Remove a stale and confusing section from GettingStarted
The mentioned environment variable doesn't appear to have any use in the LLVM repository.  If it is still relevant for clang, we can consider adding it to the clang getting started page.

Patch inspired by documentation work by Ben Nathanson at the LLVM Bloomberg sprint.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:49:57 +00:00
Philip Reames
06f0086461 [docs] Update the docs to describe how to build the docs with cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:42:12 +00:00
Simon Pilgrim
fe2d3ebbd3 [X86][SSE] Added support for MOVHPD/MOVLPD + MOVHPS/MOVLPS shuffle decoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:39:22 +00:00
Asaf Badouh
a79a41855d [X86][AVX512] add intrinsics of Scalar FP to integer conversion with rounding mode
Differential Revision: http://reviews.llvm.org/D16629

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 14:59:13 +00:00
Simon Pilgrim
de35fd0e4f [X86][SSE] Pulled out repeated target shuffle decodes into helper functions. NFCI.
Pulled out the code used by PSHUFB/VPERMV/VPERMV3 shuffle mask decoding into common helper functions.

The helper functions handle masks coming from BROADCAST/BUILD_VECTOR and ConstantPool nodes respectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260032 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 14:33:03 +00:00
Jeroen Ketema
8ca9284c2a Fix typo in default getNoPreservedMask implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 11:31:56 +00:00
Igor Breger
ae83a11dfd AVX512: VPBROADCASTB/W/D/Q from GPR intrinsics implementation.
Differential Revision: http://reviews.llvm.org/D16813

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 08:30:50 +00:00
Duncan P. N. Exon Smith
e7a916a707 LangRef: Fix example code for cmpxchg
Patch by Daniel Robertson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 05:06:35 +00:00
Daniel Berlin
f71914f0a8 Don't use module context here. It's unnecessary and makes it harder to write unittests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 02:03:39 +00:00
Daniel Berlin
539e9b9ecd Compute live-in for MemorySSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260014 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 01:52:19 +00:00
Daniel Berlin
6d8a11a537 Only insert into definingblocks once per block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 01:52:15 +00:00
Simon Pilgrim
f21f097a73 [X86][AVX2] Regenerated broadcast domain tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260010 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 22:09:25 +00:00
Simon Pilgrim
65361386dc [X86][SSE] Add tests for MOVHLPS/MOVLHPS shuffle lowering.
As raised in PR26491, we don't make use of these instructions at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 20:11:52 +00:00
Simon Pilgrim
e647051d43 [X86][AVX512] Added support for VPMOVZX shuffle decoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:51:21 +00:00
Philip Reames
3e299e14c8 [docs] Warn against slow serial builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:43:40 +00:00
Justin Lebar
d98b8105e7 [NVPTX] Mark nvvm synchronizing intrinsics as convergent.
Summary:
This is the attribute purpose-made for e.g. __syncthreads.  It appears
that NoDuplicate may not be sufficient to prevent Sink from touching a
call to __syncthreads.

Reviewers: jingyue, hfinkel

Subscribers: llvm-commits, jholewinski, jhen, rnk, tra, majnemer

Differential Revision: http://reviews.llvm.org/D16941

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:32:44 +00:00
Philip Reames
d14beda7f7 [docs] Redirect new contributors to the right starting point
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:29:23 +00:00
Philip Reames
79a6578f71 [docs] Clarify a couple of getting started issues identified during Sprint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:20:26 +00:00
Simon Pilgrim
934dab45b1 [X86][AVX512] Fixed prefix ordering for lzcnt tests.
Let AVX512 targets share the same CHECKs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260000 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 18:07:19 +00:00
Simon Pilgrim
a532117d5a [X86][SSE] Regenerate vector shift tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 17:57:15 +00:00
Simon Pilgrim
14ac2af7eb [X86][SSE] Moved shuffle decode CASE macros earlier. NFC.
To allow the helper functions to make use of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 17:02:15 +00:00
Simon Pilgrim
36f69d62b8 [X86][SSE] Refactored PMOVZX shuffle decoding to use scalar input types
First step towards being able to decode AVX512 PMOVZX instructions without a massive bloat in the shuffle decode switch statement.

This should also make it easier to decode X86ISD::VZEXT target shuffles in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 16:33:42 +00:00
Teresa Johnson
74409a0b8a [ThinLTO] Include linkage type in function summary
Summary:
Adds the linkage type to both the per-module and combined function
summaries, which subsumes the current islocal bit. This will eventually
be used to optimized linkage types based on global summary-based
analysis.

Reviewers: joker.eph

Subscribers: joker.eph, davidxl, llvm-commits

Differential Revision: http://reviews.llvm.org/D16943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 16:07:35 +00:00