OSDN Git Service
Reid Kleckner [Thu, 24 Apr 2014 20:19:22 +0000 (20:19 +0000)]
Remove dead inline function that doesn't compile
MSVC doesn't diagnose this, interestingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207144
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 24 Apr 2014 20:14:34 +0000 (20:14 +0000)]
Add 'musttail' marker to call instructions
This is similar to the 'tail' marker, except that it guarantees that
tail call optimization will occur. It also comes with convervative IR
verification rules that ensure that tail call optimization is possible.
Reviewers: nicholas
Differential Revision: http://llvm-reviews.chandlerc.com/D3240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207143
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 24 Apr 2014 20:14:08 +0000 (20:14 +0000)]
Fix rdtsc.ll test to match r8 on win64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207142
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 24 Apr 2014 18:49:15 +0000 (18:49 +0000)]
Remove C++11ism (specializing a template in a surrounding namespace) to appease the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207136
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 24 Apr 2014 18:44:15 +0000 (18:44 +0000)]
Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location
of the dbg.value. This gets rid of tons of redundant variable DIEs in
subscopes.
rdar://problem/
14874886, rdar://problem/
16679936
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207135
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 24 Apr 2014 18:27:29 +0000 (18:27 +0000)]
[modules] "Specialize" a function by actually specializing a function template
rather than by adding an overload and hoping that it's declared before the code
that calls it. (In a modules build, it isn't.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207133
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 24 Apr 2014 17:41:45 +0000 (17:41 +0000)]
Debug info for optimized code: Support variables that are on the stack and
described by DBG_VALUEs during their lifetime.
Previously, when a variable was at a FrameIndex for any part of its
lifetime, this would shadow all other DBG_VALUEs and only a single
fbreg location would be emitted, which in fact is only valid for a small
range and not the entire lexical scope of the variable. The included
dbg-value-const-byref testcase demonstrates this.
This patch fixes this by
Local
- emitting dbg.value intrinsics for allocas that are passed by reference
- dropping all dbg.declares (they are now fully lowered to dbg.values)
SelectionDAG
- renamed constructors for SDDbgValue for better readability.
- fix UserValue::match() to handle indirect values correctly
- not inserting an MMI table entries for dbg.values that describe allocas.
- lowering dbg.values that describe allocas into *indirect* DBG_VALUEs.
CodeGenPrepare
- leaving dbg.values for an alloca were they are (see comment)
Other
- regenerated/updated instcombine-intrinsics testcase and included source
rdar://problem/
16679879
http://reviews.llvm.org/D3374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207130
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 24 Apr 2014 17:18:27 +0000 (17:18 +0000)]
[X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.
This patch:
- Adds two new X86 builtin intrinsics ('int_x86_rdtsc' and
'int_x86_rdtscp') as GCCBuiltin intrinsics;
- Teaches the backend how to lower the two new builtins;
- Introduces a common function to lower READCYCLECOUNTER dag nodes
and the two new rdtsc/rdtscp intrinsics;
- Improves (and extends) the existing x86 test 'rdtsc.ll'; now test 'rdtsc.ll'
correctly verifies that both READCYCLECOUNTER and the two new intrinsics
work fine for both 64bit and 32bit Subtargets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207127
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 24 Apr 2014 17:08:26 +0000 (17:08 +0000)]
R600/SI: Use address space in allowsUnalignedMemoryAccesses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207126
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Apr 2014 16:59:40 +0000 (16:59 +0000)]
Spread some const around for non-mutating uses of MCSymbolData.
I discovered this const-hole while attempting to coalesnce the Symbol
and SymbolMap data structures. There's some pending issues with that,
but I figured this change was easy to flush early.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207124
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Thu, 24 Apr 2014 16:31:10 +0000 (16:31 +0000)]
[mips] Remove non-ascii character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207123
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 15:04:26 +0000 (15:04 +0000)]
AArch64/ARM64: add ARM64 runs to more MC tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207120
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 15:04:20 +0000 (15:04 +0000)]
AArch64/ARM64: run AArch64 NEON MC tests through ARM64 too.
This skips a couple of compare ones due to the different syntaxt for
floating-point 0.0. AArch64 does it more canonically, and we'll need to fiddle
ARM64 to make it work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207119
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Apr 2014 14:33:36 +0000 (14:33 +0000)]
Fix memory leak of MCSymbolData in MCAsmStreamer.
Leak identified by LSan and reported by Kostya Serebryany.
Let's get a bit experimental here... in theory our minimum compiler
versions support unordered_map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207118
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 14:06:20 +0000 (14:06 +0000)]
AArch64: print NEON lists with a space.
This matches ARM64 behaviour, which I think is clearer. It also puts all the
churn from that difference into one easily ignored commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207116
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 24 Apr 2014 13:29:34 +0000 (13:29 +0000)]
[asan] Use MCInstrInfo in inline asm instrumentation.
Patch by Yuri Gorshenin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207115
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:56:41 +0000 (12:56 +0000)]
AArch64/ARM64: enable remaining MC elf tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207112
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:56:38 +0000 (12:56 +0000)]
AArch64/ARM64: allow negative addends, at least on ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207111
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:56:34 +0000 (12:56 +0000)]
ARM64: support relocated "TBZ/TBNZ" instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207110
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:56:30 +0000 (12:56 +0000)]
AArch64/ARM64: support relocated ADR instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207109
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:56:27 +0000 (12:56 +0000)]
AArch64/ARM64: add support for :abs_gN_s: MOVZ modifiers
We only need assembly support, so it's fairly easy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207108
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:22:12 +0000 (12:22 +0000)]
ARM64: shut up warning about variable only used in assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207106
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:12:10 +0000 (12:12 +0000)]
AArch64/ARM64: disentangle the "B.CC" and "LDR lit" operands
These can have different relocations in ELF. In particular both:
b.eq global
ldr x0, global
are valid, giving different relocations. The only possible way to distinguish
them is via a different fixup, so the operands had to be separated throughout
the backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207105
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:12:01 +0000 (12:12 +0000)]
AArch64/ARM64: enable some MC tests on ARM64
This will also (as with CodeGen) disable testing when the ARM64 backend is not
present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207104
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:11:56 +0000 (12:11 +0000)]
AArch64/ARM64: port bitfield test to ARM64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207103
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:11:53 +0000 (12:11 +0000)]
AArch64/ARM64: implement BFI optimisation
ARM64 was not producing pure BFI instructions for bitfield insertion
operations, unlike AArch64. The approach had to be a little different (in
ISelDAGToDAG rather than ISelLowering), and the outcomes aren't identical but
hopefully this gives it similar power.
This should address PR19424.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207102
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Apr 2014 12:11:46 +0000 (12:11 +0000)]
AArch64/ARM64: port more tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 24 Apr 2014 11:05:20 +0000 (11:05 +0000)]
[LCG] Incorporate the core trick of improvements on the naive Tarjan's
algorithm here: http://dl.acm.org/citation.cfm?id=177301.
The idea of isolating the roots has even more relevance when using the
stack not just to implement the DFS but also to implement the recursive
step. Because we use it for the recursive step, to isolate the roots we
need to maintain two stacks: one for our recursive DFS walk, and another
of the nodes that have been walked. The nice thing is that the latter
will be half the size. It also fixes a complete hack where we scanned
backwards over the stack to find the next potential-root to continue
processing. Now that is always the top of the DFS stack.
While this is a really nice improvement already (IMO) it further opens
the door for two important simplifications:
1) De-duplicating some of the code across the two different walks. I've
actually made the duplication a bit worse in some senses with this
patch because the two are starting to converge.
2) Dramatically simplifying the loop structures of both walks.
I wanted to do those separately as they'll be essentially *just* CFG
restructuring. This patch on the other hand actually uses different
datastructures to implement the algorithm itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207098
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 24 Apr 2014 09:59:59 +0000 (09:59 +0000)]
[LCG] Rotate logic applied to the top of the DFSStack to instead be
applied prior to pushing a node onto the DFSStack. This is the first
step toward avoiding the stack entirely for leaf nodes. It also
simplifies things a bit and I think is pointing the way toward factoring
some more of the shared logic out of the two implementations.
It is also making it more obvious how to restructure the loops
themselves to be a bit easier to read (although no different in terms of
functionality).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 24 Apr 2014 09:59:56 +0000 (09:59 +0000)]
[LCG] Re-order expectations to provide more useful output when debugging
an issue. This way you see that the number of nodes was wrong before
a crash due to accessing too many nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207094
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 24 Apr 2014 09:56:15 +0000 (09:56 +0000)]
[asan] Fix instrumentation of x86 intel syntax inline assembly.
Patch by Yuri Gorshenin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207092
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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