Commit Graph

192761 Commits

Author SHA1 Message Date
Alexey Samsonov 54a0e40442 [CMake] PowerPC: detect host endianness to build corresponding version of runtimes.
Prior to this change we built two identical runtimes, named "powerpc64"
and "powerpc64le", while their actual endianness matched the host
endianness.

llvm-svn: 228650
2015-02-10 01:42:44 +00:00
Duncan P. N. Exon Smith e4725beba7 Verifier: Check for valid tags in debug nodes
Check that specialized `DebugNode`s have valid `DW_TAG`s.

llvm-svn: 228649
2015-02-10 01:40:40 +00:00
Duncan P. N. Exon Smith dddc537cc0 IR: Add accessors to MDExpression
Add some accessors to `MDExpression`.

llvm-svn: 228648
2015-02-10 01:36:46 +00:00
Duncan P. N. Exon Smith 692bdb910d Verifier: Add simple checks for MDLocation
llvm-svn: 228647
2015-02-10 01:32:56 +00:00
Rui Ueyama 7960d04f13 Driver: Replace switch cases with ifs.
We used to do like this instead of putting all command line processing
code within one gigantic switch statement. It is converted to a switch
in r188958, which introduced InputGraph.

In this patch I roll that change back. Now all "break"s are removed,
and the nesting is one level shallow.

llvm-svn: 228646
2015-02-10 01:10:23 +00:00
Duncan P. N. Exon Smith b0a19ad08a Verifier: Create stubs for specialized metadata nodes
llvm-svn: 228645
2015-02-10 01:09:50 +00:00
Duncan P. N. Exon Smith ed458fa12c AsmParser: Add stubs for specialized MDNodes, NFC
Well, the exact error from the failed parse will change, but...

llvm-svn: 228644
2015-02-10 01:08:16 +00:00
Rui Ueyama 55240af6a3 Remove trailing space.
llvm-svn: 228643
2015-02-10 01:06:14 +00:00
David Majnemer 93c22a45be X86: Emit an ABI compliant prologue and epilogue for Win64
Win64 has specific contraints on what valid prologues and epilogues look
like.  This constraint is born from the flexibility and descriptiveness
of Win64's unwind opcodes.

Prologues previously emitted by LLVM could not be represented by the
unwind opcodes, preventing operations powered by stack unwinding to
successfully work.

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

llvm-svn: 228641
2015-02-10 00:57:42 +00:00
Duncan P. N. Exon Smith 01fc176977 IR: Add specialized debug info metadata nodes
Add specialized debug info metadata nodes that match the `DIDescriptor`
wrappers (used by `DIBuilder`) closely.  Assembly and bitcode support to
follow soon (it'll mostly just be obvious), but this sketches in today's
schema.  This is the first big commit (well, the only *big* one aside
from the testcase changes that'll come when I move this into place) for
PR22464.

I've marked a bunch of obvious changes as `TODO`s in the source; I plan
to make those changes promptly after this hierarchy is moved underneath
`DIDescriptor`, but for now I'm aiming mostly to match the status quo.

llvm-svn: 228640
2015-02-10 00:52:32 +00:00
Chaoren Lin be270c1c60 Add JSON.cpp to CMakeLists.txt
llvm-svn: 228639
2015-02-10 00:47:43 +00:00
Eric Christopher d49868080e Migrate PPCAsmPrinter's subtarget from reference to pointer in
preparation for making it MachineFunction dependent.

llvm-svn: 228638
2015-02-10 00:44:17 +00:00
Lang Hames b96afab184 [Orc] Back out one of the GCC ICE workarounds from r228568. NFC.
llvm-svn: 228637
2015-02-10 00:37:26 +00:00
Enrico Granata 89fdc9a61e Add a JSON producer to LLDB - this is a set of classes that encapsulate JSON objects and allow you to write them to a Stream for subsequent processing
Using this JSON producer, write a little tool that expands its own command-line arguments and dumps them to stdout as a JSON array

llvm-svn: 228636
2015-02-10 00:30:07 +00:00
David Blaikie 36a036909c Fix the clang -Werror build (-Wunused-variable)
llvm-svn: 228635
2015-02-10 00:16:36 +00:00
Philip Reames 7e7dc3e9df Adjust how we avoid poll insertion inside the poll function (NFC)
I realized that my early fix for this was overly complicated.  Rather than scatter checks around in a bunch of places, just exit early when we visit the poll function itself.

Thinking about it a bit, the whole inlining mechanism used with gc.safepoint_poll could probably be cleaned up a bit.  Originally, poll insertion was fused with gc relocation rewriting.  It might be worth going back to see if we can simplify the chain of events now that these two are seperated.  As one thought, maybe it makes sense to rewrite calls inside the helper function before inlining it to the many callers.  This would require us to visit the poll function before any other functions though..

llvm-svn: 228634
2015-02-10 00:04:53 +00:00
Aaron Ballman 6e82ddc5b4 Reverting r228628; it broke at least one builder due to the forward declare of RaiseException.
llvm-svn: 228633
2015-02-10 00:00:54 +00:00
Adrian Prantl 34e7590e0d Debug info: When updating debug info during SROA, do not emit debug info
for any padding introduced by SROA. In particular, do not emit debug info
for an alloca that represents only the padding introduced by a previous
iteration.

Fixes PR22495.

llvm-svn: 228632
2015-02-09 23:57:22 +00:00
Adrian Prantl 27bd01f71c Debug info: Use DW_OP_bit_piece instead of DW_OP_piece in the
intermediate representation. This
- increases consistency by using the same granularity everywhere
- allows for pieces < 1 byte
- DW_OP_piece didn't actually allow storing an offset.

Part of PR22495.

llvm-svn: 228631
2015-02-09 23:57:15 +00:00
Colin LeMahieu 328b1633d7 [Hexagon] Adding missing load instructions and removing an unused multiclass parameter.
llvm-svn: 228630
2015-02-09 23:45:24 +00:00
Duncan P. N. Exon Smith 68312e19d8 ADT: Allow up to 18 arguments in hash_combine()
I just realized that the specialized metadata node patch I'm about to
commit won't compile on old compilers.  Bump `hash_combine()`'s support
for non-variadic templates to 18 (I tested this by reversing the logic
in the #ifdef).

llvm-svn: 228629
2015-02-09 23:21:05 +00:00
Aaron Ballman d302354715 On Windows, we now use RaiseException to generate the kind of trap we require (one which calls our vectored exception handler), and fall back to using a volatile write to simulate a trap elsewhere.
llvm-svn: 228628
2015-02-09 23:11:39 +00:00
Colin LeMahieu 4282e7cffd [Hexagon] Factoring classes out of some load patterns and deleting some unused ones.
llvm-svn: 228627
2015-02-09 23:05:44 +00:00
Ramkumar Ramachandra 3edf74fe29 [Statepoint] Improve two asserts, fix some style (NFC)
Summary:
It's important that our users immediately know what gc.safepoint_poll
is. Also fix the style of the declaration of CreateGCStatepoint, in
preparation for another change that will wrap it.

Reviewers: reames

Subscribers: llvm-commits

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

llvm-svn: 228626
2015-02-09 23:02:10 +00:00
Ramkumar Ramachandra 2e4b9e0a37 PlaceSafepoints: modernize gc.result.* -> gc.result
Differential Revision: http://reviews.llvm.org/D7516

llvm-svn: 228625
2015-02-09 23:00:40 +00:00
Gabor Horvath c18a11397c [Static Analyzer] The name of the checker that reports a bug is added
to the plist output. This check_name field does not guaranteed to be the
same as the name of the checker in the future.

Reviewer: Anna Zaks

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

llvm-svn: 228624
2015-02-09 22:52:26 +00:00
Duncan P. N. Exon Smith b407bb2789 DebugInfo: Remove DW_TAG_constant
Remove handling for DW_TAG_constant.  We started producing it in
r110656, but reverted that in r110876 without dropping the support.
Finish the job.

llvm-svn: 228623
2015-02-09 22:48:04 +00:00
Philip Reames d4a912fefd Update file comment to clarify points highlighted in review (NFC)
llvm-svn: 228621
2015-02-09 22:44:03 +00:00
Philip Reames a29de87ea4 Use range for loops in PlaceSafepoints (NFC)
llvm-svn: 228620
2015-02-09 22:26:11 +00:00
Duncan P. N. Exon Smith bd75ad4d0c IR: Take uint64_t in DIBuilder::createExpression()
`DIExpression` deals with `uint64_t`, so it doesn't make sense that
`createExpression()` is created from `int64_t`.  Switch to `uint64_t` to
unify them.

I've temporarily left in the `int64_t` version, which forwards to the
`uint64_t` version.  I'll delete it once I've updated the callers.

llvm-svn: 228619
2015-02-09 22:13:27 +00:00
Philip Reames 0edbf2e407 Introduce more tests for PlaceSafepoints
These tests the two optimizations for backedge insertion currently implemented and the split backedge flag which is currently off by default.

llvm-svn: 228617
2015-02-09 22:10:15 +00:00
Chris Bieneman 9d9da0d64e Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit add62ac537d8249fa2161405066e318ca80e199d.

llvm-svn: 228616
2015-02-09 22:07:49 +00:00
Chris Bieneman 1fadecadf9 Raising minimum required CMake version to 2.8.12.2.
llvm-svn: 228615
2015-02-09 22:05:07 +00:00
Colin LeMahieu 4fd203d3e1 [Hexagon] Removing more V4 predicates since V4 is the required minimum.
llvm-svn: 228614
2015-02-09 21:56:37 +00:00
Ben Langmuir 541c202be8 Be more conservative about gethostname()'s truncating behaviour
Don't assume it will provide an error or null-terminate the string on
truncation, since POSIX doesn't guarantee either behaviour (although
Linux and Darwin at least will do the 'right thing').

llvm-svn: 228613
2015-02-09 21:55:44 +00:00
Philip Reames 5fc82fd6b5 Minor test cleanup
a) add gc attribute
b) remove unused param

llvm-svn: 228612
2015-02-09 21:50:31 +00:00
Ramkumar Ramachandra 82ab65c7cd MemDerefPrinter: Require DataLayoutPass for higher accuracy
Without a valid data layout, deferenceable(N) doesn't get parsed or
propagated. Since this is the key item we are testing, add a dependency
on the pass.

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

llvm-svn: 228611
2015-02-09 21:50:03 +00:00
Philip Reames b1ed02f728 Add basic tests for PlaceSafepoints
This is just adding really simple tests which should have been part of the original submission.  When doing so, I discovered that I'd mistakenly removed required pieces when preparing the patch for upstream submission.  I fixed two such bugs in this submission.

llvm-svn: 228610
2015-02-09 21:48:05 +00:00
Duncan P. N. Exon Smith ac3ed7afc9 Verifier: Const-qualify Metadata, NFC
llvm-svn: 228609
2015-02-09 21:30:05 +00:00
Duncan P. N. Exon Smith 950d8dfb04 IR: Document horrible abuse of loose DIDescriptor, NFC
I'll circle back and fix this somehow; for now I just don't want to
forget about it.

llvm-svn: 228608
2015-02-09 21:26:34 +00:00
Duncan P. N. Exon Smith 43e53ccc0d IR: Remove dead code in DITemplate*
These are never referenced or filled in.

llvm-svn: 228607
2015-02-09 21:23:34 +00:00
Ramkumar Ramachandra a7343d65f4 isDereferenceablePointer: look through gc.relocate calls
While a theoretical GC might change dereferenceability on collection,
there is no such known collector and no need to account for the case
with a flag yet.

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

llvm-svn: 228606
2015-02-09 21:08:03 +00:00
Colin LeMahieu 641c24b9bf [Hexagon] Removing v2-4 flags. V4 is the minimum supported version.
llvm-svn: 228605
2015-02-09 21:07:35 +00:00
Ben Langmuir 1daf480146 Diagnose timeouts in the LockFileManager and delete the dead lock file
If the lock file manager times out, we should give an error rather than
silently trying to load the existing module.  And delete the
(presumably) dead lock file, since it will otherwise prevent progress in
future invokations. This is unsound since we have no way to prove that
the lock file we are deleting is the same one we timed out on, but since
the lock is only to avoid excessive rebuilding anyway it should be okay.
Depends on llvm r228603.

llvm-svn: 228604
2015-02-09 20:35:13 +00:00
Ben Langmuir d2d52de229 Reduce the LockFileManager timeout, and provide unsafeRemoveLockFile
5 minutes is an eternity, so try to strike a better balance between
waiting long enough for any reasonable module build and not so long that
users kill the process because they think it's hanging.

Also give the client a way to delete the lock file after a timeout.

llvm-svn: 228603
2015-02-09 20:34:24 +00:00
Colin LeMahieu 955c4ff9c3 [Hexagon] Factoring classes out of store patterns.
llvm-svn: 228602
2015-02-09 20:33:46 +00:00
Ben Langmuir 9be5d1ece8 Update r228592 for when gethostname() returns an error
If gethostname() is not successful, just skip adding the hostname to the
module hash.  And don't bother setting hostname[255] = 0, since if
gethostname() is successful, it will be null-terminated already (and if
it's not successful we don't read the string now.

llvm-svn: 228601
2015-02-09 20:13:11 +00:00
Colin LeMahieu ab5a8d6070 [Hexagon] Formatting v5 TD file. Removing commented defs.
llvm-svn: 228598
2015-02-09 20:03:42 +00:00
Ramkumar Ramachandra 010b77c3a2 MemDepPrinter: cleanup a few loops (NFC)
Make use of the newly introduced inst_range to clean up two loops. Clean
up a third one while at it.

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

llvm-svn: 228596
2015-02-09 19:49:54 +00:00
Sanjoy Das bc4ab6ee7b Address post-commit review for rL228587: make it explicit that the
<NW> bit of a SCEVAddRecExpr does not depend on the sign of the step
and the start value of the step.

llvm-svn: 228595
2015-02-09 19:39:00 +00:00