oota-llvm.git
9 years agoR600: Fix always inline pass breaking noinline functions
Matt Arsenault [Wed, 22 Apr 2015 17:10:44 +0000 (17:10 +0000)]
R600: Fix always inline pass breaking noinline functions

No test since calls are not actually supported yet.

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

9 years agoRecommit r235219, it's need for out-of-tree users of AlignOf.h.
Yaron Keren [Wed, 22 Apr 2015 16:43:56 +0000 (16:43 +0000)]
Recommit r235219, it's need for out-of-tree users of AlignOf.h.

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

9 years ago[Hexagon] Overhaul of stack object allocation
Krzysztof Parzyszek [Wed, 22 Apr 2015 16:43:53 +0000 (16:43 +0000)]
[Hexagon] Overhaul of stack object allocation

- Use static allocation for aligned stack objects.
- Simplify dynamic stack object allocation.
- Simplify elimination of frame-indices.

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

9 years ago[opaque pointer type] Use pointee type retrieved from asm, rather than accessing...
David Blaikie [Wed, 22 Apr 2015 16:37:35 +0000 (16:37 +0000)]
[opaque pointer type] Use pointee type retrieved from asm, rather than accessing it via the pointer type

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

9 years ago[cmake] Quote the path to the target exports file, fixes PR23313
Reid Kleckner [Wed, 22 Apr 2015 16:23:00 +0000 (16:23 +0000)]
[cmake] Quote the path to the target exports file, fixes PR23313

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

9 years ago[x86] Add store-folded memop patterns for vcvtps2ph
Sanjay Patel [Wed, 22 Apr 2015 16:11:19 +0000 (16:11 +0000)]
[x86] Add store-folded memop patterns for vcvtps2ph

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

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

9 years ago[Hexagon] Treat CFI as solo instructions
Krzysztof Parzyszek [Wed, 22 Apr 2015 15:47:35 +0000 (15:47 +0000)]
[Hexagon] Treat CFI as solo instructions

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

9 years ago[Hexagon] Implement HexagonInstPrinter::printRegName
Krzysztof Parzyszek [Wed, 22 Apr 2015 15:38:17 +0000 (15:38 +0000)]
[Hexagon] Implement HexagonInstPrinter::printRegName

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

9 years agoSupport arm32 R_ARM_V4BX relocation format
Adhemerval Zanella [Wed, 22 Apr 2015 15:26:43 +0000 (15:26 +0000)]
Support arm32 R_ARM_V4BX relocation format

ARM32 ELF R_ARM_V4BX relocation format is a special relocation type
that records the location of an ARMv4t BX instruction to enable a
static linker to generate ARMv4 compatible instructions.  This
relocation does not contain a reference symbol.

This patch enabled its creation by removing the requeriment of a
relocation symbol target in ELFState<ELFT>::writeSectionContent.

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

9 years agoFix a type mismatch assert in SCEV division
Brendon Cahoon [Wed, 22 Apr 2015 15:06:40 +0000 (15:06 +0000)]
Fix a type mismatch assert in SCEV division

An assert was triggered when attempting to create a new SCEV
with operands of different types in the visitAddRecExpr. In this
test case, the operand types of the numerator and denominator
are different. The SCEV division code should generate a
conservative answer when this happens.

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

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

9 years ago[X86][AVX] Fix failure due to a missing ISel pattern to select VBROADCAST nodes ...
Andrea Di Biagio [Wed, 22 Apr 2015 14:53:39 +0000 (14:53 +0000)]
[X86][AVX] Fix failure due to a missing ISel pattern to select VBROADCAST nodes (PR23259).

This fixes a regression introduced at revision 218263.

On AVX, if we optimize for size, a splat build_vector of a load
is lowered into a VBROADCAST node. This is done even if the value type of the
splat build_vector node is v2i64.

Since AVX doesn't support v2f64/v2i64 broadcasts, revision 218263 added two
extra tablegen patterns to allow selecting a VMOVDDUPrm from an X86VBroadcast
where the scalar element comes from a loadi64/loadf64.

However, revision 218263 forgot to add an extra fallback pattern for the case
where we have a X86VBroadcast of a loadi64 with multiple uses.

This patch adds the missing tablegen pattern in X86InstrSSE.td.
This patch also adds an extra test to 'splat-for-size.ll' to verify that ISel
doesn't crash with a 'fatal error in the backend' due to a missing AVX pattern
to select v2i64 X86ISD::BROADCAST nodes.

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

9 years agoFixed logic to enable complex FMA formation.
Olivier Sallenave [Wed, 22 Apr 2015 14:07:26 +0000 (14:07 +0000)]
Fixed logic to enable complex FMA formation.

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

9 years ago[mips][microMIPSr6] Implement mips32 to microMIPSr6 mapping support
Zoran Jovanovic [Wed, 22 Apr 2015 13:27:34 +0000 (13:27 +0000)]
[mips][microMIPSr6] Implement mips32 to microMIPSr6 mapping support
Differential Revision: http://reviews.llvm.org/D8661

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

9 years ago[DAGCombine] Disable select(c, load,load) for indexed loads
Hal Finkel [Wed, 22 Apr 2015 11:32:25 +0000 (11:32 +0000)]
[DAGCombine] Disable select(c, load,load) for indexed loads

This turned up after r235333, but was a pre-existing bug. The optimization
which transforms select(c, load, load) into a load of a select of the addresses
does not handle indexed loads (pre/post inc/dec). However, it did not check for
them either, leading to a crash if it tried to transform one of them.

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

9 years agoRevert "[mips][FastISel] Implement shift ops for Mips fast-isel."
Vasileios Kalintiris [Wed, 22 Apr 2015 10:08:46 +0000 (10:08 +0000)]
Revert "[mips][FastISel] Implement shift ops for Mips fast-isel."

This reverts commit r235194. It was causing a failure in FastISel buildbots
due to sign-extension issues.

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

9 years ago[AArch64] Disable complex GEP optimization by default.
James Molloy [Wed, 22 Apr 2015 09:11:38 +0000 (09:11 +0000)]
[AArch64] Disable complex GEP optimization by default.

Enough concerns were raised that this optimization is pessimising some code patterns.

The obvious fix, to add a Reassociate run afterwards, causes even more pessimisation in some cases due to fewer complex addressing modes being matched. As there isn't a trivial fix for this, backing this out by default until someone gets a chance to fix the addressing mode matcher.

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

9 years agoHave more strict type checks when creating BinOp nodes in BitcodeReader
Filipe Cabecinhas [Wed, 22 Apr 2015 09:06:21 +0000 (09:06 +0000)]
Have more strict type checks when creating BinOp nodes in BitcodeReader

Summary: Bug found with AFL.

Reviewers: rafael, bkramer

Subscribers: llvm-commits

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

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

9 years ago[patchpoint] Add support for symbolic patchpoint targets to SelectionDAG and the
Lang Hames [Wed, 22 Apr 2015 06:02:31 +0000 (06:02 +0000)]
[patchpoint] Add support for symbolic patchpoint targets to SelectionDAG and the
X86 backend.

The code generated for symbolic targets is identical to the code generated for
constant targets, except that a relocation is emitted to fix up the actual
target address at link-time. This allows IR and object files containing
patchpoints to be cached across JIT-invocations where the target address may
change.

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

9 years ago[TableGen] Use range based for loops.
Craig Topper [Wed, 22 Apr 2015 05:27:47 +0000 (05:27 +0000)]
[TableGen] Use range based for loops.

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

9 years ago[TableGen] Remove some deletes that violate ownership semantics. These don't seem...
Craig Topper [Wed, 22 Apr 2015 05:27:11 +0000 (05:27 +0000)]
[TableGen] Remove some deletes that violate ownership semantics. These don't seem to execute in our codebase today and date back to a time when there was an allocation in this function.

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

9 years agoRevert r235219, it's not needed after r235450.
Yaron Keren [Wed, 22 Apr 2015 05:06:57 +0000 (05:06 +0000)]
Revert r235219, it's not needed after r235450.

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

9 years agoReplace std::auto_ptr with std::unique_ptr
David Blaikie [Wed, 22 Apr 2015 04:39:13 +0000 (04:39 +0000)]
Replace std::auto_ptr with std::unique_ptr

std::auto_ptr is deprecated in GCC 5.0, and we are already using
std::unique_ptr all over the place.

Patch by Xan López.

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

9 years agoFix up Exception demo from recent opaque pointer type changes to GEP
David Blaikie [Wed, 22 Apr 2015 04:24:43 +0000 (04:24 +0000)]
Fix up Exception demo from recent opaque pointer type changes to GEP

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

9 years ago[TableGen] Make BitRecTy::baseClassOf return true when RHS is an IntRecTy.
Craig Topper [Wed, 22 Apr 2015 04:18:32 +0000 (04:18 +0000)]
[TableGen] Make BitRecTy::baseClassOf return true when RHS is an IntRecTy.

Previously the code was accidentally checking if 'this' was an IntRecTy which it can't be since 'this' is a BitRecTy. Looking back at the history it appears it was intended to check RHS.

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

9 years agoDon't use 'nullptr' in comment. Just use 'null'.
Craig Topper [Wed, 22 Apr 2015 04:18:27 +0000 (04:18 +0000)]
Don't use 'nullptr' in comment. Just use 'null'.

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

9 years ago[opaque pointer types] Serialize the value type for atomic store instructions
David Blaikie [Wed, 22 Apr 2015 04:14:46 +0000 (04:14 +0000)]
[opaque pointer types] Serialize the value type for atomic store instructions

Without pointee types the space optimization of storing only the pointer
type and not the value type won't be viable - so add the extra type
information that would be missing.

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

9 years ago[opaque pointer types] Serialize the value type for store instructions
David Blaikie [Wed, 22 Apr 2015 04:14:42 +0000 (04:14 +0000)]
[opaque pointer types] Serialize the value type for store instructions

Without pointee types the space optimization of storing only the pointer
type and not the value type won't be viable - so add the extra type
information that would be missing.

Storeatomic coming soon.

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

9 years agoLinker: Add flag to override linkage rules
Duncan P. N. Exon Smith [Wed, 22 Apr 2015 04:11:00 +0000 (04:11 +0000)]
Linker: Add flag to override linkage rules

Add a flag to lib/Linker (and `llvm-link`) to override linkage rules.
When set, the functions in the source module *always* replace those in
the destination module.

The `llvm-link` option is `-override=abc.ll`.  All the "regular" modules
are loaded and linked first, followed by the `-override` modules.  This
is useful for debugging workflows where some subset of the module (e.g.,
a single function) is extracted into a separate file where it's
optimized differently, before being merged back in.

Patch by Luqman Aden!

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

9 years agollvm-link: Factor out loop over input files, NFC
Duncan P. N. Exon Smith [Wed, 22 Apr 2015 04:08:22 +0000 (04:08 +0000)]
llvm-link: Factor out loop over input files, NFC

Factor the loop for linking input files together into a combined module
into a separate function.  This is in preparation for an upcoming patch
that runs the logic twice.

Patch by Luqman Aden!

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

9 years agoRevert "[TableGen] Use cast instead of dyn_cast where result isn't checked before...
Craig Topper [Wed, 22 Apr 2015 02:59:06 +0000 (02:59 +0000)]
Revert "[TableGen] Use cast instead of dyn_cast where result isn't checked before being dereferenced."

Turns out I misread the parentheses. Though I'm pretty sure its always a RecordRecTy and non of the callers really seem to expect null. But until I'm completely sure I'm going to revert this.

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

9 years agoFix stale comment that mentioned 0 instead of nullptr. NFC.
Craig Topper [Wed, 22 Apr 2015 02:59:03 +0000 (02:59 +0000)]
Fix stale comment that mentioned 0 instead of nullptr. NFC.

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

9 years ago[TableGen] Remove Pool helper class and just use unique_ptr in the maps.
Craig Topper [Wed, 22 Apr 2015 02:20:44 +0000 (02:20 +0000)]
[TableGen] Remove Pool helper class and just use unique_ptr in the maps.

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

9 years ago[TableGen] Use StringRecTy::get() instead of allocating (and leaking) a StringRecTy...
Craig Topper [Wed, 22 Apr 2015 02:09:47 +0000 (02:09 +0000)]
[TableGen] Use StringRecTy::get() instead of allocating (and leaking) a StringRecTy object.

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

9 years ago[TableGen] Use 'isa' to identify UnsetInits rather than comparing with the singleton...
Craig Topper [Wed, 22 Apr 2015 02:09:45 +0000 (02:09 +0000)]
[TableGen] Use 'isa' to identify UnsetInits rather than comparing with the singleton object created by UnsetInit::get(). Makes it more consistent with the other types.

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

9 years ago[TableGen] Use cast instead of dyn_cast where result isn't checked before being deref...
Craig Topper [Wed, 22 Apr 2015 02:09:42 +0000 (02:09 +0000)]
[TableGen] Use cast instead of dyn_cast where result isn't checked before being dereferenced.

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

9 years agoCleanup formatting for consistency with surrounding code.
Craig Topper [Wed, 22 Apr 2015 02:09:39 +0000 (02:09 +0000)]
Cleanup formatting for consistency with surrounding code.

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

9 years ago[x86] allow 64-bit extracted vector element integer stores on a 32-bit system
Sanjay Patel [Wed, 22 Apr 2015 00:24:30 +0000 (00:24 +0000)]
[x86] allow 64-bit extracted vector element integer stores on a 32-bit system

With SSE2, we can generate a 'movq' or other 64-bit store op on a 32-bit system
even though 64-bit integers are not legal types.

So instead of producing this:

  pshufd $229, %xmm0, %xmm1      ## xmm1 = xmm0[1,1,2,3]
  movd %xmm0, (%eax)
  movd %xmm1, 4(%eax)

We can do:

  movq %xmm0, (%eax)

This is a fix for the problem noted in D7296.

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

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

9 years ago[WinEH] Correctly handle inlined __finally blocks with captures
Reid Kleckner [Wed, 22 Apr 2015 00:07:52 +0000 (00:07 +0000)]
[WinEH] Correctly handle inlined __finally blocks with captures

We should also teach the inliner to collapse framerecover of
frameaddress of the current frame down to an alloca, but that can happen
later.

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

9 years ago[opaque pointer type] Avoid using PointerType::getElementType for a few cases of...
David Blaikie [Tue, 21 Apr 2015 23:26:57 +0000 (23:26 +0000)]
[opaque pointer type] Avoid using PointerType::getElementType for a few cases of CallInst

Calls to llvm::Value::mutateType are becoming extra-sensitive now that
instructions have extra type information that will not be derived from
operands or result type (alloca, gep, load, call/invoke, etc... ). The
special-handling for mutateType will get more complicated as this work
continues - it might be worth making mutateType virtual & pushing the
complexity down into the classes that need special handling. But with
only two significant uses of mutateType (vectorization and linking) this
seems OK for now.

Totally open to ideas/suggestions/improvements, of course.

With this, and a bunch of exceptions, we can roundtrip an indirect call
site through bitcode and IR. (a direct call site is actually trickier...
I haven't figured out how to deal with the IR deserializer's lazy
construction of Function/GlobalVariable decl's based on the type of the
entity which means looking through the "pointer to T" type referring to
the global)

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

9 years agoRemove a zero-length file of llvm/test/Transforms/InstCombine/descale-zero.ll.
NAKAMURA Takumi [Tue, 21 Apr 2015 23:14:33 +0000 (23:14 +0000)]
Remove a zero-length file of llvm/test/Transforms/InstCombine/descale-zero.ll.

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

9 years agoLimiting gep merging to fix the performance problem described in
Wei Mi [Tue, 21 Apr 2015 23:02:15 +0000 (23:02 +0000)]
Limiting gep merging to fix the performance problem described in
https://llvm.org/bugs/show_bug.cgi?id=23163.

Gep merging sometimes behaves like a reverse CSE/LICM optimization,
which has negative impact on performance. In this patch we restrict
gep merging to happen only when the indexes to be merged are both consts,
which ensures such merge is always beneficial.

The patch makes gep merging only happen in very restrictive cases.
It is possible that some analysis/optimization passes rely on the merged
geps to get better result, and we havn't notice them yet. We will be ready
to further improve it once we see the cases.

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

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

9 years agoRevert r235451 since it is attached to a wrong Differential Revision. Sorry.
Wei Mi [Tue, 21 Apr 2015 22:56:09 +0000 (22:56 +0000)]
Revert r235451 since it is attached to a wrong Differential Revision. Sorry.

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

9 years agoLimiting gep merging to fix the performance problem described in
Wei Mi [Tue, 21 Apr 2015 22:37:09 +0000 (22:37 +0000)]
Limiting gep merging to fix the performance problem described in
https://llvm.org/bugs/show_bug.cgi?id=23163.

Gep merging sometimes behaves like a reverse CSE/LICM optimizations,
which has negative impact on performance. In this patch we restrict
gep merging to happen only when the indexes to be merged are both consts,
which ensures such merge is always beneficial.

The patch makes gep merging only happen in very restrictive cases.
It is possible that some analysis/optimization passes rely on the merged
geps to get better result, and we havn't notice them yet. We will be ready
to further improve it once we see the cases.

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

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

9 years agoSilence MSVC build alignment warnings
Andrew Kaylor [Tue, 21 Apr 2015 22:29:38 +0000 (22:29 +0000)]
Silence MSVC build alignment warnings

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

9 years ago[MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy.
Ahmed Bougacha [Tue, 21 Apr 2015 21:28:33 +0000 (21:28 +0000)]
[MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy.

MemIntrinsic::getDest() looks through pointer casts, and using it
directly when building the new GEP+memset results in stuff like:

  %0 = getelementptr i64* %p, i32 16
  %1 = bitcast i64* %0 to i8*
  call ..memset(i8* %1, ...)

instead of the correct:

  %0 = bitcast i64* %p to i8*
  %1 = getelementptr i8* %0, i32 16
  call ..memset(i8* %1, ...)

Instead, use getRawDest, which just gives you the i8* value.
While there, use the memcpy's dest, as it's live anyway.

In most cases, when the optimization triggers, the memset and memcpy
sizes are the same, so the built memset is 0-sized and eliminated.
The problem occurs when they're different.

Fixes a regression caused by r235232: PR23300.

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

9 years ago[Hexagon] Patterns for frame index with offset for isel
Krzysztof Parzyszek [Tue, 21 Apr 2015 21:28:03 +0000 (21:28 +0000)]
[Hexagon] Patterns for frame index with offset for isel

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

9 years agoUpdate comment. NFC.
Lang Hames [Tue, 21 Apr 2015 21:15:35 +0000 (21:15 +0000)]
Update comment. NFC.

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

9 years agoRevamp PredIteratorCache interface to be cleaner.
Daniel Berlin [Tue, 21 Apr 2015 21:11:50 +0000 (21:11 +0000)]
Revamp PredIteratorCache interface to be cleaner.

Summary:
This lets us use range based for loops.

Reviewers: chandlerc

Subscribers: llvm-commits

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

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

9 years ago[NVPTX] do not run DCE after SLSR and SeparateConstOffsetFromGEP
Jingyue Wu [Tue, 21 Apr 2015 20:47:15 +0000 (20:47 +0000)]
[NVPTX] do not run DCE after SLSR and SeparateConstOffsetFromGEP

Summary:
With D9096 and D9101, there's no need to run DCE after SLSR and
SeparateConstOffsetFromGEP.

Test Plan: no regression

Reviewers: jholewinski, meheff

Subscribers: jholewinski, llvm-commits

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

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

9 years ago[LSR][NFC] Remove a stale comment.
Sanjoy Das [Tue, 21 Apr 2015 20:42:50 +0000 (20:42 +0000)]
[LSR][NFC] Remove a stale comment.

The comment was made stale in r171735.

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

9 years agoDebugInfo: Remove DIArray and DITypeArray typedefs
Duncan P. N. Exon Smith [Tue, 21 Apr 2015 20:07:38 +0000 (20:07 +0000)]
DebugInfo: Remove DIArray and DITypeArray typedefs

Remove the `DIArray` and `DITypeArray` typedefs, preferring the
underlying types (`DebugNodeArray` and `MDTypeRefArray`, respectively).

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

9 years ago[SLSR] garbage-collect unused instructions
Jingyue Wu [Tue, 21 Apr 2015 19:56:18 +0000 (19:56 +0000)]
[SLSR] garbage-collect unused instructions

Summary:
After we rewrite a candidate, the instructions used by the old form may
become unused. This patch cleans up these unused instructions so that we
needn't run DCE after SLSR.

Test Plan: removed -dce in all the SLSR tests

Reviewers: broune, meheff

Subscribers: llvm-commits

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

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

9 years ago[SeparateConstOffsetFromGEP] garbage-collect intermediate instructions
Jingyue Wu [Tue, 21 Apr 2015 19:53:18 +0000 (19:53 +0000)]
[SeparateConstOffsetFromGEP] garbage-collect intermediate instructions

Summary: so that we needn't run DCE after this pass.

Test Plan: removed -dce from the commandline in split-gep.ll and split-gep-and-gvn.ll

Reviewers: meheff

Subscribers: llvm-commits, HaoLiu, hfinkel, jholewinski

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

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

9 years agoRemove FilesToRemove->push_back(Filename) from sys::DontRemoveFileOnSignal.
Yaron Keren [Tue, 21 Apr 2015 19:25:11 +0000 (19:25 +0000)]
Remove FilesToRemove->push_back(Filename) from sys::DontRemoveFileOnSignal.

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

9 years agoDebugInfo: Use MDType in DITypeIdentifierMap
Duncan P. N. Exon Smith [Tue, 21 Apr 2015 19:17:20 +0000 (19:17 +0000)]
DebugInfo: Use MDType in DITypeIdentifierMap

Use `MDType*` instead of `MDNode*` in `DITypeIdentifierMap`, since all
the members should be types.

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

9 years agoMove IDF Calculation to a separate file, expose an interface to it.
Daniel Berlin [Tue, 21 Apr 2015 19:13:02 +0000 (19:13 +0000)]
Move IDF Calculation to a separate file, expose an interface to it.

Summary:
MemorySSA uses this algorithm as well, and this enables us to reuse the code in both places.

There are no actual algorithm or datastructure changes in here, just code movement.

Reviewers: qcolombet, chandlerc

Subscribers: llvm-commits

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

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

9 years agoDebugInfo: Prune unnecessary forward declarations
Duncan P. N. Exon Smith [Tue, 21 Apr 2015 19:00:26 +0000 (19:00 +0000)]
DebugInfo: Prune unnecessary forward declarations

Probably these forward declarations were once useful, but they certainly
don't belong here now.

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

9 years agoDebugInfo: Drop rest of DIDescriptor subclasses
Duncan P. N. Exon Smith [Tue, 21 Apr 2015 18:44:06 +0000 (18:44 +0000)]
DebugInfo: Drop rest of DIDescriptor subclasses

Delete the remaining subclasses of (the already deleted) `DIDescriptor`.
Part of PR23080.

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

9 years agoDebugInfo: Assert dbg.declare/value insts are valid
Duncan P. N. Exon Smith [Tue, 21 Apr 2015 18:24:23 +0000 (18:24 +0000)]
DebugInfo: Assert dbg.declare/value insts are valid

Remove early returns for when `getVariable()` is null, and just assert
that it never happens.  The Verifier already confirms that there's a
valid variable on these intrinsics, so we should assume the debug info
isn't broken.  I also updated a check for a `!dbg` attachment, which the
Verifier similarly guarantees.

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

9 years agoRe-land r235154-r235156 under the existing -sehprepare flag
Reid Kleckner [Tue, 21 Apr 2015 18:23:57 +0000 (18:23 +0000)]
Re-land r235154-r235156 under the existing -sehprepare flag

Keep the old SEH fan-in lowering on by default for now, since projects
rely on it.  This will make it easy to test this change with a simple
flag flip.

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

9 years agoX86: Match for X86ISD nodes in LowerBUILD_VECTOR instead of BUILD_VECTORCombine
Matthias Braun [Tue, 21 Apr 2015 17:21:36 +0000 (17:21 +0000)]
X86: Match for X86ISD nodes in LowerBUILD_VECTOR instead of BUILD_VECTORCombine

There doesn't seem to be a reason to perform this target ISD node matching
in an DAGCombine, moving it to lowering fixes PR23296.

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

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

9 years agoMinor edits to the llvm-cov documentation.
Bob Wilson [Tue, 21 Apr 2015 16:32:02 +0000 (16:32 +0000)]
Minor edits to the llvm-cov documentation.

This just changes a few places to use a slightly more formal style.

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

9 years agos/NULL/nullptr/ in OrcTestCommon.h to silence -Wsentinel in clang-cl
Reid Kleckner [Tue, 21 Apr 2015 15:56:21 +0000 (15:56 +0000)]
s/NULL/nullptr/ in OrcTestCommon.h to silence -Wsentinel in clang-cl

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

9 years agoAVX-512: Added VPMOVx2M instructions for SKX,
Elena Demikhovsky [Tue, 21 Apr 2015 14:38:31 +0000 (14:38 +0000)]
AVX-512: Added VPMOVx2M instructions for SKX,
fixed encoding of VPMOVM2x.

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

9 years agoAVX-512: Added VPTESTM and VPTESTNM instructions for SKX
Elena Demikhovsky [Tue, 21 Apr 2015 13:13:46 +0000 (13:13 +0000)]
AVX-512: Added VPTESTM and VPTESTNM instructions for SKX

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

9 years ago[mips] [IAS] Implement the .asciiz directive.
Toma Tabacu [Tue, 21 Apr 2015 11:50:52 +0000 (11:50 +0000)]
[mips] [IAS] Implement the .asciiz directive.

Summary:
This directive is exactly the same as .asciz, except it's only used by MIPS.
It is used to store null terminated strings in object files.

Reviewers: rafael, dsanders, echristo

Reviewed By: dsanders, echristo

Subscribers: echristo, llvm-commits

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

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

9 years ago[mips][microMIPSr6] Implement CACHE and PREF instructions
Jozef Kolek [Tue, 21 Apr 2015 11:17:25 +0000 (11:17 +0000)]
[mips][microMIPSr6] Implement CACHE and PREF instructions

Implement CACHE and PREF instructions using mapping.

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

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

9 years ago[mips] Cleanup old floating-point flag conditions definitions. NFC.
Vasileios Kalintiris [Tue, 21 Apr 2015 10:53:57 +0000 (10:53 +0000)]
[mips] Cleanup old floating-point flag conditions definitions. NFC.

Reviewers: dsanders

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

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

9 years ago[mips] Optimize code generation for 64-bit variable shift instructions.
Vasileios Kalintiris [Tue, 21 Apr 2015 10:49:03 +0000 (10:49 +0000)]
[mips] Optimize code generation for 64-bit variable shift instructions.

Summary:
The 64-bit version of the variable shift instructions uses the
shift_rotate_reg class which uses a GPR32Opnd to specify the variable
shift amount. With this patch we avoid the generation of a redundant
SLL instruction for the variable shift instructions in 64-bit targets.

Reviewers: dsanders

Subscribers: llvm-commits

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

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

9 years agoAVX-512: Added logical and arithmetic instructions for SKX
Elena Demikhovsky [Tue, 21 Apr 2015 10:27:40 +0000 (10:27 +0000)]
AVX-512: Added logical and arithmetic instructions for SKX
by Asaf Badouh (asaf.badouh@intel.com)

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

9 years ago[X86][SSE] Provide execution domains for scalar floating point operations
Simon Pilgrim [Tue, 21 Apr 2015 08:40:22 +0000 (08:40 +0000)]
[X86][SSE] Provide execution domains for scalar floating point operations

This is an updated version of Chandler's patch D7402 that got accepted but never committed, and has bit-rotted a bit since.

I've updated the execution domain declarations to match the approach of the packed templates and also added some extra scalar unary tests.

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

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

9 years agoCONCAT_VECTOR of BUILD_VECTOR - minor fix
Simon Pilgrim [Tue, 21 Apr 2015 08:05:43 +0000 (08:05 +0000)]
CONCAT_VECTOR of BUILD_VECTOR - minor fix

Fixed issue with the combine of CONCAT_VECTOR of 2 BUILD_VECTOR nodes - the optimisation wasn't ensuring that the scalar operands of both nodes were the same type/size for implicit truncation.

Test case spotted by Patrik Hagglund

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

9 years agoFix generic shift expansion when shift amount is 0
Pawel Bylica [Tue, 21 Apr 2015 06:28:36 +0000 (06:28 +0000)]
Fix generic shift expansion when shift amount is 0

Summary:
This fixes http://llvm.org/bugs/show_bug.cgi?id=16439.

This is one possible way to approach this. The other would be to split InL>>(nbits-Amt) into (InL>>(nbits-1-Amt))>>1, which is also valid since since we only need to care about Amt up nbits-1. It's hard to tell which one is better since the shift might be expensive if this stage of expansion is not yet a legal machine integer, whereas comparisons with zero are relatively cheap at all sizes, but more expensive than a shift if the shift is on a legal machine type.

Patch by Keno Fischer!

Test Plan: regression test from http://reviews.llvm.org/D7752

Reviewers: chfast, resistor

Reviewed By: chfast, resistor

Subscribers: sanjoy, resistor, chfast, llvm-commits

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

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

9 years agoEnhanced vim support.
Matthias Braun [Tue, 21 Apr 2015 01:35:42 +0000 (01:35 +0000)]
Enhanced vim support.

This brings the utils/vim folder into a more vim-like format by moving
the syntax hightlighting files into a syntax subdirectory. It adds
some minimal settings that everyone should agree on to ftdetect/ftplugin and
features a new indentation plugin for .ll files.

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

9 years agoX86: Do not select X86 custom vector nodes if operand types don't match
Matthias Braun [Tue, 21 Apr 2015 01:13:41 +0000 (01:13 +0000)]
X86: Do not select X86 custom vector nodes if operand types don't match

X86ISD::ADDSUB, X86ISD::(F)HADD, X86ISD::(F)HSUB should not be selected
if the operand types do not match the result type because vector type
legalization cannot deal with this for custom nodes.

Testcase X86ISD::ADDSUB is attached. I could not create a testcase for
the FHADD/FHSUB cases because of: https://llvm.org/bugs/show_bug.cgi?id=23296

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

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

9 years agoTighten bundling section alignment test.
Derek Schuff [Tue, 21 Apr 2015 00:17:59 +0000 (00:17 +0000)]
Tighten bundling section alignment test.

Leftover comment from http://reviews.llvm.org/D9131

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

9 years ago[MC] When using bundle aligment, align sections to bundle size
Derek Schuff [Tue, 21 Apr 2015 00:14:25 +0000 (00:14 +0000)]
[MC] When using bundle aligment, align sections to bundle size

Summary:
Bundle aligment requires that the functions always start at an aligned address.
Usually this is ensured by the compiler, but assembly code does not always
begin with a .align directive.

This change ensures that sections get the correct alignment if they contain
any instructions and bundling is enabled. (It also makes LLVM match the
behavior of GNU as).

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

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

9 years agoInstCombine: fold (sitofp (zext x)) to (uitofp x)
Fiona Glaser [Tue, 21 Apr 2015 00:05:41 +0000 (00:05 +0000)]
InstCombine: fold (sitofp (zext x)) to (uitofp x)

This is okay because the zext guarantees the high bit is zero,
and so the value is unsigned.

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

9 years agoFix flakiness in fp16-promote.ll
Pirama Arumuga Nainar [Mon, 20 Apr 2015 23:54:41 +0000 (23:54 +0000)]
Fix flakiness in fp16-promote.ll

Summary:
In the f16-promote test, make the checks for native conversion instructions
similar to the libcall checks:
- Remove hard coded register names
- Do not check exact instruction sequences.

This fixes test flakiness due to non-determinism in instruction
scheduling and register allocation.  I also fixed a few minor things in
the CHECK-LIBCALL checks.

I'll try to find a way to check that unnecessary loads, stores, or
conversions don't happen.

Reviewers: mzolotukhin, srhines, ab

Subscribers: llvm-commits

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

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

9 years agobugpoint Enhancement.
JF Bastien [Mon, 20 Apr 2015 23:42:22 +0000 (23:42 +0000)]
bugpoint Enhancement.

Summary:
This patch adds two flags to `bugpoint`: "-replace-funcs-with-null" and "-disable-pass-list-reduction".

When "-replace-funcs-with-null" is specified, bugpoint will, instead of simply deleting function bodies, replace all uses of functions and then will delete functions completely from the test module, correctly handling aliasing and @llvm.used && @llvm.compiler.used. This part was conceived while trying to debug the PNaCl IR simplification passes, which don't allow undefined functions (ie no declarations).

With "-disable-pass-list-reduction", bugpoint won't try to reduce the set of passes causing the "crash". This is needed in cases where one is trying to debug an issue inside the PNaCl IR simplification passes which is causing an PNaCl ABI verification error, for example.

Reviewers: jfb

Reviewed By: jfb

Subscribers: jfb, llvm-commits

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

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

9 years agouse update_llc_test_checks.py to tighten checking
Sanjay Patel [Mon, 20 Apr 2015 23:31:53 +0000 (23:31 +0000)]
use update_llc_test_checks.py to tighten checking

Also, replace win and linux runs with a generic run because that
makes no difference in what this test is checking.

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

9 years agoAdd myself as the Constant Folder owner.
David Majnemer [Mon, 20 Apr 2015 23:19:10 +0000 (23:19 +0000)]
Add myself as the Constant Folder owner.

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

9 years ago[WinEH] Fix problem with landing pad return values used in PHI nodes during outlining.
Andrew Kaylor [Mon, 20 Apr 2015 22:53:42 +0000 (22:53 +0000)]
[WinEH] Fix problem with landing pad return values used in PHI nodes during outlining.

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

9 years agoDebugInfo: Delete subclasses of DIScope
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 22:10:08 +0000 (22:10 +0000)]
DebugInfo: Delete subclasses of DIScope

Delete subclasses of (the already defunct) `DIScope`, updating users to
use the raw pointers from the `Metadata` hierarchy directly.

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

9 years ago[WinEH] Fix problem with mapping shared empty handler blocks.
Andrew Kaylor [Mon, 20 Apr 2015 22:04:09 +0000 (22:04 +0000)]
[WinEH] Fix problem with mapping shared empty handler blocks.

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

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

9 years agoDebugInfo: Fix Kaleidoscope Ch. 8 after r235327
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 21:29:44 +0000 (21:29 +0000)]
DebugInfo: Fix Kaleidoscope Ch. 8 after r235327

Pretty sure the build was broken by r235327 (I updated it there, but
apparently didn't check if it compiled).

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

9 years agoDebugInfo: Delete old subclasses of DIType
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 21:17:32 +0000 (21:17 +0000)]
DebugInfo: Delete old subclasses of DIType

Delete subclasses of (the already deleted) `DIType` in favour of
directly using pointers from the `Metadata` hierarchy.

While `DICompositeType` wraps `MDCompositeTypeBase` and `DIDerivedType`
wraps `MDDerivedTypeBase`, most uses of each really meant the more
specific `MDCompositeType` and `MDDerivedType`.

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

9 years agoDwarfUnit: Split MDSubroutineType version of constructTypeDIE()
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 21:04:33 +0000 (21:04 +0000)]
DwarfUnit: Split MDSubroutineType version of constructTypeDIE()

The version of `constructTypeDIE()` for `MDSubroutineType` is unrelated
to (and has different callers than) the `MDCompositeType`.  Split the
two in half.

This simplifies an upcoming patch to delete `DICompositeType`.  There
shouldn't be any real functionality change here.  `createTypeDIE()` is
`cast<>`'ing where it didn't need to before, but that function in turn
is only called for true `MDCompositeType`s.

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

9 years ago[Orc] Make the makeStub function propagate argument attributes onto the call to
Lang Hames [Mon, 20 Apr 2015 20:41:45 +0000 (20:41 +0000)]
[Orc] Make the makeStub function propagate argument attributes onto the call to
the function body.

This is necessary for correctness when lazily compiling.

Also, flesh out the Orc unit test infrastructure slightly, and add a unit test
for this.

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

9 years agoDwarfUnit: Cleanup comments
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 20:29:51 +0000 (20:29 +0000)]
DwarfUnit: Cleanup comments

Update comment style in `DwarfUnit`.

  - Drop duplicated comments at definition, and update the comments at
    the declaration where the definition comments looked newer or more
    complete.
  - Drop the `functionName -` prefix.
  - Add `\brief` in a few places.
  - Remove a few comments entirely that weren't adding value (just
    turned the function name and arguments into a sentence).

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

9 years agoRefactoring and enhancement to FMA combine.
Olivier Sallenave [Mon, 20 Apr 2015 20:29:40 +0000 (20:29 +0000)]
Refactoring and enhancement to FMA combine.

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

9 years agoFixing line endings
Andrew Kaylor [Mon, 20 Apr 2015 20:27:28 +0000 (20:27 +0000)]
Fixing line endings

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

9 years ago[MIPS] OperationAction for FP_TO_FP16, FP16_TO_FP
Pirama Arumuga Nainar [Mon, 20 Apr 2015 20:15:36 +0000 (20:15 +0000)]
[MIPS] OperationAction for FP_TO_FP16, FP16_TO_FP

Summary:
Set operation action for FP16 conversion opcodes, so the Op legalizer
can choose the gnu_* libcalls for Mips.

Set LoadExtAction and TruncStoreAction for f16 scalars and vectors to
prevent (fpext (load )) and (store (fptrunc)) from getting combined into
unsupported operations.

Added test cases to test that these operations are handled correctly
for f16 scalars and vectors.  This patch depends on
http://reviews.llvm.org/D8755.

Reviewers: srhines

Subscribers: llvm-commits, ab

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

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

9 years agoDAGCombine: Remove redundant NaN checks around ISD::FSQRT
Tom Stellard [Mon, 20 Apr 2015 19:38:27 +0000 (19:38 +0000)]
DAGCombine: Remove redundant NaN checks around ISD::FSQRT

This folds:

(select (setcc x, -0.0, *lt), NaN, (fsqrt x)) -> ( fsqrt x)

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

9 years agoIR: Add ConstantFP::getNaN()
Tom Stellard [Mon, 20 Apr 2015 19:38:24 +0000 (19:38 +0000)]
IR: Add ConstantFP::getNaN()

This is a wrapper around APFloat::getNaN().

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

9 years agoDebugInfo: Remove DIType
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 18:52:06 +0000 (18:52 +0000)]
DebugInfo: Remove DIType

This is the last major parent class, so I'll probably start deleting
classes in batches now.  Looks like many of the references to the DI*
hierarchy were updated organically along the way.

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

9 years ago[WinEH] Fix memory leak with catch-all mapping.
Andrew Kaylor [Mon, 20 Apr 2015 18:48:45 +0000 (18:48 +0000)]
[WinEH] Fix memory leak with catch-all mapping.

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

9 years agoDebugInfo: Remove DIScope
Duncan P. N. Exon Smith [Mon, 20 Apr 2015 18:32:29 +0000 (18:32 +0000)]
DebugInfo: Remove DIScope

Replace uses of `DIScope` with `MDScope*`.  There was one spot where
I've left an `MDScope*` uninitialized (where `DIScope` would have been
default-initialized to `nullptr`) -- this is intentional, since the
if/else that follows should unconditional assign it to a value.

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

9 years ago[Orc] Use the 64-bit versions of FXSAVE/FXRSTOR for JIT reentry.
Lang Hames [Mon, 20 Apr 2015 18:25:44 +0000 (18:25 +0000)]
[Orc] Use the 64-bit versions of FXSAVE/FXRSTOR for JIT reentry.

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

9 years agoAdd targets to cmake for specific target components.
Pete Cooper [Mon, 20 Apr 2015 18:22:05 +0000 (18:22 +0000)]
Add targets to cmake for specific target components.

This adds the following targets to cmake.  These can be used to build and link only specific parts of a backend, instead of having to link the whole backend.

- AllTargetsAsmPrinters, AllTargetsAsmParsers, AllTargetsDescs, AllTargetsDisassemblers, AllTargetsInfos

A typical use for these is instead of linking ${LLVM_TARGETS_TO_BUILD}.  This commit changes llvm-mc to show how to use the new targets.

Reviewed by Chris Bieneman.

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