oota-llvm.git
9 years agoMove DIContext.h to common DebugInfo location.
Zachary Turner [Thu, 23 Apr 2015 17:37:47 +0000 (17:37 +0000)]
Move DIContext.h to common DebugInfo location.

This will enable us to create a PDBContext so as to expose some
amount of debug info functionality through a common interace.

Differential Revision: http://reviews.llvm.org/D9205
Reviewed by: Alexey Samsonov

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

9 years agoMove Value.isDereferenceablePointer to ValueTracking [NFC]
Philip Reames [Thu, 23 Apr 2015 17:36:48 +0000 (17:36 +0000)]
Move Value.isDereferenceablePointer to ValueTracking [NFC]

Move isDereferenceablePointer function to Analysis. This function recursively tracks dereferencability over a chain of values like other functions in ValueTracking.

This refactoring is motivated by further changes to support dereferenceable_or_null attribute (http://reviews.llvm.org/D8650). isDereferenceablePointer will be extended to perform context-sensitive analysis and IR is not a good place to have such functionality.

Patch by: Artur Pilipenko <apilipenko@azulsystems.com>
Differential Revision: reviews.llvm.org/D9075

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

9 years ago[AArch64] Add nvcast patterns for v4f16 and v8f16
Pirama Arumuga Nainar [Thu, 23 Apr 2015 17:32:25 +0000 (17:32 +0000)]
[AArch64] Add nvcast patterns for v4f16 and v8f16

Summary:
Constant stores of f16 vectors can create NvCast nodes from various
operand types to v4f16 or v8f16 depending on patterns in the stored
constants.  This patch adds nvcast rules with v4f16 and v8f16 values.

AArchISelLowering::LowerBUILD_VECTOR has the details on which constant
patterns generate the nvcast nodes.

Reviewers: jmolloy, srhines, ab

Subscribers: rengolin, aemerson, llvm-commits

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

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

9 years ago[AArch64] Handle vec4, vec8, vec16 *itofp for half
Pirama Arumuga Nainar [Thu, 23 Apr 2015 17:16:27 +0000 (17:16 +0000)]
[AArch64] Handle vec4, vec8, vec16 *itofp for half

Summary:
Set operation action for SINT_TO_FP and UINT_TO_FP nodes with v4i32,
v8i8, v8i16 inputs to allow promotion of v4f16 results.

Add tests for sitofp and uitofp for vec4, vec8, vec16, and i8, i16, i32,
and i64 vectors.  Only missing tests are for v16i8 and v16i16 as the
shift operations are too complicated to write a proper check sequence.

The conversions from v4i64 to v4f16 do not depend on this patch - v4i64
is split and the conversion gets handled while lowering v2i64.  I am
adding a test here for completeness.

Reviewers: aemerson, rengolin, ab, jmolloy, srhines

Subscribers: rengolin, aemerson, llvm-commits

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

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

9 years agoRe-commit r235560: Switch lowering: extract jump tables and bit tests before building...
Hans Wennborg [Thu, 23 Apr 2015 16:45:24 +0000 (16:45 +0000)]
Re-commit r235560: Switch lowering: extract jump tables and bit tests before building binary tree (PR22262)

Third time's the charm. The previous commit was reverted as a
reverse for-loop in SelectionDAGBuilder::lowerWorkItem did 'I--'
on an iterator at the beginning of a vector, causing asserts
when using debugging iterators. This commit fixes that.

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

9 years agouse update_llc_test_checks.py to tighten checking; remove unnecessary CPU param
Sanjay Patel [Thu, 23 Apr 2015 16:07:50 +0000 (16:07 +0000)]
use update_llc_test_checks.py to tighten checking; remove unnecessary CPU param

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

9 years ago[Hexagon] Shrink-wrap stack frame (Hexagon-specific)
Krzysztof Parzyszek [Thu, 23 Apr 2015 16:05:39 +0000 (16:05 +0000)]
[Hexagon] Shrink-wrap stack frame (Hexagon-specific)

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

9 years ago[Hexagon] Add testcases for stack alignment and variable-sized objects
Krzysztof Parzyszek [Thu, 23 Apr 2015 15:12:49 +0000 (15:12 +0000)]
[Hexagon] Add testcases for stack alignment and variable-sized objects

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

9 years ago[mips] [IAS] Move NOP emission after pseudo-instruction expansion. NFC.
Toma Tabacu [Thu, 23 Apr 2015 14:48:38 +0000 (14:48 +0000)]
[mips] [IAS] Move NOP emission after pseudo-instruction expansion. NFC.

As suggested in the review for http://reviews.llvm.org/D8537.

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

9 years agoRevert r235560; this commit was causing several failed assertions in Debug builds...
Aaron Ballman [Thu, 23 Apr 2015 13:41:59 +0000 (13:41 +0000)]
Revert r235560; this commit was causing several failed assertions in Debug builds using MSVC's STL. The iterator is being used outside of its valid range.

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

9 years agoBe more strict about the operand for the array type in BitcodeReader
Filipe Cabecinhas [Thu, 23 Apr 2015 13:38:21 +0000 (13:38 +0000)]
Be more strict about the operand for the array type in BitcodeReader

Summary: Bug found with AFL fuzz.

Reviewers: rafael

Subscribers: llvm-commits

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

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

9 years agoVerify sizes when trying to read a BitcodeAbbrevOp
Filipe Cabecinhas [Thu, 23 Apr 2015 13:25:35 +0000 (13:25 +0000)]
Verify sizes when trying to read a BitcodeAbbrevOp

Summary:
Make sure the abbrev operands are valid and that we can read/skip them
afterwards.

Bug found with AFL fuzz.

Reviewers: rafael

Subscribers: llvm-commits

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

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

9 years ago[DAGCombiner] Remove extra bitcasts surrounding vector shuffles
Simon Pilgrim [Thu, 23 Apr 2015 08:43:13 +0000 (08:43 +0000)]
[DAGCombiner] Remove extra bitcasts surrounding vector shuffles

Patch to remove extra bitcasts from shuffles, this is often a legacy of XformToShuffleWithZero being used to combine bitmaskings (of float vectors bitcast to integer vectors) into shuffles: bitcast(shuffle(bitcast(s0),bitcast(s1))) -> shuffle(s0,s1)

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

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

9 years agoMove common loop utility function isInductionPHI into LoopUtils.cpp
Karthik Bhat [Thu, 23 Apr 2015 08:29:20 +0000 (08:29 +0000)]
Move common loop utility function isInductionPHI into LoopUtils.cpp

This patch refactors the definition of common utility function "isInductionPHI" to LoopUtils.cpp.
This fixes compilation error when configured with -DBUILD_SHARED_LIBS=ON

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

9 years agoAdd support to interchange loops with reductions.
Karthik Bhat [Thu, 23 Apr 2015 04:51:44 +0000 (04:51 +0000)]
Add support to interchange loops with reductions.
This patch enables interchanging of tightly nested loops with reductions.
Differential Revision: http://reviews.llvm.org/D8314

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

9 years ago[WinEH] Removing seh-filter.ll until I can determine its validity
Andrew Kaylor [Thu, 23 Apr 2015 00:38:22 +0000 (00:38 +0000)]
[WinEH] Removing seh-filter.ll until I can determine its validity

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

9 years ago[WinEH] Don't skip landing pads that end with an unreachable instruction.
Andrew Kaylor [Thu, 23 Apr 2015 00:20:44 +0000 (00:20 +0000)]
[WinEH] Don't skip landing pads that end with an unreachable instruction.

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

9 years agoSwitch lowering: extract jump tables and bit tests before building binary tree (PR22262)
Hans Wennborg [Wed, 22 Apr 2015 23:14:56 +0000 (23:14 +0000)]
Switch lowering: extract jump tables and bit tests before building binary tree (PR22262)

This is a re-commit of r235101, which also fixes the problems with the previous patch:

- Switches with only a default case and non-fallthrough were handled incorrectly

- The previous patch tickled a bug in PowerPC Early-Return Creation which is fixed here.

> This is a major rewrite of the SelectionDAG switch lowering. The previous code
> would lower switches as a binary tre, discovering clusters of cases
> suitable for lowering by jump tables or bit tests as it went along. To increase
> the likelihood of finding jump tables, the binary tree pivot was selected to
> maximize case density on both sides of the pivot.
>
> By not selecting the pivot in the middle, the binary trees would not always
> be balanced, leading to performance problems in the generated code.
>
> This patch rewrites the lowering to search for clusters of cases
> suitable for jump tables or bit tests first, and then builds the binary
> tree around those clusters. This way, the binary tree will always be balanced.
>
> This has the added benefit of decoupling the different aspects of the lowering:
> tree building and jump table or bit tests finding are now easier to tweak
> separately.
>
> For example, this will enable us to balance the tree based on profile info
> in the future.
>
> The algorithm for finding jump tables is quadratic, whereas the previous algorithm
> was O(n log n) for common cases, and quadratic only in the worst-case. This
> doesn't seem to be major problem in practice, e.g. compiling a file consisting
> of a 10k-case switch was only 30% slower, and such large switches should be rare
> in practice. Compiling e.g. gcc.c showed no compile-time difference.  If this
> does turn out to be a problem, we could limit the search space of the algorithm.
>
> This commit also disables all optimizations during switch lowering in -O0.
>
> Differential Revision: http://reviews.llvm.org/D8649

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

9 years ago[InstCombine] Use a more targeted fix instead of r235544
David Majnemer [Wed, 22 Apr 2015 22:42:05 +0000 (22:42 +0000)]
[InstCombine] Use a more targeted fix instead of r235544

Only clear out the NSW/NUW flags if we are optimizing 'add'/'sub' while
taking advantage that the sign bit is not set.  We do this optimization
to further shrink the mask but shrinking the mask isn't NSW/NUW
preserving in this case.

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

9 years ago[SEH] Remove the old __C_specific_handler code now that WinEHPrepare works
Reid Kleckner [Wed, 22 Apr 2015 22:13:09 +0000 (22:13 +0000)]
[SEH] Remove the old __C_specific_handler code now that WinEHPrepare works

This removes the -sehprepare flag and makes __C_specific_handler
functions always to use WinEHPrepare.

This was tested by building all of chromium_builder_tests and running a
few tests that use SEH, but if something breaks, we can revert this.

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

9 years agoUnxfail passing test on Hexagon
Krzysztof Parzyszek [Wed, 22 Apr 2015 21:41:24 +0000 (21:41 +0000)]
Unxfail passing test on Hexagon

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

9 years ago[RuntimeDyld][COFF] Add external symbol resolution support to RuntimeDyldCOFF.
Lang Hames [Wed, 22 Apr 2015 21:38:37 +0000 (21:38 +0000)]
[RuntimeDyld][COFF] Add external symbol resolution support to RuntimeDyldCOFF.

Patch by Andy Ayers. Thanks Andy!

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

9 years ago[Hexagon] Some cleanup of instruction selection code
Krzysztof Parzyszek [Wed, 22 Apr 2015 21:17:00 +0000 (21:17 +0000)]
[Hexagon] Some cleanup of instruction selection code

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

9 years ago[WinEH] Demote values and phis live across exception handlers up front
Reid Kleckner [Wed, 22 Apr 2015 21:05:21 +0000 (21:05 +0000)]
[WinEH] Demote values and phis live across exception handlers up front

In particular, this handles SSA values that are live *out* of a handler.
The existing code only handles values that are live *in* to a handler.

It also handles phi nodes in the block where normal control should
resume after the end of a catch handler.  When EH return points have phi
nodes, we need to split the return edge. It is impossible for phi
elimination to emit copies in the previous block if that block gets
outlined. The indirectbr that we leave in the function is only notional,
and is eliminated from the MachineFunction CFG early on.

Reviewers: majnemer, andrew.w.kaylor

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

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

9 years ago[InstCombine] Clear out nsw/nuw if we modify computation in the chain
David Majnemer [Wed, 22 Apr 2015 20:59:28 +0000 (20:59 +0000)]
[InstCombine] Clear out nsw/nuw if we modify computation in the chain

An nsw/nuw operation relies on the values feeding into it to not
overflow if 'poison' is not to be produced.  This means that
optimizations which make modifications to the bottom of a chain (like
SimplifyDemandedBits) must strip out nsw/nuw if they cannot ensure that
they will be preserved.

This fixes PR23309.

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

9 years ago[Kaleidoscope] Fix incorrect use of reinterpret_cast.
Lang Hames [Wed, 22 Apr 2015 20:58:34 +0000 (20:58 +0000)]
[Kaleidoscope] Fix incorrect use of reinterpret_cast.

Thanks to Dave Blaikie for catching this.

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

9 years ago[Allocator] Remove memory poisoning before deallocation
Reid Kleckner [Wed, 22 Apr 2015 20:56:42 +0000 (20:56 +0000)]
[Allocator] Remove memory poisoning before deallocation

I added the poisoning back in r76891 (2009) because of some bugs in
Unladen Swallow, and then Evan Cheng added the setRangeWritable() call
in r81308. Profiling a Release+Asserts build on Windows shows that this
memory protection call is actually very expensive. 4 seconds of a 70
second Clang compilation are spent in VirtualQuery. These days we have
more reliable tools like ASan to find these kinds of bugs, so we can go
ahead and retire these checks.

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

9 years ago[Kaleidoscope] Remove RTTI use from chapters 7 and 8.
Lang Hames [Wed, 22 Apr 2015 20:41:34 +0000 (20:41 +0000)]
[Kaleidoscope] Remove RTTI use from chapters 7 and 8.

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

9 years agoAnother test to exercise APInt divide step D6.
Yaron Keren [Wed, 22 Apr 2015 18:49:59 +0000 (18:49 +0000)]
Another test to exercise APInt divide step D6.

This is divrem_big7 since divrem_big6 is used in Pawel upcoming patch.

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

9 years ago[Hexagon] Use A2_tfrsi for constant pool and jump table addresses
Krzysztof Parzyszek [Wed, 22 Apr 2015 18:25:53 +0000 (18:25 +0000)]
[Hexagon] Use A2_tfrsi for constant pool and jump table addresses

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

9 years agoRevert "[opaque pointer type] Avoid using PointerType::getElementType for a few cases...
David Blaikie [Wed, 22 Apr 2015 18:16:49 +0000 (18:16 +0000)]
Revert "[opaque pointer type] Avoid using PointerType::getElementType for a few cases of CallInst"

This reverts commit r235458.

It looks like this might be breaking something LTO-ish. Looking into it
& will recommit with a fix/test case/etc once I've got more to go on.

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

9 years ago[AArch64] Use MachineRegisterInfo instead of LiveIntervals to calculate liveness...
Pete Cooper [Wed, 22 Apr 2015 18:05:13 +0000 (18:05 +0000)]
[AArch64] Use MachineRegisterInfo instead of LiveIntervals to calculate liveness.  NFC.

The CondOpt pass currently uses LiveIntervals to set the dead flag on a def.  This patch uses MachineRegisterInfo::use_empty instead as that is equivalent to the def being dead.

This removes an instance of LiveIntervals in the pass manager pipeline and saves 3.8% of compile time on llc conpiled for AArch64.

Reviewed by Chad Rosier and Zhaoshi.

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

9 years agodon't repeat function names in comments; NFC
Sanjay Patel [Wed, 22 Apr 2015 18:04:46 +0000 (18:04 +0000)]
don't repeat function names in comments; NFC

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

9 years agoFix correctness check for test_vec_fpextend_double
Pirama Arumuga Nainar [Wed, 22 Apr 2015 18:04:12 +0000 (18:04 +0000)]
Fix correctness check for test_vec_fpextend_double

Summary:
Remove the CHECK-DAG calls introduced in r235341, and add a comment that
this test may break due to scheduling variations.

This patch completes the fix discussed in http://reviews.llvm.org/D8804

Reviewers: dsanders, srhines

Subscribers: llvm-commits

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

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

9 years ago[Hexagon] Consider constant-extended offsets to be valid
Krzysztof Parzyszek [Wed, 22 Apr 2015 17:51:26 +0000 (17:51 +0000)]
[Hexagon] Consider constant-extended offsets to be valid

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

9 years agoChange MachineOperand::OpKind from unsigned char to a bitfield. NFC.
Pete Cooper [Wed, 22 Apr 2015 17:48:26 +0000 (17:48 +0000)]
Change MachineOperand::OpKind from unsigned char to a bitfield.  NFC.

This causes OpKind and all the bitfields after it to use 32-bit load/stores instead of i24's for the existing bitfields.

Bugs will be filed to track whether clang and llvm could have generated the 32-bit operations in the front-end or optimizer.

Reviewed by Rafael.

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

9 years agoTest commit: fix typo in comment.
Luqman Aden [Wed, 22 Apr 2015 17:42:37 +0000 (17:42 +0000)]
Test commit: fix typo in comment.

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

9 years agoFix Windows build break: use LLVM_FUNCTION_NAME instead of __func__.
Krzysztof Parzyszek [Wed, 22 Apr 2015 17:19:44 +0000 (17:19 +0000)]
Fix Windows build break: use LLVM_FUNCTION_NAME instead of __func__.

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

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