oota-llvm.git
9 years agollvm/examples: Add missing include according to r230907.
NAKAMURA Takumi [Mon, 2 Mar 2015 01:04:34 +0000 (01:04 +0000)]
llvm/examples: Add missing include according to r230907.

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

9 years ago[X86] Fix diassembler crash on AVX512 cmpps/cmppd with immediate that doesn't fit...
Craig Topper [Mon, 2 Mar 2015 00:22:29 +0000 (00:22 +0000)]
[X86] Fix diassembler crash on AVX512 cmpps/cmppd with immediate that doesn't fit in 5-bits. Fixes PR22743.

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

9 years ago[AArch64] fix an invalid-iterator-use bug.
Sanjoy Das [Mon, 2 Mar 2015 00:17:18 +0000 (00:17 +0000)]
[AArch64] fix an invalid-iterator-use bug.

Summary:
In AArch64PromoteConstant::appendAndTransferDominatedUses,
`InsertPts[NewPt]` invalidates IPI.  Therefore, `InsertPts[NewPt] =
std::move(IPI->second)` is not legal.

This was caught by running `make check` with
http://reviews.llvm.org/D7931.

Reviewers: t.p.northover, grosbach, bkramer

Reviewed By: bkramer

Subscribers: aemerson, llvm-commits

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

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

9 years agoFix a really bad typo in my last commit.
Benjamin Kramer [Sun, 1 Mar 2015 23:56:19 +0000 (23:56 +0000)]
Fix a really bad typo in my last commit.

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

9 years agoRevert some changes that were made to fix PR20680.
Sanjoy Das [Sun, 1 Mar 2015 23:36:26 +0000 (23:36 +0000)]
Revert some changes that were made to fix PR20680.

Summary:
As far as I can tell, the real bug causing the issue was fixed in
r230533.  SCEVExpander should mark an increment operation as nuw or nsw
only if it can *prove* that the operation does not overflow.  There
shouldn't be any situation where we have to do something different
because of no-wrap flags generated by SCEVExpander.

Revert "IndVarSimplify: Allow LFTR to fire more often"

This reverts commit 1ade0f0faa98877b688e0b9da58e876052c1e04e (SVN: 222213).

Revert "IndVarSimplify: Don't let LFTR compare against a poison value"

This reverts commit c0f2b8b528d8a37b0a1522aae90af649d6357eb5 (SVN: 217102).

Reviewers: majnemer, atrick, spatel

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

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

9 years agoArrayRef: Put back std::equal for operator== with a check for the empty ArrayRefs
Benjamin Kramer [Sun, 1 Mar 2015 23:35:20 +0000 (23:35 +0000)]
ArrayRef: Put back std::equal for operator== with a check for the empty ArrayRefs

This has the nice property of compiling down to memcmp when feasible. An empty
ArrayRef can have a nullptr in its Data field. I didn't find anything in the
standard speaking against std::equal(nullptr, nullptr, nullptr) begin valid but
MSVC asserts. The way libstdc++ lowers std::equal down to memcmp also makes
invoking std::equal with a nullptr undefined behavior so checking is the only
way to be safe.

The extra check doesn't cost us perf either because we're essentially peeling
the loop header away from the rotated loop.

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

9 years agoAnother missing include for MSVC.
Benjamin Kramer [Sun, 1 Mar 2015 22:34:04 +0000 (22:34 +0000)]
Another missing include for MSVC.

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

9 years agostd::function is part of <functional>, not <utility>
Benjamin Kramer [Sun, 1 Mar 2015 21:49:21 +0000 (21:49 +0000)]
std::function is part of <functional>, not <utility>

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

9 years agoAdd another missing include for MSVC.
Benjamin Kramer [Sun, 1 Mar 2015 21:47:46 +0000 (21:47 +0000)]
Add another missing include for MSVC.

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

9 years agoX86: Replace variadic function with init list. NFC.
Benjamin Kramer [Sun, 1 Mar 2015 21:47:40 +0000 (21:47 +0000)]
X86: Replace variadic function with init list. NFC.

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

9 years agoAdd missing includes. make_unique proliferated everywhere.
Benjamin Kramer [Sun, 1 Mar 2015 21:28:53 +0000 (21:28 +0000)]
Add missing includes. make_unique proliferated everywhere.

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

9 years ago[PBQP] Address post-commit style comment for r230904. NFC.
Arnaud A. de Grandmaison [Sun, 1 Mar 2015 21:22:50 +0000 (21:22 +0000)]
[PBQP] Address post-commit style comment for r230904. NFC.

Thanks David !

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

9 years agoArrayRef: Remove the equals helper with many arguments.
Benjamin Kramer [Sun, 1 Mar 2015 21:05:05 +0000 (21:05 +0000)]
ArrayRef: Remove the equals helper with many arguments.

With initializer lists there is a really neat idiomatic way to write
this, 'ArrayRef.equals({1, 2, 3, 4, 5})'. Remove the equal method which
always had a hard limit on the number of arguments. I considered
rewriting it with variadic templates but that's not really a good fit
for a function with homogeneous arguments.

'ArrayRef == {1, 2, 3, 4, 5}' would've been even more awesome, but C++11
doesn't allow init lists with binary operators.

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

9 years ago[PBQP] Do not add an edge between nodes with totally disjoint allowed registers
Arnaud A. de Grandmaison [Sun, 1 Mar 2015 20:39:34 +0000 (20:39 +0000)]
[PBQP] Do not add an edge between nodes with totally disjoint allowed registers

Such edges are zero matrix, and they bring no additional info to the
allocation problem, apart from contributing to nodes' degree. Removing
those edges is expected to improve allocation time.

Tune the spill cost comparison, as this gives better average performances
now that the nodes' degrees has changed.

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

9 years agoMake VTs and UnicodeCharSet ctors constexpr if the compiler supports it.
Benjamin Kramer [Sun, 1 Mar 2015 18:10:07 +0000 (18:10 +0000)]
Make VTs and UnicodeCharSet ctors constexpr if the compiler supports it.

There are static variables of this around that we really want to go
into a read-only segment. Sadly compilers are not smart enough to figure
that out without constexpr.

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

9 years agoMake some non-constant static variables non-static or fully const.
Benjamin Kramer [Sun, 1 Mar 2015 18:09:56 +0000 (18:09 +0000)]
Make some non-constant static variables non-static or fully const.

Otherwise we have to emit thread-safe initialization for them. NFC.

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

9 years agoReverted 230471 - gather scatter handling in table gen.
Elena Demikhovsky [Sun, 1 Mar 2015 08:23:41 +0000 (08:23 +0000)]
Reverted 230471 - gather scatter handling in table gen.

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

9 years agoAVX-512: Added mask and rounding mode for scalar arithmetics
Elena Demikhovsky [Sun, 1 Mar 2015 07:44:04 +0000 (07:44 +0000)]
AVX-512: Added mask and rounding mode for scalar arithmetics
Added more tests for scalar instructions to destinguish between AVX and AVX-512 forms.

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

9 years ago[llvm-pdbdump] Fix GCC build.
Zachary Turner [Sun, 1 Mar 2015 06:59:57 +0000 (06:59 +0000)]
[llvm-pdbdump] Fix GCC build.

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

9 years ago[llvm-pdbdump] Clean up method signatures.
Zachary Turner [Sun, 1 Mar 2015 06:51:29 +0000 (06:51 +0000)]
[llvm-pdbdump] Clean up method signatures.

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

9 years ago[llvm-pdbdump] Add regex-based filtering.
Zachary Turner [Sun, 1 Mar 2015 06:49:49 +0000 (06:49 +0000)]
[llvm-pdbdump] Add regex-based filtering.

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

9 years agoRevert r230655, "gold-plugin: "Upgrade" debug info and handle its warnings."
NAKAMURA Takumi [Sun, 1 Mar 2015 04:16:28 +0000 (04:16 +0000)]
Revert r230655, "gold-plugin: "Upgrade" debug info and handle its warnings."

It emits *millions of warnings* during selfhosting LTO build, to choke the buildbot with gigbytes of log.

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

9 years agoavoid infinite looping when folding vector multiplies of constants (PR22698)
Sanjay Patel [Sun, 1 Mar 2015 00:09:35 +0000 (00:09 +0000)]
avoid infinite looping when folding vector multiplies of constants (PR22698)

We were missing a check for the following fold in DAGCombiner:

// fold (fmul (fmul x, c1), c2) -> (fmul x, (fmul c1, c2))

If 'x' is also a constant, then we shouldn't do anything. Otherwise, we could end up swapping the operands back and forth forever.

This should fix:
http://llvm.org/bugs/show_bug.cgi?id=22698

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

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Sun, 1 Mar 2015 00:02:03 +0000 (00:02 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agoDebugInfo: Convert DW_OP_piece => DW_OP_bit_piece
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:57:16 +0000 (23:57 +0000)]
DebugInfo: Convert DW_OP_piece => DW_OP_bit_piece

r228631 stopped using `DW_OP_piece` inside `DIExpression`s in the IR,
but it apparently missed updating these testcases.  Caught by verifier
checks for `MDExpression` while working on moving the new hierarchy into
place.

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

9 years agomake the tested feature (SSE2) explicit
Sanjay Patel [Sat, 28 Feb 2015 23:55:24 +0000 (23:55 +0000)]
make the tested feature (SSE2) explicit

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

9 years agoDebugInfo: Fix invalid file reference in CodeGen/X86/unknown-location.ll
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:52:24 +0000 (23:52 +0000)]
DebugInfo: Fix invalid file reference in CodeGen/X86/unknown-location.ll

There are two types of files in the old (current) debug info schema.

    !0 = !{!"some/filename", !"/path/to/dir"}
    !1 = !{!"0x29", !0} ; [ DW_TAG_file_type ]

!1 has a wrapper class called `DIFile` which inherits from `DIScope` and
is referenced in 'scope' fields.

!0 is called a "file node", and debug info nodes with a 'file' field
point at one of these directly -- although they're built in `DIBuilder`
by sending in a `DIFile` and reaching into it.

In the new hierarchy, I unified these nodes as `MDFile` (which `DIFile`
is a lightweight wrapper for) in r230057.  Moving the new hierarchy into
place (and upgrading testcases) caused CodeGen/X86/unknown-location.ll
to start failing -- apparently "0x29" was previously showing up in the
linetable as a filename, causing:

    .loc 2 4 3

(where 2 points at filename "0x29") instead of:

    .loc 1 4 3

(where 1 points at the actual filename).

Change the testcase to use the old schema correctly.

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

9 years agoDebugInfo: Use TempMDNode in DIDescriptor::replaceAllUsesWith()
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:48:02 +0000 (23:48 +0000)]
DebugInfo: Use TempMDNode in DIDescriptor::replaceAllUsesWith()

Start using `TempMDNode` in `DIDescriptor::replaceAllUsesWith()`
(effectively `std::unique_ptr<MDNode, MDNode::deleteTemporary>`).

Besides making ownership more explicit, this prepares for when
`DIDescriptor` refers to nodes that are *not* `MDTuple`.  The old logic
for "replacing" a node with itself used `MDNode::get()` to return a new
(uniqued) `MDTuple`, while the new logic just defers to
`MDNode::replaceWithUniqued()` (which also typically saves an allocation
and RAUW traffic by mutating the temporary in place).

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Sat, 28 Feb 2015 23:47:09 +0000 (23:47 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agoOptimize metadata node fields for CHECK-ability
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:21:38 +0000 (23:21 +0000)]
Optimize metadata node fields for CHECK-ability

While gaining practical experience hand-updating CHECK lines (for moving
the new debug info hierarchy into place),  I learnt a few things about
CHECK-ability of the specialized node assembly output.

  - The first part of a `CHECK:` is to identify the "right" node (this
    is especially true if you intend to use the new `CHECK-SAME`
    feature, since the first CHECK needs to identify the node correctly
    before you can split the line).
      - If there's a `tag:`, it should go first.
      - If there's a `name:`, it should go next (followed by the
        `linkageName:`, if any).
      - If there's a `scope:`, it should follow after that.
  - When a node type supports multiple DW_TAGs, but one is implied by
    its name and is overwhelmingly more common, the `tag:` field is
    terribly uninteresting unless it's different.
      - `MDBasicType` is almost always `DW_TAG_base_type`.
      - `MDTemplateValueParameter` is almost always
        `DW_TAG_template_value_parameter`.
  - Printing `name: ""` doesn't improve CHECK-ability, and there are far
    more nodes than I realized that are commonly nameless.
  - There are a few other fields that similarly aren't very interesting
    when they're empty.

This commit updates the `AsmWriter` as suggested above (and makes
necessary changes in `LLParser` for round-tripping).

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

9 years agofix typo; NFC
Sanjay Patel [Sat, 28 Feb 2015 22:25:06 +0000 (22:25 +0000)]
fix typo; NFC

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

9 years agoAsmWriter: Escape string fields in metadata
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 22:20:16 +0000 (22:20 +0000)]
AsmWriter: Escape string fields in metadata

Properly escape string fields in metadata.  I've added a spot-check with
direct coverage for `MDFile::getFilename()`, but we'll get more coverage
once the hierarchy is moved into place (since this comes up in various
checked-in testcases).

I've replicated the `if` logic using the `ShouldSkipEmpty` flag
(although a follow-up commit is going to change how often this flag is
specified); no NFCI other than escaping the string fields.

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

9 years agoAsmWriter: Extract writeStringField(), NFCI
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 22:16:56 +0000 (22:16 +0000)]
AsmWriter: Extract writeStringField(), NFCI

Extract logic for escaping a string field in the new debug info
hierarchy from `GenericDebugNode`.  A follow-up commit will use it far
more widely (hence the dead code for `ShouldSkipEmpty`).

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

9 years agoFix buildbot issues for MDScope::getFile() after r230871
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 21:58:10 +0000 (21:58 +0000)]
Fix buildbot issues for MDScope::getFile() after r230871

I hope this extra cast will make everyone happy...

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

9 years agoIR: Specialize MDScope::getFile() for MDFile
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 21:47:02 +0000 (21:47 +0000)]
IR: Specialize MDScope::getFile() for MDFile

Fix `MDScope::getFile()` so that it correctly returns a valid `MDFile`
even when it's an instance of `MDFile`.  This logic is necessary because
of r230057.  I'm working on moving the new hierarchy into place
out-of-tree (on track to commit Monday morning, BTW), and this was
exposed by a few failing tests.

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

9 years agoFix line endings on Transforms/Inline/inline_dbg_declare.ll
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 21:38:32 +0000 (21:38 +0000)]
Fix line endings on Transforms/Inline/inline_dbg_declare.ll

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

9 years ago[llvm-pdbdump] Better error handling.
Zachary Turner [Sat, 28 Feb 2015 20:23:18 +0000 (20:23 +0000)]
[llvm-pdbdump] Better error handling.

Previously it was impossible to distinguish between "There is
no PDB implementation for this platform" and "I tried to load
the PDB, but couldn't find the file", making it hard to figure
out if you built llvm-pdbdump incorrectly or if you just mistyped
a file name.

This patch adds proper error handling so that we can know exactly
what went wrong.

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

9 years agoIndexedMap: Default to SmallVector<T, 0>
Benjamin Kramer [Sat, 28 Feb 2015 20:15:07 +0000 (20:15 +0000)]
IndexedMap: Default to SmallVector<T, 0>

This looks ridiculous but SmallVector's realloc tricks really help with
large vectors of PODs, such as our virtreg IndexedMap.

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

9 years agoDwarfAccelTable: We know how many hashes we have in the output, just reserve the...
Benjamin Kramer [Sat, 28 Feb 2015 20:15:00 +0000 (20:15 +0000)]
DwarfAccelTable: We know how many hashes we have in the output, just reserve the precise number

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

9 years agoStackColoring: Move set instead of copying. NFC.
Benjamin Kramer [Sat, 28 Feb 2015 20:14:38 +0000 (20:14 +0000)]
StackColoring: Move set instead of copying. NFC.

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

9 years agoLiveRange: Replace a creative vector erase loop with std::remove_if.
Benjamin Kramer [Sat, 28 Feb 2015 20:14:27 +0000 (20:14 +0000)]
LiveRange: Replace a creative vector erase loop with std::remove_if.

I didn't see this so far because it scans backwards, but that doesn't
make it any less quadratic. NFC.

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

9 years agoRevert r230812. Do not break builds for no reason.
Nick Lewycky [Sat, 28 Feb 2015 19:43:20 +0000 (19:43 +0000)]
Revert r230812. Do not break builds for no reason.

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

9 years agoFixup for recent -fast-isel-abort change: code didn't match description
Mehdi Amini [Sat, 28 Feb 2015 19:34:54 +0000 (19:34 +0000)]
Fixup for recent -fast-isel-abort change: code didn't match description

Level 1 should abort for all instructions but call/terminators/args.
Instead it was aborting only if the level was > 2

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years ago[X86] Remove the blendpd/blendps/pblendw/pblendd intrinsics. They can represented...
Craig Topper [Sat, 28 Feb 2015 19:33:17 +0000 (19:33 +0000)]
[X86] Remove the blendpd/blendps/pblendw/pblendd intrinsics. They can represented by shuffle_vector instructions.

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

9 years ago[raw_ostream] When printing color on Windows, use correct bg color.
Zachary Turner [Sat, 28 Feb 2015 19:08:27 +0000 (19:08 +0000)]
[raw_ostream] When printing color on Windows, use correct bg color.

When using SetConsoleTextAttribute() to set the foreground or
background color, if you don't explicitly set both colors, then
a default value of black will be chosen for whichever you don't
specify a value for.

This is annoying when you have a non default console background
color, for example, and you try to set the foreground color.

This patch gets the existing fg/bg color and when you set one
attribute, sets the opposite attribute to its existing color
prior to comitting the update.

Reviewed by: Aaron Ballman
Differential Revision: http://reviews.llvm.org/D7967

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

9 years agobpf: fix build
Alexei Starovoitov [Sat, 28 Feb 2015 18:03:04 +0000 (18:03 +0000)]
bpf: fix build

complete the plumbing of passing TargetRegisterInfo through
computeRegisterProperties started by r230583

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

9 years agoTRE: Just erase dead BBs and tweak the iteration loop not to increment the deleted...
Benjamin Kramer [Sat, 28 Feb 2015 16:47:27 +0000 (16:47 +0000)]
TRE: Just erase dead BBs and tweak the iteration loop not to increment the deleted BB iterator.

Leaving empty blocks around just opens up a can of bugs like PR22704. Deleting
them early also slightly simplifies code.

Thanks to Sanjay for the IR test case.

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

9 years agoSilence variable set but not used warning in CodeGenRegisters.cpp, NFC.
Yaron Keren [Sat, 28 Feb 2015 15:54:04 +0000 (15:54 +0000)]
Silence variable set but not used warning in CodeGenRegisters.cpp, NFC.

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

9 years agoSilence three more variable set but not used warnings, NFC.
Yaron Keren [Sat, 28 Feb 2015 15:29:17 +0000 (15:29 +0000)]
Silence three more variable set but not used warnings, NFC.

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

9 years ago[OCaml] Generate documentation again with autoconf buildsystem.
Peter Zotov [Sat, 28 Feb 2015 13:48:23 +0000 (13:48 +0000)]
[OCaml] Generate documentation again with autoconf buildsystem.

Patch by Evangelos Foutras:

r220899 started using ocamlfind to build the OCaml bindings but
docs/Makefile still contains references to the OCAMLDOC macro which
is no longer being defined. The result is that OCaml documentation
isn't generated/installed.

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

9 years agoConvert push_back loops into append calls.
Benjamin Kramer [Sat, 28 Feb 2015 13:20:15 +0000 (13:20 +0000)]
Convert push_back loops into append calls.

No functionality change intended.

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

9 years agoSilence variable set but not used warning, NFC.
Yaron Keren [Sat, 28 Feb 2015 13:11:24 +0000 (13:11 +0000)]
Silence variable set but not used warning, NFC.

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

9 years agoArrayRefize memory operand folding. NFC.
Benjamin Kramer [Sat, 28 Feb 2015 12:04:00 +0000 (12:04 +0000)]
ArrayRefize memory operand folding. NFC.

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

9 years agoReplace std::copy with a back inserter with vector append where feasible
Benjamin Kramer [Sat, 28 Feb 2015 10:11:12 +0000 (10:11 +0000)]
Replace std::copy with a back inserter with vector append where feasible

All of the cases were just appending from random access iterators to a
vector. Using insert/append can grow the vector to the perfect size
directly and moves the growing out of the loop. No intended functionalty
change.

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

9 years agoRemove option.ll as part of the Forward Control Flow Integrity
Eric Christopher [Sat, 28 Feb 2015 10:04:18 +0000 (10:04 +0000)]
Remove option.ll as part of the Forward Control Flow Integrity
removal.

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

9 years ago[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]
Philip Reames [Sat, 28 Feb 2015 01:57:44 +0000 (01:57 +0000)]
[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]

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

9 years ago[RewriteStatepointsForGC] Fix another order of iteration bug
Philip Reames [Sat, 28 Feb 2015 01:52:09 +0000 (01:52 +0000)]
[RewriteStatepointsForGC] Fix another order of iteration bug

It turns out the naming of inserted phis and selects is sensative to the order in which two sets are iterated.  We need to nail this down to avoid non-deterministic output and possible test failures.

The modified test is the one I first noticed something odd in.  The change is making it more strict to report the error.  With the test change, but without the code change, the test fails roughly 1 in 5.  With the code change, I've run ~30 runs without error.

Long term, the right fix here is to adjust the naming scheme.  I'm checking in this hack to avoid any possible non-determinism in the tests over the weekend.  HJust because I only noticed one case doesn't mean it's actually the only case.  I hope to get to the right change Monday.

std->llvm data structure changes bugfix change #3

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

9 years ago[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]
Philip Reames [Sat, 28 Feb 2015 00:54:41 +0000 (00:54 +0000)]
[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]

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

9 years ago[RewriteStatepointsForGC] Fix iterator invalidation bug
Philip Reames [Sat, 28 Feb 2015 00:47:50 +0000 (00:47 +0000)]
[RewriteStatepointsForGC] Fix iterator invalidation bug

Inserting into a DenseMap you're iterating over is not well defined.  This is unfortunate since this is well defined on a std::map.

"cleanup per llvm code style standards" bug #2

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

9 years ago[dsymutil] Fully qualify llvm::make_unique<>.
Frederic Riss [Sat, 28 Feb 2015 00:42:37 +0000 (00:42 +0000)]
[dsymutil] Fully qualify llvm::make_unique<>.

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

9 years ago[dsymutil] Add the DwarfStreamer class.
Frederic Riss [Sat, 28 Feb 2015 00:29:11 +0000 (00:29 +0000)]
[dsymutil] Add the DwarfStreamer class.

This class is responsible for getting the linked data to the
disk in the appropriate form. Today it it an empty shell that
just instantiates an MC layer.

As we do not put anything in the resulting file yet, we just
check it has the right architecture (and check that -o does
the right thing).

To be able to create all the components, this commit adds a
few dependencies to llvm-dsymutil, namely all-targets, MC and
AsmPrinter.

Also add a -no-output option, so that tests that do not need
the binary result can continue to run even if they do not have
the required target linked in.

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

9 years ago[dsymutil] Add a LinkOptions struct to pass to the DwarfLinker. NFC.
Frederic Riss [Sat, 28 Feb 2015 00:29:07 +0000 (00:29 +0000)]
[dsymutil] Add a LinkOptions struct to pass to the DwarfLinker. NFC.

The only option we have to pass down currently is verbosity, but there
are more to come.

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

9 years ago[dsymutil] clang-format a file
Frederic Riss [Sat, 28 Feb 2015 00:29:05 +0000 (00:29 +0000)]
[dsymutil] clang-format a file

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

9 years ago[dsymutil] Add -o option to select ouptut filename
Frederic Riss [Sat, 28 Feb 2015 00:29:03 +0000 (00:29 +0000)]
[dsymutil] Add -o option to select ouptut filename

We do not create the output file yet, so no means to test.

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

9 years ago[dsymutil] Create warn() global helper...
Frederic Riss [Sat, 28 Feb 2015 00:29:01 +0000 (00:29 +0000)]
[dsymutil] Create warn() global helper...

...and reimplement DwarfLinker::reportWarning in terms of it. Other
compenents than the DwarfLinker will need to report warnings, and I'm
about to add a similar "error()" helper at the same global level so
make that consistent.

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

9 years ago[dsymutil] Make trivial accessor const.
Frederic Riss [Sat, 28 Feb 2015 00:28:56 +0000 (00:28 +0000)]
[dsymutil] Make trivial accessor const.

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

9 years ago[RewriteStatepointsForGC] Add tests for the base pointer identification algorithm
Philip Reames [Sat, 28 Feb 2015 00:20:48 +0000 (00:20 +0000)]
[RewriteStatepointsForGC] Add tests for the base pointer identification algorithm

These tests cover the 'base object' identification and rewritting portion of RewriteStatepointsForGC.  These aren't completely exhaustive, but they've proven to be reasonable effective over time at finding regressions.

In the process of porting these tests over, I found my first "cleanup per llvm code style standards" bug.  We were relying on the order of iteration when testing the base pointers found for a derived pointer.  When we switched from std::set to DenseSet, this stopped being a safe assumption.  I'm suspecting I'm going to find more of those.  In particular, I'm now really wondering about the main iteration loop for this algorithm.  I need to go take a closer look at the assumptions there.

I'm not really happy with the fact these are testing what is essentially debug output (i.e. enabled via command line flags).  Suggestions for how to structure this better are very welcome.

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

9 years agoDiscourage in-source autoconf builds (as we already do for the cmake build)
Jonathan Roelofs [Fri, 27 Feb 2015 23:35:47 +0000 (23:35 +0000)]
Discourage in-source autoconf builds (as we already do for the cmake build)

http://reviews.llvm.org/D7961

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

9 years agoRegenerated test case from pr 230801 for change in LLVM IR syntax
Bill Schmidt [Fri, 27 Feb 2015 23:29:57 +0000 (23:29 +0000)]
Regenerated test case from pr 230801 for change in LLVM IR syntax

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

9 years agoUpdate SystemZ/Large test generators to handle new gep IR syntax
David Blaikie [Fri, 27 Feb 2015 23:29:39 +0000 (23:29 +0000)]
Update SystemZ/Large test generators to handle new gep IR syntax

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

9 years agoUpdate SystemZ/Large test generators to handle new load IR syntax
David Blaikie [Fri, 27 Feb 2015 23:29:33 +0000 (23:29 +0000)]
Update SystemZ/Large test generators to handle new load IR syntax

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

9 years ago[new docs] Performance Tips for Frontend Authors
Philip Reames [Fri, 27 Feb 2015 23:14:50 +0000 (23:14 +0000)]
[new docs] Performance Tips for Frontend Authors

As mentioned on llvm-dev, this is a new documentation page intended to collect tips for frontend authors on how to generate IR that LLVM is able to optimize well. These types of things come up repeated in review threads and it would be good to have a place to save them.

I added a small handful to start us off, but I mostly want to get the framework in place. Once the docs are here, we can add to them incrementally.  If you know of something appropriate for this page, please add it!

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

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

9 years agoMachineDominators: Move applySplitCriticalEdges into the cpp file.
Benjamin Kramer [Fri, 27 Feb 2015 23:13:13 +0000 (23:13 +0000)]
MachineDominators: Move applySplitCriticalEdges into the cpp file.

It's too big for inlining anyways. Also clean it up slightly. No functionality
change intended.

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

9 years agollvm-vtabledump: Update field with a better name
David Majnemer [Fri, 27 Feb 2015 22:35:25 +0000 (22:35 +0000)]
llvm-vtabledump: Update field with a better name

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

9 years agoRevert test case until it can be fixed
Bill Schmidt [Fri, 27 Feb 2015 22:31:14 +0000 (22:31 +0000)]
Revert test case until it can be fixed

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

9 years ago[PowerPC] Fix PR22711 - Misaligned .toc section
Bill Schmidt [Fri, 27 Feb 2015 22:14:10 +0000 (22:14 +0000)]
[PowerPC] Fix PR22711 - Misaligned .toc section

Straightforward patch to emit an alignment directive when emitting a
TOC entry.  The test case was generated from the test in PR22711 that
demonstrated a misaligned .toc section.  The object code is run
through llvm-readobj to verify that the correct alignment has been
applied to the .toc section.

Thanks to Ulrich Weigand for running down where the fix was needed.

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

9 years agoReduce double set lookups.
Benjamin Kramer [Fri, 27 Feb 2015 21:43:14 +0000 (21:43 +0000)]
Reduce double set lookups.

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

9 years ago[opaque pointer type] Add textual IR support for explicit type parameter to load...
David Blaikie [Fri, 27 Feb 2015 21:17:42 +0000 (21:17 +0000)]
[opaque pointer type] Add textual IR support for explicit type parameter to load instruction

Essentially the same as the GEP change in r230786.

A similar migration script can be used to update test cases, though a few more
test case improvements/changes were required this time around: (r229269-r229278)

import fileinput
import sys
import re

pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)")

for line in sys.stdin:
  sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line))

Reviewers: rafael, dexonsmith, grosser

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

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

9 years agoTarget/X86: Never use the redzone for Win64 ABI functions.
Charles Davis [Fri, 27 Feb 2015 21:11:16 +0000 (21:11 +0000)]
Target/X86: Never use the redzone for Win64 ABI functions.

Summary:
Until now, we did this (among other things) based on whether or not the
target was Windows. This is clearly wrong, not just for Win64 ABI functions
on non-Windows, but for System V ABI functions on Windows, too. In this
change, we make this decision based on the ABI the calling convention
specifies instead.

Reviewers: rnk

Subscribers: llvm-commits

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

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

9 years ago[PowerPC] Use vector types for memcpy and friends (sometimes)
Hal Finkel [Fri, 27 Feb 2015 19:58:28 +0000 (19:58 +0000)]
[PowerPC] Use vector types for memcpy and friends (sometimes)

When using Altivec, we can use vector loads and stores for aligned memcpy and
friends. Starting with the P7 and VXS, we have reasonable unaligned vector
stores. Starting with the P8, we have fast unaligned loads too.

For QPX, we use vector loads are stores, but only for aligned memory accesses.

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

9 years ago[opaque pointer type] Add textual IR support for explicit type parameter to getelemen...
David Blaikie [Fri, 27 Feb 2015 19:29:02 +0000 (19:29 +0000)]
[opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction

One of several parallel first steps to remove the target type of pointers,
replacing them with a single opaque pointer type.

This adds an explicit type parameter to the gep instruction so that when the
first parameter becomes an opaque pointer type, the type to gep through is
still available to the instructions.

* This doesn't modify gep operators, only instructions (operators will be
  handled separately)

* Textual IR changes only. Bitcode (including upgrade) and changing the
  in-memory representation will be in separate changes.

* geps of vectors are transformed as:
    getelementptr <4 x float*> %x, ...
  ->getelementptr float, <4 x float*> %x, ...
  Then, once the opaque pointer type is introduced, this will ultimately look
  like:
    getelementptr float, <4 x ptr> %x
  with the unambiguous interpretation that it is a vector of pointers to float.

* address spaces remain on the pointer, not the type:
    getelementptr float addrspace(1)* %x
  ->getelementptr float, float addrspace(1)* %x
  Then, eventually:
    getelementptr float, ptr addrspace(1) %x

Importantly, the massive amount of test case churn has been automated by
same crappy python code. I had to manually update a few test cases that
wouldn't fit the script's model (r228970,r229196,r229197,r229198). The
python script just massages stdin and writes the result to stdout, I
then wrapped that in a shell script to handle replacing files, then
using the usual find+xargs to migrate all the files.

update.py:
import fileinput
import sys
import re

ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))")
normrep = re.compile(       r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))")

def conv(match, line):
  if not match:
    return line
  line = match.groups()[0]
  if len(match.groups()[5]) == 0:
    line += match.groups()[2]
  line += match.groups()[3]
  line += ", "
  line += match.groups()[1]
  line += "\n"
  return line

for line in sys.stdin:
  if line.find("getelementptr ") == line.find("getelementptr inbounds"):
    if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("):
      line = conv(re.match(ibrep, line), line)
  elif line.find("getelementptr ") != line.find("getelementptr ("):
    line = conv(re.match(normrep, line), line)
  sys.stdout.write(line)

apply.sh:
for name in "$@"
do
  python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name"
  rm -f "$name.tmp"
done

The actual commands:
From llvm/src:
find test/ -name *.ll | xargs ./apply.sh
From llvm/src/tools/clang:
find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}"
From llvm/src/tools/polly:
find test/ -name *.ll | xargs ./apply.sh

After that, check-all (with llvm, clang, clang-tools-extra, lld,
compiler-rt, and polly all checked out).

The extra 'rm' in the apply.sh script is due to a few files in clang's test
suite using interesting unicode stuff that my python script was throwing
exceptions on. None of those files needed to be migrated, so it seemed
sufficient to ignore those cases.

Reviewers: rafael, dexonsmith, grosser

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

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

9 years agoRefer users looking for the release notes to 3.6.
Benjamin Kramer [Fri, 27 Feb 2015 19:06:26 +0000 (19:06 +0000)]
Refer users looking for the release notes to 3.6.

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

9 years agoRemove the Forward Control Flow Integrity pass and its dependencies.
Eric Christopher [Fri, 27 Feb 2015 19:03:38 +0000 (19:03 +0000)]
Remove the Forward Control Flow Integrity pass and its dependencies.

This work is currently being rethought along different lines and
if this work is needed it can be resurrected out of svn. Remove it
for now as no current work in ongoing on it and it's unused. Verified
with the authors before removal.

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

9 years agoObject: Test for reading kext bundles
Justin Bogner [Fri, 27 Feb 2015 18:58:23 +0000 (18:58 +0000)]
Object: Test for reading kext bundles

In the review for r230567, it was pointed out we should really test
the lib/Object part of that change. This does so using llvm-readobj.

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

9 years agoDelete LLVM_DELETED_FUNCTION from coding standards
Reid Kleckner [Fri, 27 Feb 2015 18:34:16 +0000 (18:34 +0000)]
Delete LLVM_DELETED_FUNCTION from coding standards

It didn't seem worth leaving behind a guideline to use '= delete' to
make a class uncopyable. That's a well known C++ design pattern.

Reported on the mailing list and in PR22724.

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

9 years agoChange the fast-isel-abort option from bool to int to enable "levels"
Mehdi Amini [Fri, 27 Feb 2015 18:32:11 +0000 (18:32 +0000)]
Change the fast-isel-abort option from bool to int to enable "levels"

Summary:
Currently fast-isel-abort will only abort for regular instructions,
and just warn for function calls, terminators, function arguments.
There is already fast-isel-abort-args but nothing for calls and
terminators.

This change turns the fast-isel-abort options into an integer option,
so that multiple levels of strictness can be defined.
This will help no being surprised when the "abort" option indeed does
not abort, and enables the possibility to write test that verifies
that no intrinsics are forgotten by fast-isel.

Reviewers: resistor, echristo

Subscribers: jfb, llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoMinor follow-ups to r229720 suggested on llvmdev
Reid Kleckner [Fri, 27 Feb 2015 18:22:46 +0000 (18:22 +0000)]
Minor follow-ups to r229720 suggested on llvmdev

"svn" patch by Sedat Dilek plus trimming whitespace added in r229720.

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

9 years agoCentralize handling of the eh_begin and eh_end labels.
Rafael Espindola [Fri, 27 Feb 2015 18:18:39 +0000 (18:18 +0000)]
Centralize handling of the eh_begin and eh_end labels.

This removes a bit of duplicated code and more importantly, remembers the
labels so that they don't need to be looked up by name.

This in turn allows for any name to be used and avoids a crash if the name
we wanted was already taken.

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

9 years agoremove function names from comments; NFC
Sanjay Patel [Fri, 27 Feb 2015 18:07:41 +0000 (18:07 +0000)]
remove function names from comments; NFC

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

9 years agoSwitch a std::map to a DenseMap in CodeGenRegisters.
Owen Anderson [Fri, 27 Feb 2015 17:57:01 +0000 (17:57 +0000)]
Switch a std::map to a DenseMap in CodeGenRegisters.

The keys of the map are unique by pointer address, so there's no need
to use the llvm::less comparator. This allows us to use DenseMap
instead, which reduces tblgen time by 20% on my stress test.

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

9 years agoremove function names from comments; NFC
Sanjay Patel [Fri, 27 Feb 2015 17:27:15 +0000 (17:27 +0000)]
remove function names from comments; NFC

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

9 years agoEqually to NetBSD, Bitrig/ARM uses the Itanium-ABI.
Renato Golin [Fri, 27 Feb 2015 16:35:27 +0000 (16:35 +0000)]
Equally to NetBSD, Bitrig/ARM uses the Itanium-ABI.

Patch by Patrick Wildt.

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

9 years ago[mips][microMIPS] Change register class for GP register
Zoran Jovanovic [Fri, 27 Feb 2015 15:03:50 +0000 (15:03 +0000)]
[mips][microMIPS] Change register class for GP register
Differential Revision: http://reviews.llvm.org/D7934

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

9 years agoR600/SI: Add missing mubuf instructions
Tom Stellard [Fri, 27 Feb 2015 14:59:46 +0000 (14:59 +0000)]
R600/SI: Add missing mubuf instructions

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

9 years agoR600/SI: Consistently put soffset before the offset operand for mubuf instructions
Tom Stellard [Fri, 27 Feb 2015 14:59:44 +0000 (14:59 +0000)]
R600/SI: Consistently put soffset before the offset operand for mubuf instructions

This matches the assembly syntax.

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

9 years agoR600/SI: Add slc, glc, and tfe to non-atomic _ADDR64 instructions
Tom Stellard [Fri, 27 Feb 2015 14:59:41 +0000 (14:59 +0000)]
R600/SI: Add slc, glc, and tfe to non-atomic _ADDR64 instructions

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

9 years agoPass correct -mtriple for krait-cpu-div-attribute.ll
Petar Jovanovic [Fri, 27 Feb 2015 14:46:41 +0000 (14:46 +0000)]
Pass correct -mtriple for krait-cpu-div-attribute.ll

Not passing mtriple for one of the tests caused a regression failure
on MIPS buildbot. The issue was introduced by r230651.

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

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

9 years ago[x86] Run most of the rest of the shuffle combining over non-128-bit
Chandler Carruth [Fri, 27 Feb 2015 12:13:14 +0000 (12:13 +0000)]
[x86] Run most of the rest of the shuffle combining over non-128-bit
vectors. This lets us fix the rest of the v16 lowering problems when
pshufb is clearly better.

We might still be able to improve some of the lowerings by enabling the
other combine-based rewriting to fire for non-128-bit vectors, but this
at least should remove any regressions from using the fancy v16i16
lowering strategy.

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

9 years ago[x86] Teach a bunch of the x86-specific shuffle combining to work with
Chandler Carruth [Fri, 27 Feb 2015 11:45:13 +0000 (11:45 +0000)]
[x86] Teach a bunch of the x86-specific shuffle combining to work with
256-bit vectors as well as 128-bit vectors. Fixes some of the redundant
shuffles for v16i16.

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

9 years ago[x86] Make the v8i16 clever single-input shuffle lowering usable for
Chandler Carruth [Fri, 27 Feb 2015 11:33:46 +0000 (11:33 +0000)]
[x86] Make the v8i16 clever single-input shuffle lowering usable for
repeated 128-bit lane shuffles of wider vector types and use it to lower
256-bit v16i16 vector shuffles where applicable.

This should let us perfectly lowering the pattern of pshuflw and pshufhw
even for AVX2 256-bit patterns.

I've not added AVX-512 support, but it should be trivial for someone
working on that to wire up.

Note that currently this generates bad, long shuffle chains because we
don't combine 256-bit target shuffles. The subsequent patches will fix
that.

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