OSDN Git Service
Teresa Johnson [Tue, 9 Feb 2016 13:28:44 +0000 (13:28 +0000)]
Fix comment for MD5Hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260221
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 9 Feb 2016 08:19:19 +0000 (08:19 +0000)]
[X86][AVX2] Fix SIGN_EXTEND vector handling on AVX2 targets.
On AVX2 target we are poorly legalizing SIGN_EXTEND ops for which the input's legalized type doesn't have the same number of elements as the destination, resulting in an ANY_EXTEND followed by a SIGN_EXTEND_INREG.
This patch uses the existing SIGN_EXTEND -> SIGN_EXTEND_VECTOR_INREG combine to extend the input to the size of the result and using SIGN_EXTEND_VECTOR_INREG instead.
Differential Revision: http://reviews.llvm.org/D16994
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260210
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 9 Feb 2016 05:47:08 +0000 (05:47 +0000)]
Add comments to some tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260200
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 9 Feb 2016 05:36:57 +0000 (05:36 +0000)]
Further reduce test overhead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260198
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 9 Feb 2016 05:12:44 +0000 (05:12 +0000)]
Refactor PGO function naming and MD5 hashing support out of ProfileData
Summary:
Move the function renaming logic into the Function class, and the
MD5Hash routine into the MD5 header.
This will enable these routines to be shared with ThinLTO, which
will be changed to store the MD5 hash instead of full function name
in the combined index for significant size reductions. And using the same
function naming for locals in the function index facilitates future
integration with indirect call value profiles.
Reviewers: davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260197
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 9 Feb 2016 04:47:58 +0000 (04:47 +0000)]
Use std::forward to make ErrorOr<T> constructible from a value that has a user-defined conversion to T. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260196
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 9 Feb 2016 02:31:47 +0000 (02:31 +0000)]
[GMR/OperandBundles] Teach getModRefBehavior about operand bundles
In general, memory restrictions on a called function (e.g. readnone)
cannot be transferred to a CallSite that has operand bundles. It is
possible to make this inference smarter, but lets fix the behavior to be
correct first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260193
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 9 Feb 2016 02:09:16 +0000 (02:09 +0000)]
Remove TrailingObjects::operator delete. It's still suffering from
compiler-specific issues. Instead, repeat an 'operator delete' definition in
each derived class that is actually deleted, and give up on the static type
safety of an error when sized delete is accidentally used on a type derived
from TrailingObjects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260190
91177308-0d34-0410-b5e6-
96231b3b80d8
David L Kreitzer [Tue, 9 Feb 2016 01:35:45 +0000 (01:35 +0000)]
Fix the LLVM_ENABLE_MODULES build after adding TargetOpcodes.def in r259726.
Differential Revision: http://reviews.llvm.org/D17005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260186
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 9 Feb 2016 01:21:57 +0000 (01:21 +0000)]
Add an "addUsedAAAnalyses" helper function
Summary:
Passes that call `getAnalysisIfAvailable<T>` also need to call
`addUsedIfAvailable<T>` in `getAnalysisUsage` to indicate to the
legacy pass manager that it uses `T`. This contract was being
violated by passes that used `createLegacyPMAAResults`. This change
fixes this by exposing a helper in AliasAnalysis.h,
`addUsedAAAnalyses`, that is complementary to createLegacyPMAAResults
and does the right thing when called from `getAnalysisUsage`.
Reviewers: chandlerc
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D17010
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260183
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 9 Feb 2016 01:21:50 +0000 (01:21 +0000)]
Remove SCEVAAWrapperPass from createLegacyPMAAResults; NFC
Summary:
createLegacyPMAAResults is only called by CGSCC and Module passes, so
the call to getAnalysisIfAvailable<SCEVAAWrapperPass>() never
succeeds (SCEVAAWrapperPass is a function pass).
Reviewers: chandlerc
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D17009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260182
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 9 Feb 2016 01:03:42 +0000 (01:03 +0000)]
Re-commit r259942 (reverted in r260053) with a different workaround for the MSVC bug.
This fixes undefined behavior in C++14 due to the size of the object being
deleted being different from sizeof(dynamic type) when it is allocated with
trailing objects.
MSVC seems to have several bugs around using-declarations changing the access
of a member inherited from a base class, so use forwarding functions instead of
using-declarations to make TrailingObjects::operator delete accessible where
desired.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260180
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 9 Feb 2016 01:02:24 +0000 (01:02 +0000)]
Simplify some expressions involving unique_ptr and ErrorOr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260179
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Tue, 9 Feb 2016 00:07:08 +0000 (00:07 +0000)]
This patch is to fix PR26529 caused by r259736.
IndVarSimplify assumes scAddRecExpr to be expanded in literal form instead of
canonical form by calling disableCanonicalMode after it creates SCEVExpander.
When CanonicalMode is disabled, SCEVExpander::expand should always return PHI
node for scAddRecExpr. r259736 broke the assumption.
The fix is to let SCEVExpander::expand skip the reuse Value logic if
CanonicalMode is false.
In addition, Besides IndVarSimplify, LSR pass also calls disableCanonicalMode
before doing rewrite. We can remove the original check of LSRMode in reuse
Value logic and use CanonicalMode instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260174
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 8 Feb 2016 23:50:23 +0000 (23:50 +0000)]
[llvm-nm] Remove excessive parenthesis, noticed by David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260173
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Mon, 8 Feb 2016 23:11:16 +0000 (23:11 +0000)]
[PGO] Revert r260146 as it breaks Darwin platforms.
r260146 | xur | 2016-02-08 13:07:46 -0800 (Mon, 08 Feb 2016) | 13 lines
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260170
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Mon, 8 Feb 2016 23:03:59 +0000 (23:03 +0000)]
Factor out UnrollAnalyzer to Analysis, and add unit tests for it.
Summary:
Unrolling Analyzer is already pretty complicated, and it becomes harder and harder to exercise it with usual IR tests, as with them we can only check the final decision: whether the loop is unrolled or not. This change factors this framework out from LoopUnrollPass to analyses, which allows to use unit tests.
The change itself is supposed to be NFC, except adding a couple of tests.
I plan to add more tests as I add new functionality and find/fix bugs.
Reviewers: chandlerc, hfinkel, sanjoy
Subscribers: zzheng, sanjoy, llvm-commits
Differential Revision: http://reviews.llvm.org/D16623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260169
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 8 Feb 2016 23:03:46 +0000 (23:03 +0000)]
[X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding support
As discussed on PR26491, this patch adds support for lowering v4f32 shuffles to the MOVLHPS/MOVHLPS instructions. It also adds support for memory folding with their MOVLPS/MOVHPS load equivalents.
This first patch only really helps SSE1 targets as SSE2+ targets will widen the shuffle mask and use v2f64 equivalents (although they still combine to MOVLHPS/MOVHLPS for v2f64 splats). This will have to be addressed in a future patch, most likely when we add support for binary target shuffle combines.
Differential Revision: http://reviews.llvm.org/D16956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260168
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 8 Feb 2016 22:58:26 +0000 (22:58 +0000)]
[llvm-nm] Yet another attempt of simplifying code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260166
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 8 Feb 2016 22:52:51 +0000 (22:52 +0000)]
[regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask
Differential Revision: http://reviews.llvm.org/D16831
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260164
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 8 Feb 2016 22:49:40 +0000 (22:49 +0000)]
llvm-cov: Fix reading gcov data that does not have function names
In order for recent gcov versions to read the coverage data, you have
to use UseCfgChecksum=true and FunctionNamesInData=false options for
coverage profiling pass. This is because gcov is expecting the
function section in .gcda to be exactly 3 words in size, containing
ident and two checksums.
While llvm-cov is compatible with UseCfgChecksum=true, it always
expects a function name in .gcda function sections (it's not
compatible with FunctionNamesInData=false). Thus it's currently
impossible to generate one set of coverage files that works with both
gcov and llvm-cov.
This change fixes the reading of coverage information to only read the
function name if it's present.
Patch by Arseny Kapoulkine. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260162
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 8 Feb 2016 21:55:19 +0000 (21:55 +0000)]
cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO
Apparently option is for bools and cmake-gui will display this
strangely with option.
Pointed out by edward-san - thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260154
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Feb 2016 21:50:13 +0000 (21:50 +0000)]
[WebAssembly] Update the br_if instructions' operand orders to match the spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260152
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 8 Feb 2016 21:32:43 +0000 (21:32 +0000)]
rangify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260151
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Mon, 8 Feb 2016 21:07:46 +0000 (21:07 +0000)]
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
This patch uses one bit in profile version to differentiate Clang
instrumentation and IR level instrumentation profiles.
PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so
that the compiler runtime can set the right profile kind.
PGOInstrumenation now checks this bit to make sure it's an IR level
instrumentation profile.
Differential Revision: http://reviews.llvm.org/D15540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260146
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 8 Feb 2016 21:05:08 +0000 (21:05 +0000)]
[x86] convert masked store of one element to scalar store
Another opportunity to reduce masked stores: in D16691, we decided not to attempt the 'one mask element is set'
transform in InstCombine, but this should be a win for any AVX machine.
Code comments note that this transform could be extended for other targets / cases.
Differential Revision: http://reviews.llvm.org/D16828
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260145
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 8 Feb 2016 21:01:24 +0000 (21:01 +0000)]
cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTO
Mehdi suggested in a review of r259766 that it's also useful to easily
set the type of LTO. Augment the cmake variable to support that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260143
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 8 Feb 2016 20:08:21 +0000 (20:08 +0000)]
Fix build bot failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260138
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 8 Feb 2016 19:49:20 +0000 (19:49 +0000)]
AMDGPU/SI: Implement a work-around for smrd corrupting vccz bit
Summary:
We will hit this once we have enabled uniform branches. The
smrd-vccz-bug.ll test will be added with the uniform branch commit.
Reviewers: mareko, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16725
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260137
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 8 Feb 2016 19:45:24 +0000 (19:45 +0000)]
Add triple to h-registers-3.ll to make bots happy after r260133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260136
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 8 Feb 2016 19:34:30 +0000 (19:34 +0000)]
[X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532)
This matches GCC and MSVC's behaviour, and saves on code size.
We were already not extending i1 return values on x86_64 after r127766. This
takes that patch further by applying it to x86 target as well, and also for i8
and i16.
The ABI docs have been unclear about the required behaviour here. The new i386
psABI [1] clearly states (Table 2.4, page 14) that i1, i8, and i16 return
vales do not need to be extended beyond 8 bits. The x86_64 ABI doc is being
updated to say the same [2].
Differential Revision: http://reviews.llvm.org/D16907
[1]. https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf
[2]. https://groups.google.com/d/msg/x86-64-abi/E8O33onbnGQ/_RFWw_ixDQAJ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260133
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 8 Feb 2016 19:33:18 +0000 (19:33 +0000)]
AArch64: match correct order in subtraction pattern.
The accumulator in multiply-and-subtract instructions is actually subtracted
*from* so these patterns were computing the wrong value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260131
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 8 Feb 2016 19:27:33 +0000 (19:27 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260130
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 8 Feb 2016 19:13:15 +0000 (19:13 +0000)]
Simplify this unittest.
Thanks to dblaikie for the suggestion!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260125
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 8 Feb 2016 19:06:01 +0000 (19:06 +0000)]
AMDGPU: Remove bfi and bfm intrinsics
Nothing is using them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260123
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 8 Feb 2016 18:47:20 +0000 (18:47 +0000)]
[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
Xinliang David Li [Mon, 8 Feb 2016 18:13:49 +0000 (18:13 +0000)]
[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
Silviu Baranga [Mon, 8 Feb 2016 17:02:45 +0000 (17:02 +0000)]
[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
Adrian Prantl [Mon, 8 Feb 2016 17:02:34 +0000 (17:02 +0000)]
Add a unit test for r259973.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260111
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 8 Feb 2016 17:00:39 +0000 (17:00 +0000)]
[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
Matt Arsenault [Mon, 8 Feb 2016 16:28:19 +0000 (16:28 +0000)]
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
Michael Zuckerman [Mon, 8 Feb 2016 15:13:32 +0000 (15:13 +0000)]
[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
Igor Breger [Mon, 8 Feb 2016 14:11:39 +0000 (14:11 +0000)]
[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
Igor Breger [Mon, 8 Feb 2016 12:38:03 +0000 (12:38 +0000)]
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
Silviu Baranga [Mon, 8 Feb 2016 11:56:15 +0000 (11:56 +0000)]
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
Silviu Baranga [Mon, 8 Feb 2016 11:15:29 +0000 (11:15 +0000)]
[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
Silviu Baranga [Mon, 8 Feb 2016 10:45:50 +0000 (10:45 +0000)]
[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
Maxim Ostapenko [Mon, 8 Feb 2016 08:30:57 +0000 (08:30 +0000)]
[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
Dan Gohman [Mon, 8 Feb 2016 03:42:36 +0000 (03:42 +0000)]
[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
Craig Topper [Mon, 8 Feb 2016 01:23:15 +0000 (01:23 +0000)]
[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
Craig Topper [Mon, 8 Feb 2016 01:03:01 +0000 (01:03 +0000)]
[Support] Use hexdigit. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260068
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 8 Feb 2016 01:02:55 +0000 (01:02 +0000)]
[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
NAKAMURA Takumi [Sun, 7 Feb 2016 23:03:38 +0000 (23:03 +0000)]
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
Simon Pilgrim [Sun, 7 Feb 2016 22:51:06 +0000 (22:51 +0000)]
[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
Simon Pilgrim [Sun, 7 Feb 2016 22:22:09 +0000 (22:22 +0000)]
[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
Daniel Berlin [Sun, 7 Feb 2016 20:57:46 +0000 (20:57 +0000)]
Make check line consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260055
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 7 Feb 2016 20:09:18 +0000 (20:09 +0000)]
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
Keno Fischer [Sun, 7 Feb 2016 19:36:54 +0000 (19:36 +0000)]
[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
Philip Reames [Sun, 7 Feb 2016 16:35:04 +0000 (16:35 +0000)]
[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
Philip Reames [Sun, 7 Feb 2016 16:23:32 +0000 (16:23 +0000)]
[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
Philip Reames [Sun, 7 Feb 2016 15:58:35 +0000 (15:58 +0000)]
[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
Roman Divacky [Sun, 7 Feb 2016 15:50:55 +0000 (15:50 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260038
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Sun, 7 Feb 2016 15:49:57 +0000 (15:49 +0000)]
[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
Philip Reames [Sun, 7 Feb 2016 15:42:12 +0000 (15:42 +0000)]
[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
Simon Pilgrim [Sun, 7 Feb 2016 15:39:22 +0000 (15:39 +0000)]
[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
Asaf Badouh [Sun, 7 Feb 2016 14:59:13 +0000 (14:59 +0000)]
[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
Simon Pilgrim [Sun, 7 Feb 2016 14:33:03 +0000 (14:33 +0000)]
[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
Jeroen Ketema [Sun, 7 Feb 2016 11:31:56 +0000 (11:31 +0000)]
Fix typo in default getNoPreservedMask implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260026
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 7 Feb 2016 08:30:50 +0000 (08:30 +0000)]
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
Duncan P. N. Exon Smith [Sun, 7 Feb 2016 05:06:35 +0000 (05:06 +0000)]
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
Daniel Berlin [Sun, 7 Feb 2016 02:03:39 +0000 (02:03 +0000)]
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
Daniel Berlin [Sun, 7 Feb 2016 01:52:19 +0000 (01:52 +0000)]
Compute live-in for MemorySSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260014
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Sun, 7 Feb 2016 01:52:15 +0000 (01:52 +0000)]
Only insert into definingblocks once per block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260013
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 6 Feb 2016 22:09:25 +0000 (22:09 +0000)]
[X86][AVX2] Regenerated broadcast domain tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260010
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 6 Feb 2016 20:11:52 +0000 (20:11 +0000)]
[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
Simon Pilgrim [Sat, 6 Feb 2016 19:51:21 +0000 (19:51 +0000)]
[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
Philip Reames [Sat, 6 Feb 2016 19:43:40 +0000 (19:43 +0000)]
[docs] Warn against slow serial builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260006
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 6 Feb 2016 19:32:44 +0000 (19:32 +0000)]
[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
Philip Reames [Sat, 6 Feb 2016 19:29:23 +0000 (19:29 +0000)]
[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
Philip Reames [Sat, 6 Feb 2016 19:20:26 +0000 (19:20 +0000)]
[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
Simon Pilgrim [Sat, 6 Feb 2016 18:07:19 +0000 (18:07 +0000)]
[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
Simon Pilgrim [Sat, 6 Feb 2016 17:57:15 +0000 (17:57 +0000)]
[X86][SSE] Regenerate vector shift tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259999
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 6 Feb 2016 17:02:15 +0000 (17:02 +0000)]
[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
Simon Pilgrim [Sat, 6 Feb 2016 16:33:42 +0000 (16:33 +0000)]
[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
Teresa Johnson [Sat, 6 Feb 2016 16:07:35 +0000 (16:07 +0000)]
[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
Simon Pilgrim [Sat, 6 Feb 2016 15:38:25 +0000 (15:38 +0000)]
line endings fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259992
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 6 Feb 2016 15:37:09 +0000 (15:37 +0000)]
[X86][SSE] Don't replace an existing 32-bit load with its duplicate
If we are already loading a single 32-bit float/integer then just reuse it.
Fix for regression in D16729
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259991
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 6 Feb 2016 14:21:49 +0000 (14:21 +0000)]
Comment fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259990
91177308-0d34-0410-b5e6-
96231b3b80d8
Ashutosh Nema [Sat, 6 Feb 2016 12:34:41 +0000 (12:34 +0000)]
Corrected tests for Loop Versioning LICM, by adding “REQUIRES: asserts”.
Earlier they were failing under no-assert build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259989
91177308-0d34-0410-b5e6-
96231b3b80d8
Ashutosh Nema [Sat, 6 Feb 2016 09:24:37 +0000 (09:24 +0000)]
Fixed short underline error in LangRef.rst for recently added
metadata 'llvm.loop.licm_versioning.disable' description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259988
91177308-0d34-0410-b5e6-
96231b3b80d8
Ashutosh Nema [Sat, 6 Feb 2016 07:47:48 +0000 (07:47 +0000)]
New Loop Versioning LICM Pass
Summary:
When alias analysis is uncertain about the aliasing between any two accesses,
it will return MayAlias. This uncertainty from alias analysis restricts LICM
from proceeding further. In cases where alias analysis is uncertain we might
use loop versioning as an alternative.
Loop Versioning will create a version of the loop with aggressive aliasing
assumptions in addition to the original with conservative (default) aliasing
assumptions. The version of the loop making aggressive aliasing assumptions
will have all the memory accesses marked as no-alias. These two versions of
loop will be preceded by a memory runtime check. This runtime check consists
of bound checks for all unique memory accessed in loop, and it ensures the
lack of memory aliasing. The result of the runtime check determines which of
the loop versions is executed: If the runtime check detects any memory
aliasing, then the original loop is executed. Otherwise, the version with
aggressive aliasing assumptions is used.
The pass is off by default and can be enabled with command line option
-enable-loop-versioning-licm.
Reviewers: hfinkel, anemet, chatur01, reames
Subscribers: MatzeB, grosser, joker.eph, sanjoy, javed.absar, sbaranga,
llvm-commits
Differential Revision: http://reviews.llvm.org/D9151
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259986
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sat, 6 Feb 2016 01:56:55 +0000 (01:56 +0000)]
Relax assertion in ReplaceableMetadataImpl::replaceAllUsesWith().
There is a legitimate use-case in clang where we need to replace a
temporary placeholder node with the temporary node that may be a
forward declaration.
<rdar://problem/
24493203>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259973
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 6 Feb 2016 01:15:26 +0000 (01:15 +0000)]
[llvm-dwp] Merge cu_index from DWPs
This is almost feature complete - just missing tu_index merging now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259971
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 6 Feb 2016 00:55:08 +0000 (00:55 +0000)]
[Orc] Slightly improve the x86-64 resolver block machine code.
Replace leaq + movq of a pointer with a single movabsq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259968
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 6 Feb 2016 00:46:09 +0000 (00:46 +0000)]
llvm-bcanalyzer: Produce summary information for the BLOCKINFO block, it can be
a significant fraction of the file size (for files that otherwise have few
records). Also include an average size per record in the summary information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259965
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Sat, 6 Feb 2016 00:42:52 +0000 (00:42 +0000)]
Add note of suboptimal behavior in MemorySSA. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259963
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Sat, 6 Feb 2016 00:01:41 +0000 (00:01 +0000)]
[AArch64] Add the scheduling model for Exynos-M1
Summary:
Add the core scheduling model for the Samsung Exynos-M1 (ARMv8-A).
Reviewers: jmolloy, rengolin, christof, MinSeongKIM, t.p.northover
Subscribers: aemerson, rengolin, MatzeB
Differential Revision: http://reviews.llvm.org/D16644
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259958
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 5 Feb 2016 23:40:04 +0000 (23:40 +0000)]
[StatepointLower] Use None instead of Optional<int>()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259956
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 5 Feb 2016 23:28:03 +0000 (23:28 +0000)]
Make the OCaml tests temporarily unsupported until they can be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259954
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 5 Feb 2016 23:27:48 +0000 (23:27 +0000)]
[Orc] Fix a typo in the comments for the x86_64 resolver block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259953
91177308-0d34-0410-b5e6-
96231b3b80d8