Rafael Espindola [Tue, 29 Apr 2014 12:46:50 +0000 (12:46 +0000)]
Centralize the handling of the thumb bit.
This patch centralizes the handling of the thumb bit around
MCStreamer::isThumbFunc and makes isThumbFunc handle aliases.
This fixes a corner case, but the main advantage is having just one
way to check if a MCSymbol is thumb or not. This should still be
refactored to be ARM only, but at least now it is just one predicate
that has to be refactored instead of 3 (isThumbFunc,
ELF_Other_ThumbFunc, and SF_ThumbFunc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207522
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Apr 2014 10:13:10 +0000 (10:13 +0000)]
ARM: fix test after change to indirect symbol emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207519
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Apr 2014 10:06:10 +0000 (10:06 +0000)]
X86: emit hidden stubs into a proper non_lazy_symbol_pointer section.
rdar://problem/
16660411
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207518
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Apr 2014 10:06:05 +0000 (10:06 +0000)]
ARM: emit hidden stubs into a proper non_lazy_symbol_pointer section.
rdar://problem/
16660411
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207517
91177308-0d34-0410-b5e6-
96231b3b80d8
Zinovy Nis [Tue, 29 Apr 2014 09:45:08 +0000 (09:45 +0000)]
[BUG] Fix -Wunused-variable warning in Release mode. Thnx to Kostya Serebryany for pointing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207516
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 Apr 2014 09:37:54 +0000 (09:37 +0000)]
AArch64: Mark vector long multiplication as expand.
There are no patterns for this. This was already fixed for ARM64 but I forgot
to apply it to AArch64 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207515
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 29 Apr 2014 09:33:02 +0000 (09:33 +0000)]
fix -Wunused-variable warning in Release mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207514
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 29 Apr 2014 09:09:15 +0000 (09:09 +0000)]
AVX-512: optimized a shuffle pattern to VINSERTI64x4.
Added intrinsics for VPERMT2PS/PD/D/Q instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207513
91177308-0d34-0410-b5e6-
96231b3b80d8
Zinovy Nis [Tue, 29 Apr 2014 08:55:11 +0000 (08:55 +0000)]
[OPENMP][LV][D3423] Respect Hints.Force meta-data for loops in LoopVectorizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207512
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:58:41 +0000 (07:58 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207511
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:58:34 +0000 (07:58 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. AArch64 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207510
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:58:25 +0000 (07:58 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. ARM64 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207509
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:58:16 +0000 (07:58 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Hexagon edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207508
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:58:09 +0000 (07:58 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. MSP430 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207507
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:58:02 +0000 (07:58 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207506
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:57:44 +0000 (07:57 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. NVPTX edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207505
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:57:37 +0000 (07:57 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. PowerPC edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207504
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:57:24 +0000 (07:57 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. R600 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207503
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:57:13 +0000 (07:57 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Sparc edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207502
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 29 Apr 2014 07:57:00 +0000 (07:57 +0000)]
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. XCore edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207501
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Tue, 29 Apr 2014 07:51:19 +0000 (07:51 +0000)]
[ARM64]Fix a bug about incorrect operand order in an EXT instruction, which is introduced by r207485.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207500
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 29 Apr 2014 07:35:33 +0000 (07:35 +0000)]
Fix a typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207499
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 29 Apr 2014 01:57:35 +0000 (01:57 +0000)]
[ADT] Make the iterator adaptor utility a touch more general by
requiring full control over the various parameters to the std::iterator
concept / trait thing. This is a precursor for adjusting these things to
where you can write a bidirectional iterator wrapping a random access
iterator with custom increment and decrement logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207487
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Tue, 29 Apr 2014 01:50:36 +0000 (01:50 +0000)]
[ARM64]Fix a bug when lowering shuffle vector to an EXT instruction.
E.g. Mask like <-1, -1, 1, ...> will generate incorrect EXT index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207485
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 29 Apr 2014 00:16:46 +0000 (00:16 +0000)]
None of these targets actually define their own CFI_INSTRUCTION
opcode so there's no reason to use the target namespace for it
rather than TargetOpcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207475
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 29 Apr 2014 00:16:42 +0000 (00:16 +0000)]
80-column fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207474
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 29 Apr 2014 00:16:40 +0000 (00:16 +0000)]
80-column, tab characters, comment fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207473
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 29 Apr 2014 00:16:33 +0000 (00:16 +0000)]
Fix 80-columns, tab characters, and comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207472
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 29 Apr 2014 00:14:27 +0000 (00:14 +0000)]
[ADT] Teach PointerUnion to support assignment directly from nullptr to
clear it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 23:44:14 +0000 (23:44 +0000)]
[cleanup] Add some actual positive tests for equality. This unittest
never actually compared for equality two pointer unions that were equal.
Fortunately, things seem to work. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 23:42:22 +0000 (23:42 +0000)]
[cleanup] Make this test use a proper fixture rather than globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 23:37:53 +0000 (23:37 +0000)]
[cleanup] Fix the whitespace in this test. Notably, correct spacing
around pointer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207465
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 23:36:52 +0000 (23:36 +0000)]
Remove DwarfUnit::LabelRange since it's unused.
Seems at some point the intent was to emit fission ranges_base as unique
per CU but the code today emits ranges_base as the start of the ranges
section for all CUs being compiled and all the ranges_base relative
addresses are relative to that. So removing this dead code and leaving
the status quo until there's a reason to change it (perhaps something's
faster if it has distinct ranges for each CU).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207464
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 23:07:49 +0000 (23:07 +0000)]
Revert r207271 for now. This commit introduced a test case that ran
clang directly from the LLVM test suite! That doesn't work. I've
followed up on the review thread to try and get a viable solution sorted
out, but trying to get the tree clean here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207462
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Apr 2014 23:00:06 +0000 (23:00 +0000)]
[DWARF parser] DWARFDebugFrame: Make FrameEntry struct smaller.
FrameEntry doesn't need to hold a reference to the section it is
located in. Instead, pass DataExtractor as an argument of parsing
function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207461
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 22:52:50 +0000 (22:52 +0000)]
AddressPool::HasBeenUsed: Add comment explaining the use-case for this flag.
Based on code review by Eric Christopher on r207323
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207460
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Apr 2014 22:52:24 +0000 (22:52 +0000)]
[DWARF parser] DWARFDebugFrame: use unique_ptr instead of raw pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207459
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 22:41:39 +0000 (22:41 +0000)]
DIE: Document some learnings about why the world isn't perfect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207458
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Apr 2014 22:27:46 +0000 (22:27 +0000)]
[DWARF parser] Simplify DWARFDebugAranges generation.
There is no need to keep the whole contents of .debug_aranges section
in memory when we build address ranges table. Memory optimization that
used to be in this code (precalculate the size of vector of ranges before
filling it) is not really needed - later we will compact and resize this
vector anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207457
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 22:27:26 +0000 (22:27 +0000)]
Satisfy sub-optimal GCC warning.
(Clang doesn't warn here because it knows the string is benign - the
assert still checks what it's intended to - though putting the correct
parens does make clang-format format the code a little better)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207456
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 28 Apr 2014 22:24:57 +0000 (22:24 +0000)]
We already calculate WideVT above, just reuse it.
Patch by Jan Vesely <jan.vesely@rutgers.edu>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207455
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 28 Apr 2014 22:19:12 +0000 (22:19 +0000)]
Add (...) around && clause to appeace gcc 4.8's warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207452
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 28 Apr 2014 22:06:20 +0000 (22:06 +0000)]
Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake
option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207450
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 21:14:27 +0000 (21:14 +0000)]
DebugInfo: Just store the DIE by value in the DwarfUnit
Since all 4 ctor calls in DwarfDebug just pass in a trivially
constructed DIE with the right tag type, sink the tag selection down
into the Dwarf*Unit ctors (removing the argument entirely from callers
in DwarfDebug) and initialize the DIE member in DwarfUnit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207448
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 21:04:29 +0000 (21:04 +0000)]
Pass DIEs to DwarfUnit constructors by unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207447
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Apr 2014 20:53:11 +0000 (20:53 +0000)]
Add an option for evaluating past symbols.
When evaluating an assembly expression for a relocation, we want to
stop at MCSymbols that are in the symbol table, even if they are variables.
This is needed since the semantics may require that the relocation use them.
That is not the case when computing the value of a symbol in the symbol table.
There are no relocations in this case and we have to keep going until we hit
a section or find out that the expression doesn't have an assembly time
value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207445
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 28 Apr 2014 20:42:22 +0000 (20:42 +0000)]
Reformat, 80-col, tab characters, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207444
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 20:36:45 +0000 (20:36 +0000)]
Improve explicit memory ownership of DIEs
Now that the subtle constructScopeDIE has been refactored into two
functions - one returning memory to take ownership of, one returning a
pointer to already owning memory - push unique_ptr through more APIs.
I think this completes most of the unique_ptr ownership of DIEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207442
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 Apr 2014 20:27:02 +0000 (20:27 +0000)]
DwarfDebug: Omit DW_AT_object_pointer on inlined_subroutines
While refactoring out constructScopeDIE into two functions I realized we
were emitting DW_AT_object_pointer in the inlined subroutine when we
didn't need to (GCC doesn't, and the abstract subprogram definition has
the information already).
So here's the refactoring and the bug fix. This is one step of
refactoring to remove some subtle memory ownership semantics. It turns
out the original constructScopeDIE returned ownership in its return
value in some cases and not in others. The split into two functions now
separates those two semantics - further cleanup (unique_ptr, etc) will
follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207441
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Apr 2014 20:22:29 +0000 (20:22 +0000)]
blockfreq: Remove more extra typenames from r207438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207440
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Apr 2014 20:08:23 +0000 (20:08 +0000)]
blockfreq: Remove extra typename from r207438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207439
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Apr 2014 20:02:29 +0000 (20:02 +0000)]
Reapply "blockfreq: Approximate irreducible control flow"
This reverts commit r207287, reapplying r207286.
I'm hoping that declaring an explicit struct and instantiating
`addBlockEdges()` directly works around the GCC crash from r207286.
This is a lot more boilerplate, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207438
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 28 Apr 2014 18:39:57 +0000 (18:39 +0000)]
[X86] Add more details in the comments of X86TargetLowering::getScalingFactorCost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207432
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 28 Apr 2014 18:19:25 +0000 (18:19 +0000)]
[PM] Add pass run listeners to the pass manager.
This commit provides the necessary C/C++ APIs and infastructure to enable fine-
grain progress report and safe suspension points after each pass in the pass
manager.
Clients can provide a callback function to the pass manager to call after each
pass. This can be used in a variety of ways (progress report, dumping of IR
between passes, safe suspension of threads, etc).
The run listener list is maintained in the LLVMContext, which allows a multi-
threaded client to be only informed for it's own thread. This of course assumes
that the client created a LLVMContext for each thread.
This fixes <rdar://problem/
16728690>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207430
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 28 Apr 2014 18:11:51 +0000 (18:11 +0000)]
Fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207429
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 28 Apr 2014 18:11:01 +0000 (18:11 +0000)]
Modify the assertion in DIBuilder.cpp to cover the DWARF 5 languages
Differential Revision: http://reviews.llvm.org/D3523
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207428
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 28 Apr 2014 17:40:03 +0000 (17:40 +0000)]
InstCombine: don't drop 'inalloca' in PromoteCastOfAllocation (PR19569)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207426
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Apr 2014 17:05:36 +0000 (17:05 +0000)]
Simplify ELFObjectWriter::ExecutePostLayoutBinding.
No functionality change. This removes the last use of AliasedSymbol in
ELFObjectWriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 28 Apr 2014 16:21:50 +0000 (16:21 +0000)]
[ARM64] Fix an issue where we were always assuming a copy was coming from a D subregister.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207423
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Apr 2014 14:24:44 +0000 (14:24 +0000)]
Simplify isLocal().
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207421
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 28 Apr 2014 13:53:00 +0000 (13:53 +0000)]
ARM: stop passing unused values up the TableGen hierarchy.
It's bad enough that I have to look up 5 different levels of TableGen class
definitions to work out what bits go where in a simple NEON instruction anyway,
without having to keep track of umpteen unused parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207420
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Apr 2014 13:39:57 +0000 (13:39 +0000)]
Don't include an invalid symbol in the symbol table.
The symbol table itself has no relocations, so it is not possible to represent
things like
a = undefined + 1
With the patch we just omit these variables. That matches the behaviour of the
gnu assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207419
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Apr 2014 13:26:35 +0000 (13:26 +0000)]
List the entire symbol table in this test.
This will allow us to extend this test to show that other symbols don't
show up in the symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207418
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Apr 2014 12:40:50 +0000 (12:40 +0000)]
Produce an error instead of a crash in an expr we cannot represent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207414
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Mon, 28 Apr 2014 12:12:27 +0000 (12:12 +0000)]
Fix gcc -Wsign-compare warning in X86DisassemblerTables.cpp.
X86_MAX_OPERANDS is changed to unsigned.
Also, add range-based for loops for affected loops. This in turn
needed an ArrayRef instead of a pointer-to-array in
InternalInstruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207413
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 28 Apr 2014 11:27:43 +0000 (11:27 +0000)]
ARM64: diagnose use of v16-v31 in certain indexed NEON instructions.
Someone couldn't bear to have a completely orthogonal set of floating-point
registers, so we've got some instructions that only accept v0-v15 (coming in
ARMv9, V128_prime: you're allowed v2, v3, v5, v7, ...).
Anyway, we were permitting even the out of range registers during assembly
(CodeGen handled it correctly). This adds a diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 11:10:23 +0000 (11:10 +0000)]
[LCG] Add the most basic of edge insertion to the lazy call graph. This
just handles the pre-DFS case. Also add some test cases for this case to
make sure it works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 10:49:06 +0000 (10:49 +0000)]
[LCG] Make the return of the IntraSCC removal method actually match its
contract (and be much more useful). It now provides exactly the
post-order traversal a caller might need to perform on newly formed
SCCs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 10:37:30 +0000 (10:37 +0000)]
Fix rampant quadratic behavior in UpdatePHINodes. The operation of
mapping from a basic block to an incoming value, either for removal or
just lookup, is linear in the number of predecessors, and we were doing
this for every entry in the 'Preds' list which is in many cases almost
all of them!
Unfortunately, the fixes are quite ugly. PHI nodes just don't make this
operation easy. The efficient way to fix this is to have a clever
'remove_if' operation on PHI nodes that lets us do a single pass over
all the incoming values of the original PHI node, extracting the ones we
care about. Then we could quickly construct the new phi node from this
list. This would remove the remaining underlying quadratic movement of
unrelated incoming values and the need for silly backwards looping to
"minimize" how often we hit the quadratic case.
This is the last obvious fix for PR19499. It shaves another 20% off the
compile time for me, and while UpdatePHINodes remains in the profile,
most of the time is now stemming from the well known inefficiencies of
LVI and jump threading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 09:34:03 +0000 (09:34 +0000)]
Fix very poor compile-time in PR19499 due to excessive tree walks in
domtree. When finding a nearest common dominator, if neither A dominates
B nor B dominates A, we immediately resorted to a tree walk. The tree
walk here is *particularly* expensive because we have to build
a (potentially very large) set for one side's dominators and compare it
with the other side's.
If at any point we have DFS info, we don't need to do any of this. We
can just walk up one side's immediate dominators and return the first
one which dominates the other side. Because of the DFS info, the
dominates queries are trivially constant time.
This reduces the optimizers time in the test case on PR19499 by 70%. It
now optimizes in about 30 seconds for me. And there is still more to be
done for this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207406
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 28 Apr 2014 09:10:05 +0000 (09:10 +0000)]
If building with LLVM_ENABLE_DOXYGEN and using CMake then
abort while configuring if doxygen could not be found. This
is desirable because if the build is going to fail then it should
fail as early as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207404
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 08:52:44 +0000 (08:52 +0000)]
[inliner] Significantly improve the compile time in cases like PR19499
by avoiding inlining massive switches merely because they have no
instructions in them. These switches still show up where we fail to form
lookup tables, and in those cases they are actually going to cause
a very significant code size hit anyways, so inlining them is not the
right call. The right way to fix any performance regressions stemming
from this is to enhance the switch-to-lookup-table logic to fire in more
places.
This makes PR19499 about 5x less bad. It uncovers a second compile time
problem in that test case that is unrelated (surprisingly!).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207403
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Mon, 28 Apr 2014 07:34:27 +0000 (07:34 +0000)]
[ARM64]Fix a bug cannot select UQSHL/SQSHL with constant i64 shift amount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207399
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 28 Apr 2014 05:57:50 +0000 (05:57 +0000)]
Convert more SelectionDAG functions to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207397
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 28 Apr 2014 04:05:08 +0000 (04:05 +0000)]
[C++] Use 'nullptr'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207394
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Mon, 28 Apr 2014 03:34:48 +0000 (03:34 +0000)]
MC: range-loopify
Use C++11 range-based loops rather than explicit constructors. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207393
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 01:57:46 +0000 (01:57 +0000)]
Use raw_ostream and Format.h on Windows so that we don't have to roll
our own portability system to cope without snprintf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207389
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 01:24:35 +0000 (01:24 +0000)]
Update the Windows TimeValue formatting to match the new formatting on
Unix-like OSes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207388
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Apr 2014 01:24:32 +0000 (01:24 +0000)]
Update tests to use the new format of printing a TimeValue. It's a bit
odd to have the output of 'llvm-ar tv' depend on the format of
TimeValue::str(), but that's what we have today. If anyone needs the
output to remain compatible with GNU ar or old versions of llvm-ar, just
shout and I'll switch the code to manually format its times.
Note that there isn't a portable format -- Mac and GNU have different
formats at least (thanks Rafael!) so...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207387
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 27 Apr 2014 23:59:25 +0000 (23:59 +0000)]
Teach the pass manager's execution dump to print the current time before
each line. This is particularly nice for tracking which run of
a particular pass over a particular function was slow.
This also required making the TimeValue string much more useful. First,
there is a standard format for writing out a date and time. Let's use
that rather than strings that would have to be parsed. Second, actually
output the nanosecond resolution that timevalue claims to have.
This is proving useful working on PR19499, so I figured it would be
generally useful to commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207385
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 27 Apr 2014 23:57:57 +0000 (23:57 +0000)]
CodeGen/AsmPrinter.h: Fix \param in r207369. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207384
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 23:22:43 +0000 (23:22 +0000)]
Convert AddNodeIDNode and SelectionDAG::getNodeIfExiists to use ArrayRef<SDValue>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207383
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 27 Apr 2014 20:23:58 +0000 (20:23 +0000)]
Add emitThumbSet to the arm target streamer.
This fixes the asm printer implementation and lets the parser be unaware of
what .thumb_set is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207381
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:40:43 +0000 (19:40 +0000)]
Fix an assert I accidentally broke to hopefully fix the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207380
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:21:20 +0000 (19:21 +0000)]
Convert SelectionDAGISel::MorphNode to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207379
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:21:16 +0000 (19:21 +0000)]
Convert SelectionDAG::MorphNodeTo to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207378
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:21:11 +0000 (19:21 +0000)]
Convert SelectionDAG::SelectNodeTo to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207377
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:21:06 +0000 (19:21 +0000)]
Convert one last signature of getNode to take an ArrayRef of SDUse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207376
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:21:02 +0000 (19:21 +0000)]
Convert SDNode constructor to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207375
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:20:57 +0000 (19:20 +0000)]
Convert SelectionDAG::getMergeValues to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207374
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 27 Apr 2014 19:20:47 +0000 (19:20 +0000)]
Const-correct SelectionDAG::getAtomic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207373
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sun, 27 Apr 2014 18:50:45 +0000 (18:50 +0000)]
Clarify the doxygen comment for AsmPrinter::EmitDwarfRegOpPiece and add
default arguments to the function.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207372
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 Apr 2014 18:47:54 +0000 (18:47 +0000)]
X86TTI: Adjust sdiv cost now that we can lower it on plain SSE2.
Includes a fix for a horrible typo that caused all SDIV costs to be
slightly off :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207371
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 Apr 2014 18:47:41 +0000 (18:47 +0000)]
X86: If SSE4.1 is missing lower SMUL_LOHI of v4i32 to pmuludq and fix up the high parts.
This is more expensive than pmuldq but still cheaper than scalarizing the whole thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207370
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sun, 27 Apr 2014 18:25:45 +0000 (18:25 +0000)]
Debug info: Refactor EmitDwarfRegOpPiece to be a member function of
AsmPrinter.
No functional change.
http://reviews.llvm.org/D3373
rdar://problem/
15928306
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207369
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sun, 27 Apr 2014 18:25:40 +0000 (18:25 +0000)]
Debug Info: Prepare DebugLocEntry to handle more than a single value per
entry. This is in preparation for generic DW_OP_piece support.
No functional change so far.
http://reviews.llvm.org/D3373
rdar://problem/
15928306
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207368
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 27 Apr 2014 17:23:37 +0000 (17:23 +0000)]
Make getOrCreateSymbolData non virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207367
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 27 Apr 2014 17:10:46 +0000 (17:10 +0000)]
Avoid using MCSymbolData on the asm streamer.
Only the object streamers need to track if a symbol should be marked thumb or
not. This ports the ELF case. The COFF case is not ported since it is currently
not working for some other reason (I will report a bug).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207366
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 27 Apr 2014 16:10:57 +0000 (16:10 +0000)]
MC: duplicate .file test for WoA (SVN r207341)
Since the COFF tests are dependent on X86, duplicate the test for ARM. Use the
default check prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207365
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 Apr 2014 14:54:59 +0000 (14:54 +0000)]
Make helper functions static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207359
91177308-0d34-0410-b5e6-
96231b3b80d8