Commit Graph

114327 Commits

Author SHA1 Message Date
Benjamin Kramer
d59c5f9a06 Add missing includes. make_unique proliferated everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230909 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-01 21:28:53 +00:00
Arnaud A. de Grandmaison
502bb4cfeb [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
2015-03-01 21:22:50 +00:00
Benjamin Kramer
c255d35a10 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
2015-03-01 21:05:05 +00:00
Arnaud A. de Grandmaison
e2557d9bd1 [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
2015-03-01 20:39:34 +00:00
Benjamin Kramer
f5582d938e 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
2015-03-01 18:10:07 +00:00
Benjamin Kramer
30fa873958 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
2015-03-01 18:09:56 +00:00
Elena Demikhovsky
bf4d9a8aaf 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
2015-03-01 08:23:41 +00:00
Elena Demikhovsky
975e9b99aa 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
2015-03-01 07:44:04 +00:00
Zachary Turner
aac6cc3360 [llvm-pdbdump] Fix GCC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230890 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-01 06:59:57 +00:00
Zachary Turner
53e4b56257 [llvm-pdbdump] Clean up method signatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230889 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-01 06:51:29 +00:00
Zachary Turner
914913952c [llvm-pdbdump] Add regex-based filtering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-01 06:49:49 +00:00
NAKAMURA Takumi
a18f49225a 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
2015-03-01 04:16:28 +00:00
Sanjay Patel
821bba7fda 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
2015-03-01 00:09:35 +00:00
Sanjay Patel
7497834516 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
2015-03-01 00:02:03 +00:00
Duncan P. N. Exon Smith
17549804c1 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
2015-02-28 23:57:16 +00:00
Sanjay Patel
4f00dcbf22 make the tested feature (SSE2) explicit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230881 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 23:55:24 +00:00
Duncan P. N. Exon Smith
aee20c05e6 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
2015-02-28 23:52:24 +00:00
Duncan P. N. Exon Smith
b3381acab2 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
2015-02-28 23:48:02 +00:00
Sanjay Patel
be657e70b1 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
2015-02-28 23:47:09 +00:00
Duncan P. N. Exon Smith
9b18dbfe83 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
2015-02-28 23:21:38 +00:00
Sanjay Patel
776b3011a7 fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230876 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 22:25:06 +00:00
Duncan P. N. Exon Smith
837f19eb80 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
2015-02-28 22:20:16 +00:00
Duncan P. N. Exon Smith
9973291e83 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
2015-02-28 22:16:56 +00:00
Duncan P. N. Exon Smith
45909778e7 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
2015-02-28 21:58:10 +00:00
Duncan P. N. Exon Smith
5bcf130056 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
2015-02-28 21:47:02 +00:00
Duncan P. N. Exon Smith
80f65ca7ee 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
2015-02-28 21:38:32 +00:00
Zachary Turner
e09af84db5 [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
2015-02-28 20:23:18 +00:00
Benjamin Kramer
ce770dda2c 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
2015-02-28 20:15:07 +00:00
Benjamin Kramer
f4cff31d3c 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
2015-02-28 20:15:00 +00:00
Benjamin Kramer
cdef9818bc StackColoring: Move set instead of copying. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230864 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 20:14:38 +00:00
Benjamin Kramer
2bcfcc1c65 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
2015-02-28 20:14:27 +00:00
Nick Lewycky
0d2931f1cb 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
2015-02-28 19:43:20 +00:00
Mehdi Amini
8d25e3a832 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
2015-02-28 19:34:54 +00:00
Craig Topper
8df1c6ef09 [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
2015-02-28 19:33:17 +00:00
Zachary Turner
a0a46d1595 [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
2015-02-28 19:08:27 +00:00
Alexei Starovoitov
ae27891f8e 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
2015-02-28 18:03:04 +00:00
Benjamin Kramer
6b7603962a 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
2015-02-28 16:47:27 +00:00
Yaron Keren
fa22cce8d7 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
2015-02-28 15:54:04 +00:00
Yaron Keren
3ab51efa6d 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
2015-02-28 15:29:17 +00:00
Peter Zotov
fc21e4b4a8 [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
2015-02-28 13:48:23 +00:00
Benjamin Kramer
bac8d0ec70 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
2015-02-28 13:20:15 +00:00
Yaron Keren
beaeb78630 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
2015-02-28 13:11:24 +00:00
Benjamin Kramer
b22e2f9f2a ArrayRefize memory operand folding. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230846 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 12:04:00 +00:00
Benjamin Kramer
31fbd9f7b0 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
2015-02-28 10:11:12 +00:00
Eric Christopher
12d1e53db8 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
2015-02-28 10:04:18 +00:00
Philip Reames
63dff88c76 [RewriteStatepointsForGC] Reduce indentation via early continue [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 01:57:44 +00:00
Philip Reames
af690c9cd3 [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
2015-02-28 01:52:09 +00:00
Philip Reames
82eef109be [RewriteStatepointsForGC] Reduce indentation via early continue [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230829 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 00:54:41 +00:00
Philip Reames
dfa22d308f [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
2015-02-28 00:47:50 +00:00
Frederic Riss
63ac784d31 [dsymutil] Fully qualify llvm::make_unique<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230826 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 00:42:37 +00:00