Commit Graph

214588 Commits

Author SHA1 Message Date
Matt Arsenault 6c0674112a AMDGPU: Make findUsedSGPR more readable
Add more comments etc.

llvm-svn: 251996
2015-11-03 22:30:15 +00:00
Matt Arsenault 782c03bb7e AMDGPU: Initialize SIFixSGPRCopies so -print-after works
llvm-svn: 251995
2015-11-03 22:30:13 +00:00
Matt Arsenault d9d659aa23 AMDGPU: Alphabetize includes
llvm-svn: 251994
2015-11-03 22:30:08 +00:00
Tamas Berghammer 5c28ae12ce Use std::list::splice in TaskPool to avoid an allocation
Using std::list::splice to move an element from one list to an other
avoids the allocation of a new element and a move of the data.

llvm-svn: 251993
2015-11-03 22:29:20 +00:00
Tamas Berghammer 276743f060 wip
llvm-svn: 251992
2015-11-03 22:29:16 +00:00
Fiona Glaser a8b653a372 InstCombine: fix sinking of convergent calls
llvm-svn: 251991
2015-11-03 22:23:39 +00:00
Simon Pilgrim 191ac7c679 [SelectionDAG] Use existing constant nodes instead of recreating them. NFC.
llvm-svn: 251990
2015-11-03 22:21:38 +00:00
Alexey Samsonov d6aa820262 [LLVMSymbolize] Factor out the logic for printing structs from DIContext. NFC.
Introduce DIPrinter which takes care of rendering DILineInfo and
friends. This allows LLVMSymbolizer class to return a structured data
instead of plain std::strings.

llvm-svn: 251989
2015-11-03 22:20:52 +00:00
Rafael Espindola 61362ce876 Handle 0 sized sections like any other section.
This is a case where there is inconsistency among ELF linkers:

* The spec says nothing special about empty sections.
* BFD ld removes them.
* Gold handles them like regular sections.

We were outputting them but sometimes ignoring them. This would create
odd looking outputs where a rw section could be in a ro segment for example.

The bfd way of doing things is also strange for the case where a symbol
points to the empty section.

Now we match gold and what seems to be the intention of the spec.

llvm-svn: 251988
2015-11-03 22:08:08 +00:00
Rafael Espindola d7a267b84b Remove redundant = nullptr.
llvm-svn: 251987
2015-11-03 22:01:20 +00:00
Simon Pilgrim b0d860a394 [X86][AVX] Tweaked shuffle stack folding tests
To avoid alternative lowerings.

llvm-svn: 251986
2015-11-03 21:58:35 +00:00
Adam Nemet a2df750fb3 [LAA] LLE 3/6: Rename InterestingDependence to Dependences, NFC
Summary:
We now collect all types of dependences including lexically forward
deps not just "interesting" ones.

Reviewers: hfinkel

Subscribers: rengolin, llvm-commits

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

llvm-svn: 251985
2015-11-03 21:39:52 +00:00
Simon Pilgrim df993479c9 [X86][AVX512] Fixed shuffle test name to match shuffle
llvm-svn: 251984
2015-11-03 21:39:30 +00:00
Zachary Turner 46f1784bac Python 3 - Fix checking of string types in unittest2 module.
This patch actually introduces a dependency from unittest2 to
six.  This should be ok since both packages are in our own
repo, and we assume a sys.path of the top-level script that
can find the third party packages.  So unittest2 should be
able to find six.

llvm-svn: 251983
2015-11-03 21:37:42 +00:00
Zachary Turner bac6e4f75b Introduce seven.cmp_ and use it instead of cmp
llvm-svn: 251982
2015-11-03 21:37:27 +00:00
Alexey Samsonov 6881249895 [LLVMSymbolize] Move demangling away from printing routines. NFC.
Make printDILineInfo and friends responsible for just rendering the
contents of the structures, demangling should actually be performed
earlier, when we have the information about the originating
SymbolizableModule at hand.

llvm-svn: 251981
2015-11-03 21:36:13 +00:00
Rafael Espindola 443f50a833 Create .bss only when needed.
This is a small complication, but produces nicer output and is a step to
handling zero size sections uniformly.

llvm-svn: 251980
2015-11-03 21:35:14 +00:00
Ramkumar Ramachandra d5fa22620b Squelch a silly warning regarding an extra 'default' in 'case'
Let the editor also clean up whitespace for that file.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 251979
2015-11-03 21:29:52 +00:00
Zachary Turner 234860133b Python 3 - Fix some issues in unittest2.
unittest2 was using print statements in a few places, and also
using the `cmp` function (which is removed in Python 3).  Again,
we need to stop using unittest2 and using unittest instead, but
this seems like an easier route for now.

llvm-svn: 251978
2015-11-03 21:02:00 +00:00
Zachary Turner 9618980a19 Python 3: Modernize exception raising syntax.
Old-style: `raise foo, bar`
New-style: `raise foo(bar)`

These two statements are equivalent, but the former is an error in
Python 3.

llvm-svn: 251977
2015-11-03 21:01:45 +00:00
Davide Italiano c8a7913f23 [SimplifyLibCalls] Add a new transformation: pow(exp(x), y) -> exp(x*y)
This one is enabled only under -ffast-math (due to rounding/overflows)
but allows us to emit shorter code.

Before (on FreeBSD x86-64):
4007f0:       50                      push   %rax
4007f1:       f2 0f 11 0c 24          movsd  %xmm1,(%rsp)
4007f6:       e8 75 fd ff ff          callq  400570 <exp2@plt>
4007fb:       f2 0f 10 0c 24          movsd  (%rsp),%xmm1
400800:       58                      pop    %rax
400801:       e9 7a fd ff ff          jmpq   400580 <pow@plt>
400806:       66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)
40080d:       00 00 00

After:
4007b0:       f2 0f 59 c1             mulsd  %xmm1,%xmm0
4007b4:       e9 87 fd ff ff          jmpq   400540 <exp2@plt>
4007b9:       0f 1f 80 00 00 00 00    nopl   0x0(%rax)

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

llvm-svn: 251976
2015-11-03 20:32:23 +00:00
Simon Pilgrim e88dc04c48 [X86][XOP] Add support for the matching of the VPCMOV bit select instruction
XOP has the VPCMOV instruction that performs the common vector bit select operation OR( AND( SRC1, SRC3 ), AND( SRC2, ~SRC3 ) )

This patch adds tablegen pattern matching for this instruction.

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

llvm-svn: 251975
2015-11-03 20:27:01 +00:00
Rui Ueyama f4acad30ec llmv-pdbdump: Make BuiltinDumper shorter. NFC.
llvm-svn: 251974
2015-11-03 20:16:18 +00:00
Adam Nemet d7037c56d3 [LAA] LLE 2/6: Fix a NoDep case that should be a Forward dependence
Summary:
When the dependence distance in zero then we have a loop-independent
dependence from the earlier to the later access.

No current client of LAA uses forward dependences so other than
potentially hitting the MaxDependences threshold earlier, this change
shouldn't affect anything right now.

This and the previous patch were tested together for compile-time
regression.  None found in LNT/SPEC.

Reviewers: hfinkel

Subscribers: rengolin, llvm-commits

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

llvm-svn: 251973
2015-11-03 20:13:43 +00:00
Adam Nemet b45516e875 [LAA] LLE 1/6: Expose Forward dependences
Summary:
Before this change, we didn't use to collect forward dependences since
none of the current clients (LV, LDist) required them.

The motivation to also collect forward dependences is a new pass
LoopLoadElimination (LLE) which discovers store-to-load forwarding
opportunities across the loop's backedge.  The pass uses both lexically
forward or backward loop-carried dependences to detect these
opportunities.

The new pass also analyzes loop-independent (forward) dependences since
they can conflict with the loop-carried dependences in terms of how the
data flows through memory.

The newly added test only covers loop-carried forward dependences
because loop-independent ones are currently categorized as NoDep.  The
next patch will fix this.

The two patches were tested together for compile-time regression.  None
found in LNT/SPEC.

Note that with this change LAA provides all dependences rather than just
"interesting" ones.  A subsequent NFC patch will remove the now trivial
isInterestingDependence and rename the APIs.

Reviewers: hfinkel

Subscribers: jmolloy, rengolin, llvm-commits

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

llvm-svn: 251972
2015-11-03 20:13:23 +00:00
Rafael Espindola d1ec682411 Update for llvm change.
llvm-svn: 251971
2015-11-03 20:02:28 +00:00
Rafael Espindola 2b27b2f5a7 Don't create empty sections just to look like gas.
We are long past the time when this much bug for bug compatibility was
useful.

llvm-svn: 251970
2015-11-03 20:02:22 +00:00
Rafael Espindola 7bb1adfd66 Avoid checking for irrelevant facts.
If the test is not for layout, it should not depend on the address for example.

llvm-svn: 251969
2015-11-03 19:56:47 +00:00
Zachary Turner c07138f6a0 Python 3 - modernize exception catching syntax.
Old-style syntax:  `except Exception, e:`
New-style syntax:  `except Exception as e:`

These two statements are identical, except that the former has
been deprecated for may versions, and was removed in Python 3.

This converts everything to use the new syntax (which also works
in Python 2).  I had to convert unittest2 as well.  What we really
need to do is just delete unittest2, and use unittest instead since
it is a standard module that ships with every Python distribution.
But this is the path of least resistance for now, although at
some point we will really need to do it.

llvm-svn: 251968
2015-11-03 19:49:05 +00:00
Rafael Espindola 56e0aafa2b Relax a few more overspecified tests.
llvm-svn: 251967
2015-11-03 19:38:19 +00:00
Devin Coughlin 6bc780ccc0 [analyzer] Move the ObjCGenericsChecker out of the alpha package.
It is now in the osx.cocoa package and so will be on by default for Apple
toolchains.

llvm-svn: 251966
2015-11-03 19:38:03 +00:00
Teresa Johnson 255787a969 Revert "Move metadata linking after lazy global materialization/linking."
This reverts commit r251926. I believe this is causing an LTO
bootstrapping bot failure
(http://lab.llvm.org:8080/green/job/llvm-stage2-cmake-RgLTO_build/3669/).

Haven't been able to repro it yet, but after looking at the metadata I
am pretty sure I know what is going on.

llvm-svn: 251965
2015-11-03 19:36:04 +00:00
Rafael Espindola 41302723de Remove unnecessary dependency on section and string positions.
llvm-svn: 251964
2015-11-03 19:24:17 +00:00
Zachary Turner 19474e1801 Remove `use_lldb_suite` from the package, and don't import it anymore.
This module was originally intended to be imported by top-level
scripts to be able to find the LLDB packages and third party
libraries.  Packages themselves shouldn't need to import it,
because by the time it gets into the package, the top-level
script should have already done this.  Indeed, it was just
adding the same values to sys.path multiple times, so this
patch is essentially no functional change.

To make sure it doesn't get re-introduced, we also delete the
`use_lldb_suite` module from `lldbsuite/test`, although the
original copy still remains in `lldb/test`

llvm-svn: 251963
2015-11-03 19:20:39 +00:00
Johannes Doerfert 22892687f7 [FIX] Simplify and correct preloading of base pointer origin
To simplify and correct the preloading of a base pointer origin, e.g.,
  the base pointer for the current indirect invariant load, we now just
  check if there is an invariant access class that involves the base
  pointer of the current class.

llvm-svn: 251962
2015-11-03 19:15:33 +00:00
Kostya Serebryany 856b7afe60 [libFuzzer] make -test_single_input more reliable: make sure the input's size is equal to it's capacity
llvm-svn: 251961
2015-11-03 18:57:25 +00:00
Rafael Espindola 43e2e251ea Delete dead code.
llvm-svn: 251960
2015-11-03 18:55:58 +00:00
Zachary Turner bb03a4660f Python 3 - Don't use `commands` module anymore.
The `commands` module was deprecated in 2.7 and removed in 3.x.
As a workaround, we introduce a new module `seven` in
lldbsuite.support, and write helper functions in there that delegate
to the commands module if it is available, and re-implement their
functionality for cases where it is not available.

llvm-svn: 251959
2015-11-03 18:55:22 +00:00
Rafael Espindola e7fe1a46e4 Simplify local common output.
We now create them as they are found and use higher level APIs.

This is a step in avoiding creating unnecessary sections.

llvm-svn: 251958
2015-11-03 18:50:51 +00:00
Igor Laevsky f637b4a52e [CodegenPrepare] Do not rematerialize gc.relocates across different basic blocks
Differential Revision: http://reviews.llvm.org/D14258

llvm-svn: 251957
2015-11-03 18:37:40 +00:00
Enrico Granata 32d68fec56 Revert r251882 as it breaks the test suite
llvm-svn: 251956
2015-11-03 18:35:17 +00:00
Douglas Gregor 6623e1f10f Introduce module file extensions to piggy-back data onto module files.
Introduce the notion of a module file extension, which introduces
additional information into a module file at the time it is built that
can then be queried when the module file is read. Module file
extensions are identified by a block name (which must be unique to the
extension) and can write any bitstream records into their own
extension block within the module file. When a module file is loaded,
any extension blocks are matched up with module file extension
readers, that are per-module-file and are given access to the input
bitstream.

Note that module file extensions can only be introduced by
programmatic clients that have access to the CompilerInvocation. There
is only one such extension at the moment, which is used for testing
the module file extension harness. As a future direction, one could
imagine allowing the plugin mechanism to introduce new module file
extensions.

llvm-svn: 251955
2015-11-03 18:33:07 +00:00
Pavel Labath 63103c9279 Fix flakyness in TestWatchLocationWithWatchSet
Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that.

llvm-svn: 251954
2015-11-03 18:17:21 +00:00
Tim Northover 33e3ed17da Revert "Support watchOS and tvOS in compiler-rt builds"
The required compiler-rt changes aren't present yet so attempting to
build with compiler-rt breaks. And since we're trying to deprecate
autotools we actually want to fix this in CMake primarily anyway.

This reverts r251712.

llvm-svn: 251953
2015-11-03 18:14:42 +00:00
Rafael Espindola e0550a80a4 Move code out of a loop and use a range loop.
llvm-svn: 251952
2015-11-03 18:04:07 +00:00
Tamas Berghammer 53feb8c10b Skip TestBacktraceAll on android-arm
The android compiler can't compile the inferior because of an issue
in the standard library.

llvm-svn: 251951
2015-11-03 18:03:47 +00:00
Pavel Labath daa51d4a96 Leave TestAttachResume as flakey on linux
there must be (at least) one more race hidden there...

llvm-svn: 251950
2015-11-03 17:33:31 +00:00
Douglas Gregor e17765eed0 Simplify Sema::ProcessPropertyDecl. NFC
Now that the properties created within Objective-C class extensions go
into the extension themselves, we don't need any of the extra
complexity here.

llvm-svn: 251949
2015-11-03 17:02:34 +00:00
Johannes Doerfert eca9e890b9 Remove read-only statements from the SCoP
We do not need to model read-only statements in the SCoP as they will
  not cause any side effects that are visible to the outside anyway.
  Removing them should safe us time and might even simplify the ASTs we
  generate.

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

llvm-svn: 251948
2015-11-03 16:54:49 +00:00
Johannes Doerfert e071f6d637 [NFC] Name invariant load parameters after base pointer
This just makes the debug output nices sometimes.

llvm-svn: 251947
2015-11-03 16:49:59 +00:00