Tim Northover [Wed, 30 Apr 2014 13:14:03 +0000 (13:14 +0000)]
AArch64/ARM64: use HS instead of CS & LO instead of CC.
On instructions using the NZCV register, a couple of conditions have dual
representations: HS/CS and LO/CC (meaning unsigned-higher-or-same/carry-set and
unsigned-lower/carry-clear). The first of these is more descriptive in most
circumstances, so we should print it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207644
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 30 Apr 2014 12:42:22 +0000 (12:42 +0000)]
Grammar fix.
Thanks to Saleem Abdulrasool for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207643
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Apr 2014 12:09:32 +0000 (12:09 +0000)]
[mips][msa] Fix vector insertions where the index is variable
Summary:
This isn't supported directly so we rotate the vector by the desired number of
elements, insert to element zero, then rotate back.
The i64 case generates rather poor code on MIPS32. There is an obvious
optimisation to be made in future (do both insert.w's inside a shared
rotate/unrotate sequence) but for now it's sufficient to select valid code
instead of aborting.
Depends on D3536
Reviewers: matheusalmeida
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3537
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207640
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 30 Apr 2014 12:00:20 +0000 (12:00 +0000)]
ARM64: accept ELF-relocated load/store insts without a #.
E.g. we print "ldr x0, [x0, :lo12:symbol]" so we need to accept that syntax
too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207639
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 30 Apr 2014 11:43:36 +0000 (11:43 +0000)]
ARM64: remove duplication by templating InstPrinter methods
No functional change, so no tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207638
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 30 Apr 2014 11:28:42 +0000 (11:28 +0000)]
[mips] Add support for .cpload.
Summary:
This directive is used for setting up $gp in the beginning of a function.
It expands to three instructions if PIC is enabled:
lui $gp, %hi(_gp_disp)
addui $gp, $gp, %lo(_gp_disp)
addu $gp, $gp, $reg
_gp_disp is a special symbol that the linker sets to the distance between
the lui instruction and the context pointer (_gp).
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D3480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207637
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 30 Apr 2014 11:21:10 +0000 (11:21 +0000)]
[mips] Emit all three relocation operations for each relocation entry on Mips64 big-endian systems.
Summary:
The N64 ABI allows up to three operations to be specified per relocation record
independently of the endianness.
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D3529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207636
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 30 Apr 2014 11:19:40 +0000 (11:19 +0000)]
ARM64: use hex immediates for movz/movk instructions
Since these are mostly used in "lsl #16", "lsl #32", "lsl #48" combinations to
piece together an immediate in 16-bit chunks, hex is probably the most
appropriate format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207635
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 30 Apr 2014 11:19:28 +0000 (11:19 +0000)]
ARM64: hexify printing various immediate operands
This is mostly aimed at the NEON logical operations and MOVI/MVNI (since they
accept weird shifts which are more naturally understandable in hex notation).
Also changes BRK/HINT etc, which is probably a neutral change, but easier than
the alternative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207634
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 30 Apr 2014 11:19:15 +0000 (11:19 +0000)]
ARM64: print canonical syntax for add/sub (imm) instructions.
Since these instructions only accept a 12-bit immediate, possibly shifted left
by 12, the canonical syntax used by the architecture reference manual is "#N {,
lsl #12 }". We should accept an immediate that has already been shifted, (e.g.
Also, print a comment giving the full addend since it can be helpful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207633
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 30 Apr 2014 10:48:36 +0000 (10:48 +0000)]
[LCG] Add the really, *really* boring edge insertion case: adding an
edge entirely within an existing SCC. Shockingly, making the connected
component more connected is ... a total snooze fest. =]
Anyways, its wired up, and I even added a test case to make sure it
pretty much sorta works. =D
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207631
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 30 Apr 2014 10:29:06 +0000 (10:29 +0000)]
Fix multiline comment warning.
../unittests/Analysis/LazyCallGraphTest.cpp:45:1: warning: multi-line comment [-Wcomment]
// / \
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207629
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 30 Apr 2014 10:15:50 +0000 (10:15 +0000)]
[ARM64] Simplify if condition.
v2f32 and v4f32 were missed out of these conditions, so this is also
a bugfix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207628
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 30 Apr 2014 10:15:46 +0000 (10:15 +0000)]
[ARM64] Fix stupid copy-pasto in ARM64MCAsmInfo.cpp - aarch64_be -> arm64_be
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207627
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 30 Apr 2014 10:15:41 +0000 (10:15 +0000)]
[ARM64] Try and make the ELF MCJIT *slightly* less broken for ARM64.
A bunch of switch cases were missing, not just for ARM64 but also for
AArch64_BE. I've fixed all those, but there's zero testing as
ExecutionEngine tests are disabled when crosscompiling and I don't
have a native platform available to test on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207626
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 30 Apr 2014 10:15:35 +0000 (10:15 +0000)]
[ARM64] Ensure arm64_be is dealt with when emitting debug info.
This is a partial port of r204816 (cpirker "Elf support for MC-JIT
runtime dynamic linker") from AArch64 to ARM64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207625
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 30 Apr 2014 09:33:50 +0000 (09:33 +0000)]
raw_ostream::operator<<(StringRef): Avoid potential overflow in pointer arithmetic.
(OutBufCur + Size) might overflow if Size were large. For example on i686-linux,
OutBufCur: 0xFFFDF27D
OutBufEnd: 0xFFFDF370
Size: 0x0002BF20 (180,000)
It caused flaky error in MC/COFF/section-name-encoding.s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207621
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 30 Apr 2014 09:32:01 +0000 (09:32 +0000)]
ARM64: make sure FastISel uses a GPR64 source in 64-bit extensions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207620
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 30 Apr 2014 07:45:27 +0000 (07:45 +0000)]
[LCG] Actually test the *basic* edge removal bits (IE, the non-SCC
bits), and discover that it's totally broken. Yay tests. Boo bug. Fix
the basic edge removal so that it works by nulling out the removed edges
rather than actually removing them. This leaves the indices valid in the
map from callee to index, and preserves some of the locality for
iterating over edges. The iterator is made bidirectional to reflect that
it now has to skip over null entries, and the skipping logic is layered
onto it.
As future work, I would like to track essentially the "load factor" of
the edge list, and when it falls below a threshold do a compaction.
An alternative I considered (and continue to consider) is storing the
callees in a doubly linked list where each element of the list is in
a set (which is essentially the classical linked-hash-table
datastructure). The problem with that approach is that either you need
to heap allocate the linked list nodes and use pointers to them, or use
a bucket hash table (with even *more* linked list pointer overhead!),
etc. It's pretty easy to get 5x overhead for values that are just
pointers. So far, I think punching holes in the vector, and periodic
compaction is likely to be much more efficient overall in the space/time
tradeoff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207619
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 30 Apr 2014 07:21:01 +0000 (07:21 +0000)]
Add a <tuple> include to more files that aren't getting it transitively on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207617
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 Apr 2014 07:17:30 +0000 (07:17 +0000)]
Use makeArrayRef insted of calling ArrayRef<T> constructor directly. I introduced most of these recently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207616
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 30 Apr 2014 07:05:07 +0000 (07:05 +0000)]
ARM: support stack probe emission for Windows on ARM
This introduces the stack lowering emission of the stack probe function for
Windows on ARM. The stack on Windows on ARM is a dynamically paged stack where
any page allocation which crosses a page boundary of the following guard page
will cause a page fault. This page fault must be handled by the kernel to
ensure that the page is faulted in. If this does not occur and a write access
any memory beyond that, the page fault will go unserviced, resulting in an
abnormal program termination.
The watermark for the stack probe appears to be at 4080 bytes (for
accommodating the stack guard canaries and stack alignment) when SSP is
enabled. Otherwise, the stack probe is emitted on the page size boundary of
4096 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207615
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 30 Apr 2014 06:44:50 +0000 (06:44 +0000)]
ConstantHoisting.cpp: Add <tuple> for std::tie, since r207593 removed FileSystem.h, it includes <tuple>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207614
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 30 Apr 2014 06:14:25 +0000 (06:14 +0000)]
ARM: print COFF function header for Windows on ARM
Emit the COFF header when printing out the function. This is important as the
header contains two important pieces of information: the storage class for the
symbol and the symbol type information. This bit of information is required for
the linker to correctly identify the type of symbol that it is dealing with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207613
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 Apr 2014 05:53:35 +0000 (05:53 +0000)]
[C++11] Use 'nullptr' in tablegen output files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207611
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 Apr 2014 05:53:27 +0000 (05:53 +0000)]
De-virtualize or remove some methods that have no overrides nor override anything. In some cases remove all together if there are no callers either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207610
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 30 Apr 2014 05:12:41 +0000 (05:12 +0000)]
ARM: move llvm_unreachable use
When building with -Werror=covered-switch-default (as on the buildbots), the
build would fail since all cases are covered by the switch. Move the
llvm_unreachable to the end of the function as an annotation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207609
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 30 Apr 2014 04:54:58 +0000 (04:54 +0000)]
ARM: partially handle 32-bit relocations for WoA
IMAGE_REL_ARM_MOV32T relocations require that the movw/movt pair-wise
relocation is not split up and reordered. When expanding the mov32imm
pseudo-instruction, create a bundle if the machine operand is referencing an
address. This helps ensure that the relocatable address load is not reordered
by subsequent passes.
Unfortunately, this only partially handles the case as the Constant Island Pass
occurs after the instructions are unbundled and does not properly handle
bundles. That is a more fundamental issue with the pass itself and beyond the
scope of this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207608
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 30 Apr 2014 03:06:06 +0000 (03:06 +0000)]
Simplify getSymbolOffset.
We can now use EvaluateAsValue to make it non recursive and remove some code
duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207604
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 30 Apr 2014 00:49:32 +0000 (00:49 +0000)]
[ADT] Provide some helpful static_asserts for using operations of the
wrong iterator category. These aren't comprehensive, but they have
caught the common cases for me and produce much nicer errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207601
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 30 Apr 2014 00:09:19 +0000 (00:09 +0000)]
[DWARF parser] Cleanup code in DWARFDebugLine.
Streamline parsing and dumping line tables:
Prefer composition to multiple inheritance in DWARFDebugLine::ParsingState.
Get rid of the weird concept of "DumpingState" structure.
was:
DWARFDebugLine::DumpingState state(OS);
DWARFDebugLine::parseStatementTable(..., state);
now:
DWARFDebugLine::LineTable LineTable;
LineTable.parse(...);
LineTable.dump(OS);
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207599
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 29 Apr 2014 23:55:41 +0000 (23:55 +0000)]
Implement X86 code generation for musttail
Currently, musttail codegen is relying on sibcall optimization, and
reporting a fatal error if fails. Sibcall optimization fails when stack
arguments need to be modified, which is insufficient for musttail.
The logic for moving arguments in memory safely is already implemented
for GuaranteedTailCallOpt. This change merely arranges for musttail
calls to use it.
No functional change for GuaranteedTailCallOpt.
Reviewers: espindola
Differential Revision: http://reviews.llvm.org/D3493
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207598
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 29 Apr 2014 23:54:52 +0000 (23:54 +0000)]
Fix the build with MSVC 2013 by explicitly requesting llvm::make_unique
MSVC 2013 provides std::make_unique, which it finds with ADL when one of
the parameters is std::unique_ptr, leading to an ambiguous overload.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207597
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 Apr 2014 23:46:48 +0000 (23:46 +0000)]
Another missing include for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207596
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 29 Apr 2014 23:43:06 +0000 (23:43 +0000)]
Fix some 80 cols violations committed in r207539
Caught by Eric Christopher in post-commit review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207595
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 Apr 2014 23:37:02 +0000 (23:37 +0000)]
Try to fix the msvc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207594
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 Apr 2014 23:26:49 +0000 (23:26 +0000)]
raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207593
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:55 +0000 (23:12 +0000)]
R600: Remove duplicate setting of SELECT expansion.
It's already set in AMDGPUISelLowering for all GPUs
Patch By: Jan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207592
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:53 +0000 (23:12 +0000)]
R600/SI: Custom lower SI_IF and SI_ELSE to avoid machine verifier errors
SI_IF and SI_ELSE are terminators which also produce a value. For
these instructions ISel always inserts a COPY to move their value
to another basic block. This COPY ends up between SI_(IF|ELSE)
and the S_BRANCH* instruction at the end of the block.
This breaks MachineBasicBlock::getFirstTerminator() and also the
machine verifier which assumes that terminators are grouped together at
the end of blocks.
To solve this we coalesce the copy away right after ISel to make sure
there are no instructions in between terminators at the end of blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207591
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:48 +0000 (23:12 +0000)]
R600/SI: Only select SALU instructions in the entry or exit block
SALU instructions ignore control flow, so it is not always safe to use
them within branches. This is a partial solution to this problem
until we can come up with something better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207590
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:46 +0000 (23:12 +0000)]
R600: optimize the UDIVREM 64 algorithm
This is a squash of several optimization commits:
- calculate DIV_Lo and DIV_Hi separately
- use BFE_U32 if we are operating on 32bit values
- use precomputed constants instead of shifting in UDVIREM
- skip the first 32 iterations of udivrem
v2: Check whether BFE is supported before using it
Patch by: Jan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207589
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:45 +0000 (23:12 +0000)]
R600: Implement iterative algorithm for udivrem
Initial implementation, rather slow
Patch by: Jan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207588
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:43 +0000 (23:12 +0000)]
R600: Change UDIV/UREM to UDIVREM when legalizing types
When legalizing ops, with UDIV/UREM set to expand, they automatically
expand to UDIVREM (if legal or custom).
We need to do this manually for legalize types.
v2:
SI should be set to Expand because the type is legal, and it is
automatically lowered to UDIVREM if UDIVREM is Legal/Custom
R600 should set to UDIV/UREM to Custom because it needs to lower them
during type legalization
Patch by: Jan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207587
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Apr 2014 23:12:38 +0000 (23:12 +0000)]
R600: remove unused variable
Patch by: Jan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207586
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 29 Apr 2014 22:41:58 +0000 (22:41 +0000)]
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207585
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 29 Apr 2014 22:41:55 +0000 (22:41 +0000)]
Spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207584
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 29 Apr 2014 22:41:50 +0000 (22:41 +0000)]
Tidy up whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207583
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Apr 2014 22:20:40 +0000 (22:20 +0000)]
Also handle ConstantAggregateZero when optimizing vpermilvar*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207582
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 29 Apr 2014 22:04:55 +0000 (22:04 +0000)]
Fix MSVC build broken by r207580
Seems MSVC wants to be able to codegen inline-definitions of virtual
functions even in TUs that don't define the key function - and it's well
within its rights to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207581
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 29 Apr 2014 21:52:46 +0000 (21:52 +0000)]
PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile
This starts in MCJIT::getSymbolAddress where the
unique_ptr<object::Binary> is release()d and (after a cast) passed to a
single caller, MCJIT::addObjectFile.
addObjectFile calls RuntimeDyld::loadObject.
RuntimeDld::loadObject calls RuntimeDyldELF::createObjectFromFile
And the pointer is never owned at this point. I say this point, because
the alternative codepath, RuntimeDyldMachO::createObjectFile certainly
does take ownership, so this seemed like a good hint that this was a/the
right place to take ownership.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207580
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 29 Apr 2014 21:28:13 +0000 (21:28 +0000)]
[DWARF parser] Cleanup code in DWARFDebugLine.
Move several function definitions into .cpp, unify constructors
and clear() methods (fixing a couple of latent bugs from copy-paste),
turn static function parsePrologue() into Prologue::parse().
More work needed here to untangle weird multiple inheritance
in table parsing and dumping.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207579
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Apr 2014 21:02:37 +0000 (21:02 +0000)]
Remove tabs.
Sorry, new machine and I forgot to change the editor setting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207578
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Apr 2014 20:41:54 +0000 (20:41 +0000)]
Two fixes to the vpermilvar optimization.
The instcomine logic to handle vpermilvar's pd and 256 variants was incorrect.
The _256 variants have indexes into the individual 128 bit lanes and in all
cases it also has to mask out unused bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207577
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 29 Apr 2014 20:17:28 +0000 (20:17 +0000)]
[Windows] Fix assertion failure when passing 'nul' in input to clang.
Before this patch, if 'nul' was passed in input to clang, function
getStatus() (in Path.inc) always returned an instance of file_status with
field 'nFileSizeHigh' and 'nFileSizeLow' left uninitialized.
This was causing the triggering of an assertion failure in MemoryBuffer.cpp due
to an invalid FileSize for device 'nul'.
This patch fixes the assertion failure modifying the constructors of class
file_status (in llvm/Support/FileSystem.h) so that every field of the class
gets initialized to zero by default.
A clang test will be submitted on a separate patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207575
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 29 Apr 2014 20:06:10 +0000 (20:06 +0000)]
Fix vectorization remarks.
This patch changes the vectorization remarks to also inform when
vectorization is possible but not beneficial.
Added tests to exercise some loop remarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207574
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Tue, 29 Apr 2014 19:37:20 +0000 (19:37 +0000)]
Continue slp vectorization even the BB already has vectorized store radar://
16641956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207572
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Tue, 29 Apr 2014 19:35:39 +0000 (19:35 +0000)]
Add slp vectorization to LTO passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207571
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 29 Apr 2014 18:25:28 +0000 (18:25 +0000)]
Reapply r207271 without the testcase
PR19608 was filed to find a suitable testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207569
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 29 Apr 2014 17:57:50 +0000 (17:57 +0000)]
Add Simple return instruction to Mips fast-isel
Reviewers: dsanders
Reviewed by: dsanders
Differential Revision: http://reviews.llvm.org/D3430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207565
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 29 Apr 2014 17:12:42 +0000 (17:12 +0000)]
[DWARF parser] Compress DIEMinimal even further, simplify building DIE tree.
DIE doesn't need to store a pointer to its parent: we can traverse the DIE tree
only with functions getFirstChild() and getSibling(). Parents must be known
only when we construct the tree. Rewrite setDIERelations() procedure in a more
straightforward way, and get rid of lots of now unused DIEMinimal methods.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207563
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 17:07:45 +0000 (17:07 +0000)]
SupportTest: Fix test names harder
r207552, r207553 and r207554 all had bad test names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207560
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 17:07:42 +0000 (17:07 +0000)]
BranchProb: Simplify printing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207559
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 29 Apr 2014 17:04:30 +0000 (17:04 +0000)]
[mips] Remove two more redundant 'let Predicates = [HasStdEnc]' statements that were missed
Summary:
The InstSE class already initializes Predicates to [HasStdEnc].
No functional change (confirmed by diffing tablegen-erated files before and
after)
Differential Revision: http://reviews.llvm.org/D3548
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207558
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:47:39 +0000 (16:47 +0000)]
Support: Remove out-of-date comments
The code is now shared... no need for a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207555
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:44:59 +0000 (16:44 +0000)]
Support: More BlockFrequencyTest => BranchProbabilityTest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207554
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:44:56 +0000 (16:44 +0000)]
Support: Fix test name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207553
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:40:17 +0000 (16:40 +0000)]
Support: BlockFrequencyTest => BranchProbabilityTest
Move a detailed test of `BranchProbability::scale()` from
`BlockFrequencyTest` over to `BranchProbabilityTest`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207552
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 29 Apr 2014 16:37:01 +0000 (16:37 +0000)]
[mips] Remove more redundant 'let Predicates = [HasStdEnc]' statements
Summary:
The InstSE class already initializes Predicates to [HasStdEnc].
No functional change (confirmed by diffing tablegen-erated files before and
after)
Differential Revision: http://reviews.llvm.org/D3547
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207551
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:31:29 +0000 (16:31 +0000)]
blockfreq: Defer to BranchProbability::scale() (again)
Change `BlockFrequency` to defer to `BranchProbability::scale()` and
`BranchProbability::scaleByInverse()`.
This removes `BlockFrequency::scale()` from its API (and drops the
ability to see the remainder), but the only user was the unit tests. If
some code in the future needs an API that exposes the remainder, we can
add something to `BranchProbability`, but I find that unlikely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207550
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 29 Apr 2014 16:24:10 +0000 (16:24 +0000)]
[mips] Remove redundant 'let Predicates = [HasStdEnc]' statements
Summary:
The MipsPat class already initializes Predicates to [HasStdEnc].
No functional change (confirmed by diffing tablegen-erated files before and
after)
Differential Revision: http://reviews.llvm.org/D3546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207548
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:20:05 +0000 (16:20 +0000)]
blockfreq: Defer to BranchProbability::scale()
`BlockMass` can now defer to `BranchProbability::scale()`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207547
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:20:01 +0000 (16:20 +0000)]
blockfreq: Remove BlockMass*BlockMass
Since `BlockMass` is an implementation detail and there are no current
users of this, delete `BlockMass::operator*=(BlockMass)`. I might need
this when I try to strip out `UnsignedFloat`, but I can pull it back in
at that point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207546
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:15:39 +0000 (16:15 +0000)]
Support: remove unnecessary namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207545
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:15:35 +0000 (16:15 +0000)]
Support: Add BranchProbability::scale() and ::scaleByInverse()
Add API to `BranchProbability` for scaling big integers. Next job is to
rip the logic out of `BlockMass` and `BlockFrequency`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207544
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 29 Apr 2014 16:13:27 +0000 (16:13 +0000)]
Document recently added sphinx documentation options in
CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207543
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:12:16 +0000 (16:12 +0000)]
Support: Simplify BranchProbability operators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207541
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:12:13 +0000 (16:12 +0000)]
Support: Add unit tests for BranchProbability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207540
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 29 Apr 2014 15:58:35 +0000 (15:58 +0000)]
DwarfDebug: Split the initialization of abstract and non-abstract subprogram DIEs.
These were called from distinct places and had significant distinct
behavior. No need to make that a dynamic check inside the function
rather than just having two functions (refactoring some common code into
a helper function to be called from the two separate functions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207539
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Apr 2014 15:52:46 +0000 (15:52 +0000)]
LinkModulesTest.cpp: Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207537
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Apr 2014 15:52:36 +0000 (15:52 +0000)]
[CMake] Enable llvm/unittests/LinkerTests. It had not been enabled since r199354.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207536
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Apr 2014 15:52:27 +0000 (15:52 +0000)]
LinkModulesTest.cpp: Use test-specific Ctx instead of getGlobalContext(). The global context might not be free'd. [vg_leak]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207535
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Tue, 29 Apr 2014 15:02:40 +0000 (15:02 +0000)]
[ARM64] Disable regression tests for the old JIT.
Since the ARM64 backend doesn't implement support for the old JIT those tests are failing when the regression tests are run on an AArch64 host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207530
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 29 Apr 2014 14:28:58 +0000 (14:28 +0000)]
[mips][msa] Use CHECK-LABEL in basic_operations*.ll
Differential Revision: http://reviews.llvm.org/D3536
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207529
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 29 Apr 2014 14:27:31 +0000 (14:27 +0000)]
Add optimization remarks to the loop unroller and vectorizer.
Summary:
This calls emitOptimizationRemark from the loop unroller and vectorizer
at the point where they make a positive transformation. For the
vectorizer, it reports vectorization and interleave factors. For the
loop unroller, it reports all the different supported types of
unrolling.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207528
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 29 Apr 2014 13:42:02 +0000 (13:42 +0000)]
Parse and create GOT_PREL relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207526
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 29 Apr 2014 13:31:37 +0000 (13:31 +0000)]
[mips][msa] Fix element extraction where the index is variable.
Summary:
This isn't supported directly so we splat the vector element and extract
the most convenient copy.
Reviewers: matheusalmeida
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3530
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207524
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 29 Apr 2014 13:21:05 +0000 (13:21 +0000)]
Updated the link to the correct URL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207523
91177308-0d34-0410-b5e6-
96231b3b80d8
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