Commit Graph

127396 Commits

Author SHA1 Message Date
Colin LeMahieu
4ea9b605fc [Hexagon] Fixing relocation generation and adding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:18:02 +00:00
Colin LeMahieu
3f9e772b2c [MC] Adding GOTREL expression variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:17:34 +00:00
Chad Rosier
9c3c7d8479 [AArch64] Hoist now common logic. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:17:18 +00:00
Chad Rosier
14c18a3a4a [AArch64] Rename variable to make it clear we're merging here, not pairing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:09:22 +00:00
Chad Rosier
74ced0a85e [AArch64] Separage the codegen logic for widening vs. pairing. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:02:12 +00:00
Simon Atanasyan
30b32053a4 [llvm-readobj][ELF] Show MIPS GOT content when there is another zero-sized section at the same address
It is possible to have .got section and one or more zero-sized section
at the same address. This patch first checks that GOT (or GOT PLT)
section should have non-zero size using corresponding dynamic tags. Then
it looks up not empty section at the specified address.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 18:45:35 +00:00
Sanjoy Das
23b546ba0d [FunctionAttrs] Fix SCC logic around operand bundles
FunctionAttrs does an "optimistic" analysis of SCCs as a unit, which
means normally it is able to disregard calls from an SCC into itself.
However, calls and invokes with operand bundles are allowed to have
memory effects not fully described by the memory effects on the call
target, so we can't be optimistic around operand-bundled calls from an
SCC into itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 18:40:40 +00:00
Kevin Enderby
f3ca5b4320 Fix a formatting problems with llvm-size and the -m option.
It was using format() with a string for 64-bit types but was
passed a 32-bit type in places when printing values for
32-bit Mach-O files.

rdar://24542509


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 18:33:15 +00:00
Chad Rosier
7fd6a2c433 [AArch64] Cleanup to simplify logic when widening vs. pairing loads/stores. NFC.
The logic to pair instructions and merge narrow instructions has become cloogy
and error prone.  This patch beings to unravel these two similar, but distinct
optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 18:10:20 +00:00
Sanjay Patel
b8a63440e1 [x86] make getOneTrueElt() a helper function ; NFC
As mentioned in http://reviews.llvm.org/D16828 , the related masked load transform
will need this logic, so I'm moving it out to make that patch smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 17:39:58 +00:00
Chad Rosier
b0a81e9335 [AArch64] Rename variable to improve readability. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 15:59:57 +00:00
Chad Rosier
95fa36a182 [AArch64] Remove stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 15:51:33 +00:00
Teresa Johnson
060498bcce Fix comment for MD5Hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 13:28:44 +00:00
Simon Pilgrim
6a78b654c3 [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
2016-02-09 08:19:19 +00:00
Xinliang David Li
a55dfdc22c Add comments to some tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 05:47:08 +00:00
Xinliang David Li
e8571877c4 Further reduce test overhead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 05:36:57 +00:00
Teresa Johnson
9ac7dceace 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
2016-02-09 05:12:44 +00:00
Nick Lewycky
3775b63f3e 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
2016-02-09 04:47:58 +00:00
Sanjoy Das
4e074143e2 [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
2016-02-09 02:31:47 +00:00
Richard Smith
749e602ac0 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
2016-02-09 02:09:16 +00:00
David L Kreitzer
8a618ffc52 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
2016-02-09 01:35:45 +00:00
Sanjoy Das
81c2fc4c81 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
2016-02-09 01:21:57 +00:00
Sanjoy Das
38e2fe6213 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
2016-02-09 01:21:50 +00:00
Richard Smith
bca133d0bb 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
2016-02-09 01:03:42 +00:00
David Blaikie
9f15b40ef7 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
2016-02-09 01:02:24 +00:00
Wei Mi
a60f524c80 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
2016-02-09 00:07:08 +00:00
Davide Italiano
d95e7b09f3 [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
2016-02-08 23:50:23 +00:00
Rong Xu
aab8d7f3e3 [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
2016-02-08 23:11:16 +00:00
Michael Zolotukhin
08d1cff7c6 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
2016-02-08 23:03:59 +00:00
Simon Pilgrim
8464bb8c41 [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
2016-02-08 23:03:46 +00:00
Davide Italiano
68c43d458e [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
2016-02-08 22:58:26 +00:00
Andrew Kaylor
fb2b3b0bed [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
2016-02-08 22:52:51 +00:00
Justin Bogner
eb833bab8d 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
2016-02-08 22:49:40 +00:00
Justin Bogner
5835d8e044 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
2016-02-08 21:55:19 +00:00
Dan Gohman
cdcce2d758 [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
2016-02-08 21:50:13 +00:00
Sanjay Patel
6ac56c2864 rangify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 21:32:43 +00:00
Rong Xu
c9a01773b0 [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
2016-02-08 21:07:46 +00:00
Sanjay Patel
ab75a1751c [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
2016-02-08 21:05:08 +00:00
Justin Bogner
1d15d57f1e 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
2016-02-08 21:01:24 +00:00
Xinliang David Li
307f4d07de Fix build bot failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 20:08:21 +00:00
Tom Stellard
58abe5f3d2 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
2016-02-08 19:49:20 +00:00
Hans Wennborg
da65ee3830 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
2016-02-08 19:45:24 +00:00
Hans Wennborg
7dfc3433f3 [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
2016-02-08 19:34:30 +00:00
Tim Northover
bff2e82786 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
2016-02-08 19:33:18 +00:00
Sanjay Patel
c5e1c3732f fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260130 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 19:27:33 +00:00
Adrian Prantl
4ebe0588be 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
2016-02-08 19:13:15 +00:00
Matt Arsenault
60a32b5936 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
2016-02-08 19:06:01 +00:00
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