oota-llvm.git
10 years ago[LCG] Switch the parent SCC tracking from a SmallSetVector to
Chandler Carruth [Thu, 24 Apr 2014 09:22:31 +0000 (09:22 +0000)]
[LCG] Switch the parent SCC tracking from a SmallSetVector to
a SmallPtrSet. Currently, there is no need for stable iteration in this
dimension, and I now thing there won't need to be going forward.

If this is ever re-introduced in any form, it needs to not be
a SetVector based solution because removal cannot be linear. There will
be many SCCs with large numbers of parents. When encountering these, the
incremental SCC update for intra-SCC edge removal was quadratic due to
linear removal (kind of).

I'm really hoping we can avoid having an ordering property here at all
though...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207091 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] We don't actually need a set in each SCC to track the nodes. We
Chandler Carruth [Thu, 24 Apr 2014 08:55:36 +0000 (08:55 +0000)]
[LCG] We don't actually need a set in each SCC to track the nodes. We
can use the node -> SCC mapping in the top-level graph to test this on
the rare occasions we need it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207090 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[CLNUP] Test commit. Remove newline.
Zinovy Nis [Thu, 24 Apr 2014 08:42:58 +0000 (08:42 +0000)]
[CLNUP] Test commit. Remove newline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207089 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86: Emit test instead of constant shift + compare if the shift result is unused.
Benjamin Kramer [Thu, 24 Apr 2014 08:15:31 +0000 (08:15 +0000)]
X86: Emit test instead of constant shift + compare if the shift result is unused.

This allows us to compile
  return (mask & 0x8 ? a : b);
into
  testb $8, %dil
  cmovnel %edx, %esi
instead of
  andl  $8, %edi
  shrl  $3, %edi
  cmovnel %edx, %esi

which we formed previously because dag combiner canonicalizes setcc of and into shift.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207088 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Switch the SCC's parent iterators to be value iterators rather
Chandler Carruth [Thu, 24 Apr 2014 07:48:18 +0000 (07:48 +0000)]
[LCG] Switch the SCC's parent iterators to be value iterators rather
than pointer iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207086 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAllow vectorization of few missed llvm intrinsic calls in BBVectorizor by handling...
Karthik Bhat [Thu, 24 Apr 2014 07:29:55 +0000 (07:29 +0000)]
Allow vectorization of few missed llvm intrinsic calls in BBVectorizor by handling them in isVectorizableIntrinsic function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207085 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ADT] Attempt to appease another MSVC oddity by moving the injected
Chandler Carruth [Thu, 24 Apr 2014 06:59:50 +0000 (06:59 +0000)]
[ADT] Attempt to appease another MSVC oddity by moving the injected
class name usage into a context we can put typename on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207084 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++] Use 'nullptr'.
Craig Topper [Thu, 24 Apr 2014 06:44:33 +0000 (06:44 +0000)]
[C++] Use 'nullptr'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207083 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ADT] Try to appease MSVC by sinking the enable_if from a default
Chandler Carruth [Thu, 24 Apr 2014 06:16:12 +0000 (06:16 +0000)]
[ADT] Try to appease MSVC by sinking the enable_if from a default
template argument to a default argument to the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207082 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix for PR18921, "vmov" part.
Stepan Dyatkovskiy [Thu, 24 Apr 2014 06:03:01 +0000 (06:03 +0000)]
Fix for PR18921, "vmov" part.
Added support for bytes replication feature, so it could be GAS compatible.

E.g. instructions below:
"vmov.i32 d0, 0xffffffff"
"vmvn.i32 d0, 0xabababab"
"vmov.i32 d0, 0xabababab"
"vmov.i16 d0, 0xabab"
are incorrect, but we could deal with such cases.

For first one we should emit:
"vmov.i8 d0, 0xff"
For second one ("vmvn"):
"vmov.i8 d0, 0x54"
For last two instructions it should emit:
"vmov.i8 d0, 0xab"

P.S.: In ARMAsmParser.cpp I have also fixed few nearby style issues in old code.
Just for keeping method bodies in harmony with themselves.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207080 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse the shiny new iterator adaptor tool to implement the
Chandler Carruth [Thu, 24 Apr 2014 05:33:53 +0000 (05:33 +0000)]
Use the shiny new iterator adaptor tool to implement the
value_op_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207078 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ADT] Factor out the facade aspect of the iterator_adaptor_base into its
Chandler Carruth [Thu, 24 Apr 2014 04:07:06 +0000 (04:07 +0000)]
[ADT] Factor out the facade aspect of the iterator_adaptor_base into its
own CRTP base class for more general purpose use. Add some clarifying
comments for the exact way in which the adaptor uses it. Hopefully this
will help us write increasingly full featured iterators. This is
becoming important as they start to be used heavily inside of ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207072 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ADT] Add a generic iterator utility for adapting iterators much like
Chandler Carruth [Thu, 24 Apr 2014 03:31:23 +0000 (03:31 +0000)]
[ADT] Add a generic iterator utility for adapting iterators much like
Boost's iterator_adaptor, and a specific adaptor which iterates over
pointees when wrapped around an iterator over pointers.

This is the result of a long discussion on IRC with Duncan Smith, Dave
Blaikie, Richard Smith, and myself. Essentially, I could use some subset
of the iterator facade facilities often used from Boost, and everyone
seemed interested in having the functionality in a reasonably generic
form. I've tried to strike a balance between the pragmatism and the
established Boost design. The primary differences are:

1) Delegating to the standard iterator interface names rather than
   special names that then make up a second iterator-like API.
2) Using the name 'pointee_iterator' which seems more clear than
   'indirect_iterator'. The whole business of calling the '*p' operation
   'pointer indirection' in the standard is ... quite confusing. And
   'dereference' is no better of a term for moving from a pointer to
   a reference.

Hoping Duncan, and others continue to provide comments on this until
we've got a nice, minimal abstraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207069 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove unused parameter
David Blaikie [Thu, 24 Apr 2014 01:25:10 +0000 (01:25 +0000)]
Remove unused parameter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207061 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove the intermediate AccelTypes maps in DWARF units.
David Blaikie [Thu, 24 Apr 2014 01:23:49 +0000 (01:23 +0000)]
Remove the intermediate AccelTypes maps in DWARF units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207060 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove the intermediate AccelNamespace maps in DWARF units.
David Blaikie [Thu, 24 Apr 2014 01:02:42 +0000 (01:02 +0000)]
Remove the intermediate AccelNamespace maps in DWARF units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207059 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[InstCombine][x86] Constant fold psll intrinsics.
Michael J. Spencer [Thu, 24 Apr 2014 00:58:18 +0000 (00:58 +0000)]
[InstCombine][x86] Constant fold psll intrinsics.

This excludes avx512 as I don't have hardware to verify. It excludes _dq
variants because they are represented in the IR as <{2,4} x i64> when it's
actually a byte shift of the entire i{128,265}.

This also excludes _dq_bs as they aren't at all supported by the backend.
There are also no corresponding instructions in the ISA. I have no idea why
they exist...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207058 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove the intermediate AccelObjC maps in DWARF units
David Blaikie [Thu, 24 Apr 2014 00:53:32 +0000 (00:53 +0000)]
Remove the intermediate AccelObjC maps in DWARF units

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207057 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoOptimize some special cases for SSE4a insertqi
Filipe Cabecinhas [Thu, 24 Apr 2014 00:38:14 +0000 (00:38 +0000)]
Optimize some special cases for SSE4a insertqi

Summary:
Since the upper 64 bits of the destination register are undefined when
performing this operation, we can substitute it and let the optimizer
figure out that only a copy is needed.

Also added range merging, if an instruction copies a range that can be
merged with a previous copied range.

Added test cases for both optimizations.

Reviewers: grosbach, nadav

CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3357

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207055 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHandle addrspacecast when looking at memcpys from globals
Matt Arsenault [Thu, 24 Apr 2014 00:01:09 +0000 (00:01 +0000)]
Handle addrspacecast when looking at memcpys from globals

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207054 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Normalize the post-order SCC iterator to just iterate over the SCC
Chandler Carruth [Wed, 23 Apr 2014 23:51:07 +0000 (23:51 +0000)]
[LCG] Normalize the post-order SCC iterator to just iterate over the SCC
values rather than having pointers in weird places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207053 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Remove two unused typedefs from the iterators.
Chandler Carruth [Wed, 23 Apr 2014 23:51:02 +0000 (23:51 +0000)]
[LCG] Remove two unused typedefs from the iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207052 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAnd actually use the DwarfDebug::AccelNames to emit the names.
David Blaikie [Wed, 23 Apr 2014 23:46:25 +0000 (23:46 +0000)]
And actually use the DwarfDebug::AccelNames to emit the names.

Fix for r207049 which would've emitted no accelerated names at all...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207051 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMore formatting...
David Blaikie [Wed, 23 Apr 2014 23:38:39 +0000 (23:38 +0000)]
More formatting...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207050 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove intermediate accelerator table for names.
David Blaikie [Wed, 23 Apr 2014 23:37:35 +0000 (23:37 +0000)]
Remove intermediate accelerator table for names.

(similar changes coming for the other accelerator tables)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207049 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Switch the primary node iterator to be a *much* more normal C++
Chandler Carruth [Wed, 23 Apr 2014 23:34:48 +0000 (23:34 +0000)]
[LCG] Switch the primary node iterator to be a *much* more normal C++
iterator, returning a Node by reference on dereference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207048 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Make the insertion and query paths into the LCG which cannot fail
Chandler Carruth [Wed, 23 Apr 2014 23:20:36 +0000 (23:20 +0000)]
[LCG] Make the insertion and query paths into the LCG which cannot fail
return references to better model this property.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207047 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Switch the SCC lookup to be in terms of call graph nodes rather
Chandler Carruth [Wed, 23 Apr 2014 23:12:06 +0000 (23:12 +0000)]
[LCG] Switch the SCC lookup to be in terms of call graph nodes rather
than functions. So far, this access pattern is *much* more common. It
seems likely that any user of this interface is going to have nodes at
the point that they are querying the SCCs.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207045 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDwarfAccelTable: Remove trivial dtor and simplify construction with an array.
David Blaikie [Wed, 23 Apr 2014 23:03:45 +0000 (23:03 +0000)]
DwarfAccelTable: Remove trivial dtor and simplify construction with an array.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207044 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse std::less instead of < in array_pod_sort's default comparator.
Jordan Rose [Wed, 23 Apr 2014 22:44:11 +0000 (22:44 +0000)]
Use std::less instead of < in array_pod_sort's default comparator.

This makes array_pod_sort portably safe to use with pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207043 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Switch the primary SCC building code to use the negative low-link
Chandler Carruth [Wed, 23 Apr 2014 22:28:13 +0000 (22:28 +0000)]
[LCG] Switch the primary SCC building code to use the negative low-link
values rather than an expensive dense map query to test whether children
have already been popped into an SCC. This matches the incremental SCC
building code. I've also included the assert that I put there but
updated both of their text.

No functionality changed here.

I still don't have any great ideas for sharing the code between the two
implementations, but I may try a brute-force approach to factoring it at
some point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207042 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: disable test on thumbv7-windows
Saleem Abdulrasool [Wed, 23 Apr 2014 21:55:18 +0000 (21:55 +0000)]
MC: disable test on thumbv7-windows

This is dependent on changes that are not fully ready to be merged yet (WoA
object file emission).  The test can be re-enabled for that target later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207038 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-cov: Add support for gcov's --long-file-names option
Justin Bogner [Wed, 23 Apr 2014 21:44:55 +0000 (21:44 +0000)]
llvm-cov: Add support for gcov's --long-file-names option

GCOV provides an option to prepend output file names with the source
file name, to disambiguate between covered data that's included from
multiple sources. Add a flag to llvm-cov that does the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207035 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-cov: Allow short options to be grouped
Justin Bogner [Wed, 23 Apr 2014 21:44:48 +0000 (21:44 +0000)]
llvm-cov: Allow short options to be grouped

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207034 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: move test from Generic to COFF
Saleem Abdulrasool [Wed, 23 Apr 2014 21:41:07 +0000 (21:41 +0000)]
MC: move test from Generic to COFF

This is a COFF specific test, move it to COFF to fix the Hexagon buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207030 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: move ARM64 test from AArch64 directory
Saleem Abdulrasool [Wed, 23 Apr 2014 21:29:40 +0000 (21:29 +0000)]
MC: move ARM64 test from AArch64 directory

The test was changed from aarch64 to arm64 but not moved.  The test would fail
if the backend was not built.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207029 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: honour IMAGE_SCN_CNT_INITIALIZED_DATA
Saleem Abdulrasool [Wed, 23 Apr 2014 21:29:34 +0000 (21:29 +0000)]
MC: honour IMAGE_SCN_CNT_INITIALIZED_DATA

Emit the flag to indicate to the assembler that a section contains data if there
is pre-populated data present.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207028 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove the AddressPool from DwarfFile to DwarfDebug.
David Blaikie [Wed, 23 Apr 2014 21:20:10 +0000 (21:20 +0000)]
Move the AddressPool from DwarfFile to DwarfDebug.

There's only ever one address pool, not one per DWARF output file, so
let's just have one.

(similar refactoring of the string pool to come soon)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207026 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format for my previous commit (I keep forgetting... )
David Blaikie [Wed, 23 Apr 2014 21:20:07 +0000 (21:20 +0000)]
clang-format for my previous commit (I keep forgetting... )

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207025 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse pointer size function where only a pointer is expected
Matt Arsenault [Wed, 23 Apr 2014 21:10:15 +0000 (21:10 +0000)]
Use pointer size function where only a pointer is expected

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207023 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSeparate out the DWARF address pool into its own type/files.
David Blaikie [Wed, 23 Apr 2014 21:04:59 +0000 (21:04 +0000)]
Separate out the DWARF address pool into its own type/files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207022 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove more default address space argument usage.
Matt Arsenault [Wed, 23 Apr 2014 20:58:57 +0000 (20:58 +0000)]
Remove more default address space argument usage.

These places are inconsequential in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207021 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Fix the information we give to the peephole optimizer for comparison.
Quentin Colombet [Wed, 23 Apr 2014 20:43:38 +0000 (20:43 +0000)]
[ARM64] Fix the information we give to the peephole optimizer for comparison.
ANDS does not use the same encoding scheme as other xxxS instructions (e.g.,
ADDS). Take that into account to avoid wrong peephole optimization.

<rdar://problem/16693089>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207020 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't use default address space arguments in GlobalOpt
Matt Arsenault [Wed, 23 Apr 2014 20:36:10 +0000 (20:36 +0000)]
Don't use default address space arguments in GlobalOpt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207019 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[python] Fix python bindings tests
Anders Waldenborg [Wed, 23 Apr 2014 20:32:03 +0000 (20:32 +0000)]
[python] Fix python bindings tests

Broke after the changes related to the LLVMGetSymbolFileOffset
removal in r206750

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207018 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add a test that used to be broken that I forgot to add
Matt Arsenault [Wed, 23 Apr 2014 19:45:05 +0000 (19:45 +0000)]
R600: Add a test that used to be broken that I forgot to add

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207017 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format r207010
David Blaikie [Wed, 23 Apr 2014 19:44:08 +0000 (19:44 +0000)]
clang-format r207010

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207016 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConvert test to FileCheck
Matt Arsenault [Wed, 23 Apr 2014 19:32:37 +0000 (19:32 +0000)]
Convert test to FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207015 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Fix missing/wrong scheduling model found by code inspection.
Quentin Colombet [Wed, 23 Apr 2014 19:30:26 +0000 (19:30 +0000)]
[X86] Fix missing/wrong scheduling model found by code inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207014 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-build: Get rid of 'import *'
Anders Waldenborg [Wed, 23 Apr 2014 19:17:42 +0000 (19:17 +0000)]
llvm-build: Get rid of 'import *'

This allows pyflakes catching more errors in the script.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207012 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSplit out DwarfFile from DwarfDebug into its own .h/.cpp files.
David Blaikie [Wed, 23 Apr 2014 18:54:00 +0000 (18:54 +0000)]
Split out DwarfFile from DwarfDebug into its own .h/.cpp files.

Some of these types (DwarfDebug in particular) are quite large to begin
with (and I keep forgetting whether DwarfFile is in DwarfDebug or
DwarfUnit... ) so having a few smaller files seems like goodness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207010 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoProfileData: Avoid unnecessary copies of CounterData
Justin Bogner [Wed, 23 Apr 2014 18:50:16 +0000 (18:50 +0000)]
ProfileData: Avoid unnecessary copies of CounterData

We're currently copying CounterData from InstrProfWriter into the
OnDiskHashTable, even though we don't need to, and then carelessly
leaking those copies. A const pointer is much better here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207009 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[yaml2obj][ELF] Remove unnecessary space between namespace name and
Simon Atanasyan [Wed, 23 Apr 2014 17:30:29 +0000 (17:30 +0000)]
[yaml2obj][ELF] Remove unnecessary space between namespace name and
colons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207003 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASan] Move the shadow range on 32-bit iOS (and iOS Simulator)
Alexander Potapenko [Wed, 23 Apr 2014 17:14:45 +0000 (17:14 +0000)]
[ASan] Move the shadow range on 32-bit iOS (and iOS Simulator)
to 0x40000000-0x60000000 to avoid address space clash with system libraries.
The solution has been proposed by tahabekireren@gmail.com in https://code.google.com/p/address-sanitizer/issues/detail?id=210
This is also known to fix some Chromium iOS tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207002 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove dead code in instcombine.
Matt Arsenault [Wed, 23 Apr 2014 16:48:40 +0000 (16:48 +0000)]
Remove dead code in instcombine.

Don't replace shifts greater than the type with the maximum shift.

This isn't hit anywhere in the tests, and somewhere else is replacing
these with undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207000 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86AsmParser.cpp: Fix memory leak at replacing movsd to movsl.
NAKAMURA Takumi [Wed, 23 Apr 2014 14:51:35 +0000 (14:51 +0000)]
X86AsmParser.cpp: Fix memory leak at replacing movsd to movsl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206991 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agocl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead...
NAKAMURA Takumi [Wed, 23 Apr 2014 14:51:23 +0000 (14:51 +0000)]
cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206990 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMark llvm/test/BugPoint/compile-custom.ll as XFAIL:vg_leak.
NAKAMURA Takumi [Wed, 23 Apr 2014 14:51:12 +0000 (14:51 +0000)]
Mark llvm/test/BugPoint/compile-custom.ll as XFAIL:vg_leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206989 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCentralize handling of ELF_Other_ThumbFunc.
Rafael Espindola [Wed, 23 Apr 2014 14:42:32 +0000 (14:42 +0000)]
Centralize handling of ELF_Other_ThumbFunc.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206988 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix handling of missing DataLayout in sanitizers.
Evgeniy Stepanov [Wed, 23 Apr 2014 12:51:32 +0000 (12:51 +0000)]
Fix handling of missing DataLayout in sanitizers.

Pass::doInitialization is supposed to return False when it did not
change the program, not when a fatal error occurs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206975 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove AssemblyAnnotationWriter from NamedMDNode::print.
Rafael Espindola [Wed, 23 Apr 2014 12:23:05 +0000 (12:23 +0000)]
Remove AssemblyAnnotationWriter from NamedMDNode::print.

No functionality change, this parameter was always set to nullptr.

Patch by Robert Matusewicz!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206972 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCreate MCTargetOptions.
Evgeniy Stepanov [Wed, 23 Apr 2014 11:16:03 +0000 (11:16 +0000)]
Create MCTargetOptions.

For now it contains a single flag, SanitizeAddress, which enables
AddressSanitizer instrumentation of inline assembly.

Patch by Yuri Gorshenin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206971 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[yaml2obj][ELF] Add a virtual destructor to the ELFYAML::Section class
Simon Atanasyan [Wed, 23 Apr 2014 11:10:55 +0000 (11:10 +0000)]
[yaml2obj][ELF] Add a virtual destructor to the ELFYAML::Section class
to prevent memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206969 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Add the first round of mutation support to the lazy call graph.
Chandler Carruth [Wed, 23 Apr 2014 11:03:03 +0000 (11:03 +0000)]
[LCG] Add the first round of mutation support to the lazy call graph.
This implements the core functionality necessary to remove an edge from
the call graph and correctly update both the basic graph and the SCC
structure. As part of that it has to run a tiny (in number of nodes)
Tarjan-style DFS walk of an SCC being mutated to compute newly formed
SCCs, etc.

This is *very rough* and a WIP. I have a bunch of FIXMEs for code
cleanup that will reduce the boilerplate in this change substantially.
I also have a bunch of simplifications to various parts of both
algorithms that I want to make, but first I'd like to have a more
holistic picture. Ideally, I'd also like more testing. I'll probably add
quite a few more unit tests as I go here to cover the various different
aspects and corner cases of removing edges from the graph.

Still, this is, so far, successfully updating the SCC graph in-place
without disrupting the identity established for the existing SCCs even
when we do challenging things like delete the critical edge that made an
SCC cycle at all and have to reform things as a tree of smaller SCCs.
Getting this to work is really critical for the new pass manager as it
is going to associate significant state with the SCC instance and needs
it to be stable. That is also the motivation behind the return of the
newly formed SCCs. Eventually, I'll wire this all the way up to the
public API so that the pass manager can use it to correctly re-enqueue
newly formed SCCs into a fresh postorder traversal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206968 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Fix formatting.
James Molloy [Wed, 23 Apr 2014 10:50:32 +0000 (10:50 +0000)]
[ARM64] Fix formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206967 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Implement Tarjan's algorithm correctly this time. We have to walk
Chandler Carruth [Wed, 23 Apr 2014 10:31:17 +0000 (10:31 +0000)]
[LCG] Implement Tarjan's algorithm correctly this time. We have to walk
up the stack finishing the exploration of each entries children before
we're finished in addition to accounting for their low-links. Added
a unittest that really hammers home the need for this with interlocking
cycles that would each appear distinct otherwise and crash or compute
the wrong result. As part of this, nuke a stale fixme and bring the rest
of the implementation still more closely in line with the original
algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206966 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Add a big endian version of the ARM64 target machine, and update all users.
James Molloy [Wed, 23 Apr 2014 10:26:40 +0000 (10:26 +0000)]
[ARM64] Add a big endian version of the ARM64 target machine, and update all users.

This completes the porting of r202024 (cpirker "Add AArch64 big endian Target (aarch64_be)") to ARM64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206965 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixing typos in commit r206957
Alexey Volkov [Wed, 23 Apr 2014 10:20:31 +0000 (10:20 +0000)]
Fixing typos in commit r206957

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206960 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Add some accessor methods to the SCC to allow iterating over the
Chandler Carruth [Wed, 23 Apr 2014 09:57:18 +0000 (09:57 +0000)]
[LCG] Add some accessor methods to the SCC to allow iterating over the
parents of an SCC, and add a lookup method for finding the SCC for
a given function. These aren't used yet, but will be used shortly in
some unit tests I'm adding and are really part of the broader intended
interface for the analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206959 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Silvermont new scheduler model
Alexey Volkov [Wed, 23 Apr 2014 08:57:09 +0000 (08:57 +0000)]
[X86] Silvermont new scheduler model
This model is not final and work is still in progress.
However there are substantial improvements on integer tests mainly because of better RAL with new scheduler.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206957 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LV] Statistics numbers for LoopVectorize introduced: a number of analyzed loops...
Alexander Musman [Wed, 23 Apr 2014 08:40:37 +0000 (08:40 +0000)]
[LV] Statistics numbers for LoopVectorize introduced: a number of analyzed loops & a number of vectorized loops.
Use -stats to see how many loops were analyzed for possible vectorization and how many of them were actually vectorized.
Patch by Zinovy Nis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206956 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Add a unittest for the LazyCallGraph. I had a weak moment and
Chandler Carruth [Wed, 23 Apr 2014 08:08:49 +0000 (08:08 +0000)]
[LCG] Add a unittest for the LazyCallGraph. I had a weak moment and
resisted this for too long. Just with the basic testing here I was able
to exercise the analysis in more detail and sift out both type signature
bugs in the API and a bug in the DFS numbering. All of these are fixed
here as well.

The unittests will be much more important for the mutation support where
it is necessary to craft minimal mutations and then inspect the state of
the graph. There is just no way to do that with a standard FileCheck
test. However, unittesting these kinds of analyses is really quite easy,
especially as they're designed with the new pass manager where there is
essentially no infrastructure required to rig up the core logic and
exercise it at an API level.

As a minor aside about the DFS numbering bug, the DFS numbering used in
LCG is a bit unusual. Rather than numbering from 0, we number from 1,
and use 0 as the sentinel "unvisited" state. Other implementations often
use '-1' for this, but I find it easier to deal with 0 and it shouldn't
make any real difference provided someone doesn't write silly bugs like
forgetting to actually initialize the DFS numbering. Oops. ;]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206954 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86Disassembler - fixed a bug in immediate print
Elena Demikhovsky [Wed, 23 Apr 2014 07:21:04 +0000 (07:21 +0000)]
X86Disassembler - fixed a bug in immediate print

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206953 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIntegrated assbemler, macros: added 'vararg' argument qualifier support.
Stepan Dyatkovskiy [Wed, 23 Apr 2014 06:56:28 +0000 (06:56 +0000)]
Integrated assbemler, macros: added 'vararg' argument qualifier support.
Note, currently we have no 'vararg' support for darwin macros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206951 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Enable feature predicates for NEON / FP / CRYPTO.
Kevin Qin [Wed, 23 Apr 2014 06:22:48 +0000 (06:22 +0000)]
[ARM64] Enable feature predicates for NEON / FP / CRYPTO.

AArch64 has feature predicates for NEON, FP and CRYPTO instructions.
This allows the compiler to generate code without using FP, NEON
or CRYPTO instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206949 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Hoist the logic for forming a new SCC from the top of the DFSStack
Chandler Carruth [Wed, 23 Apr 2014 06:09:03 +0000 (06:09 +0000)]
[LCG] Hoist the logic for forming a new SCC from the top of the DFSStack
into a helper function. I plan to re-use it for doing incremental
DFS-based updates to the SCCs when we mutate the call graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206948 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Switch the Callee sets to be DenseMaps pointing to the index into
Chandler Carruth [Wed, 23 Apr 2014 04:00:17 +0000 (04:00 +0000)]
[LCG] Switch the Callee sets to be DenseMaps pointing to the index into
the Callee list. This is going to be quite important to prevent removal
from going quadratic. No functionality changed at this point, this is
one of the refactoring patches I've broken out of my initial work toward
mutation updates of the call graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206938 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix test/CodeGen/arm.ll
Reid Kleckner [Wed, 23 Apr 2014 01:09:29 +0000 (01:09 +0000)]
Fix test/CodeGen/arm.ll

The 'CHECK: add' line was occasionally matching against the filename,
breaking the subsequent CHECK-NOT.  Also use CHECK-LABEL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206936 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRequisite reformatting for previous commit.
David Blaikie [Tue, 22 Apr 2014 23:09:36 +0000 (23:09 +0000)]
Requisite reformatting for previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206927 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPush memory ownership of DwarfUnits into clients of DwarfFile.
David Blaikie [Tue, 22 Apr 2014 22:39:41 +0000 (22:39 +0000)]
Push memory ownership of DwarfUnits into clients of DwarfFile.

This prompted me to push references through most of DwarfDebug. Sorry
for the churn.

Honestly it's a bit silly that we're passing around units all over the
place like that anyway and I think it's mostly due to the DIE attribute
adding utility functions being utilities in DwarfUnit. I should have
another go at moving them out of DwarfUnit...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206925 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[docs] Add a note to docs/README.txt
Sean Silva [Tue, 22 Apr 2014 21:47:53 +0000 (21:47 +0000)]
[docs] Add a note to docs/README.txt

Added note to docs/README.txt on how to check the reachibility of
external links in the documentation.

Patch by Dan Liew!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206924 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoChange the prototype for MCContext::FatalError() so it can be called
Kevin Enderby [Tue, 22 Apr 2014 21:42:18 +0000 (21:42 +0000)]
Change the prototype for MCContext::FatalError() so it can be called
from places like MCCodeEmitter() in the MC backend when the
MCContext is const.

I was going to use this in my change for r206669 but Jim convinced
me to use an assert there. But this still is a good tweak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206923 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse std::unique_ptr to handle ownership of DwarfUnits in DwarfFile.
David Blaikie [Tue, 22 Apr 2014 21:27:37 +0000 (21:27 +0000)]
Use std::unique_ptr to handle ownership of DwarfUnits in DwarfFile.

So Chandler - how about those range algorithms? (would really love a
dereferencing range adapter for this sort of stuff)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206921 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWhitespace
Rui Ueyama [Tue, 22 Apr 2014 19:52:05 +0000 (19:52 +0000)]
Whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206919 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoNo need to check condition after grow()
Rui Ueyama [Tue, 22 Apr 2014 19:47:26 +0000 (19:47 +0000)]
No need to check condition after grow()

r206916 was not logically the same as the previous code because the
goto statements did not create loop. This should be the same as the
previous code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206918 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFollow aliases when determining if a symbol is thumb.
Rafael Espindola [Tue, 22 Apr 2014 19:11:07 +0000 (19:11 +0000)]
Follow aliases when determining if a symbol is thumb.

This fixes pr19484.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206917 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReplace loops using goto with plain while loops
Rui Ueyama [Tue, 22 Apr 2014 19:07:14 +0000 (19:07 +0000)]
Replace loops using goto with plain while loops

Goto statements jumping into previous inner blocks are pretty confusing
to read even though in this case they are valid. No reason to not use
while loops there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206916 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Constant Hoisting] Materialize the constant before the cloned cast instruction.
Juergen Ributzka [Tue, 22 Apr 2014 18:06:58 +0000 (18:06 +0000)]
[Constant Hoisting] Materialize the constant before the cloned cast instruction.

In the case where the constant comes from a cloned cast instruction, the
materialization code has to go before the cloned cast instruction.

This commit fixes the method that finds the materialization insertion point
by making it aware of this case.

This fixes <rdar://problem/15532441>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206913 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Constant Hoisting] Print the instructions in the correct order for debugging. No...
Juergen Ributzka [Tue, 22 Apr 2014 18:06:51 +0000 (18:06 +0000)]
[Constant Hoisting] Print the instructions in the correct order for debugging. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206912 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix DataLayout::operator==().
Rafael Espindola [Tue, 22 Apr 2014 17:47:03 +0000 (17:47 +0000)]
Fix DataLayout::operator==().

Patch by Maks Naumov!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206911 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the assembler to print a better relocatable expression error
Kevin Enderby [Tue, 22 Apr 2014 17:27:29 +0000 (17:27 +0000)]
Fix the assembler to print a better relocatable expression error
diagnostic that includes location information.

Currently if one has this assembly:

.quad (0x1234 + (4 * SOME_VALUE))

where SOME_VALUE is undefined ones gets the less than
useful error message with no location information:

% clang -c x.s
clang -cc1as: fatal error: error in backend: expected relocatable expression

With this fix one now gets a more useful error message
with location information:

% clang -c x.s
x.s:5:8: error: expected relocatable expression
 .quad (0x1234 + (4 * SOME_VALUE))
       ^

To do this I plumbed the SMLoc through the MCObjectStreamer
EmitValue() and EmitValueImpl() interfaces so it could be used
when creating the MCFixup.

rdar://12391022

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206906 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify address pool index assignment.
David Blaikie [Tue, 22 Apr 2014 17:21:40 +0000 (17:21 +0000)]
Simplify address pool index assignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206905 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Emit error instead of unreachable on function call
Matt Arsenault [Tue, 22 Apr 2014 16:42:00 +0000 (16:42 +0000)]
R600: Emit error instead of unreachable on function call

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206904 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Reorganize SIInstructions.td
Tom Stellard [Tue, 22 Apr 2014 16:33:57 +0000 (16:33 +0000)]
R600/SI: Reorganize SIInstructions.td

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206902 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX-512: store and truncstore for i1 values
Elena Demikhovsky [Tue, 22 Apr 2014 14:13:10 +0000 (14:13 +0000)]
AVX-512: store and truncstore for i1 values

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206897 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove DOS CRLF.
NAKAMURA Takumi [Tue, 22 Apr 2014 13:35:50 +0000 (13:35 +0000)]
Remove DOS CRLF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206894 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: more testing from AArch64 to ARM64
Tim Northover [Tue, 22 Apr 2014 12:45:47 +0000 (12:45 +0000)]
AArch64/ARM64: more testing from AArch64 to ARM64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206889 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: make use of ANDS and BICS instructions for comparisons.
Tim Northover [Tue, 22 Apr 2014 12:45:42 +0000 (12:45 +0000)]
AArch64/ARM64: make use of ANDS and BICS instructions for comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206888 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add extra testing from AArch64 to ARM64
Tim Northover [Tue, 22 Apr 2014 12:45:32 +0000 (12:45 +0000)]
AArch64/ARM64: add extra testing from AArch64 to ARM64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206887 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Require HasBMI2 for the new BZHI tablegen patterns.
Lang Hames [Tue, 22 Apr 2014 12:04:53 +0000 (12:04 +0000)]
[X86] Require HasBMI2 for the new BZHI tablegen patterns.

Evidently tablegen doesn't infer this from the HasBMI2 predicate on the BZHI
instructions. This should fix the recent bot failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206885 91177308-0d34-0410-b5e6-96231b3b80d8