Commit Graph

189945 Commits

Author SHA1 Message Date
David Blaikie 9098487213 Revert "Reapply debug info changes now that more precise column information is available."
While the clang patch is reverted pending investigation/fixes.

This reverts commit r225001.

llvm-svn: 225560
2015-01-09 23:27:12 +00:00
Nico Weber beb03938e9 clang-format: [Java] Support formatting qualified annotations.
llvm-svn: 225559
2015-01-09 23:25:06 +00:00
Alexey Samsonov 29e464f0df Fix UBSan error reports in ValueMapCallbackVH and AssertingVH<T> empty/tombstone keys generation.
Summary:
One more attempt to fix UBSan reports: make sure DenseMapInfo::getEmptyKey()
and DenseMapInfo::getTombstoneKey() doesn't do any upcasts/downcasts to/from Value*.

Test Plan: check-llvm test suite with/without UBSan bootstrap

Reviewers: chandlerc, dexonsmith

Subscribers: llvm-commits, majnemer

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

llvm-svn: 225558
2015-01-09 23:17:25 +00:00
Alexey Samsonov 55acbc071c Disable Go bindings test under UBSan.
llvm-svn: 225557
2015-01-09 23:17:23 +00:00
Alexey Samsonov 95674c8181 Remove AsanInterceptsSignal in favor of (equivalent) IsDeadlySignal.
llvm-svn: 225556
2015-01-09 23:03:31 +00:00
David Blaikie f353d3ecd0 Revert "DebugInfo: Generalize debug info location handling" and related commits
This reverts commit r225000, r225021, r225083, r225086, r225090.

The root change (r225000) still has several issues where it's caused
calls to be emitted without debug locations. This causes assertion
failures if/when those calls are inlined.

I'll work up some test cases and fixes before recommitting this.

llvm-svn: 225555
2015-01-09 23:00:28 +00:00
Andrew Kaylor a10379ad49 Fix the JIT event listeners and replace the associated tests.
The changes to EventListenerCommon.h were contributed by Arch Robison.

This fixes bug 22095.

http://reviews.llvm.org/D6905

llvm-svn: 225554
2015-01-09 22:53:24 +00:00
Michael Zolotukhin d9ade185b9 Update comment.
llvm-svn: 225553
2015-01-09 22:15:06 +00:00
Hans Wennborg dcc6e5bc03 SimplifyCFG: check uses of constant-foldable instrs in switch destinations (PR20210)
The previous code assumed that such instructions could not have any uses
outside CaseDest, with the motivation that the instruction could not
dominate CommonDest because CommonDest has phi nodes in it. That simply
isn't true; e.g., CommonDest could have an edge back to itself.

llvm-svn: 225552
2015-01-09 22:13:31 +00:00
Simon Pilgrim ec1f2c2cab [X86][SSE] Avoid vector byte shuffles with zero by using pshufb to create zeros
pshufb can shuffle in zero bytes as well as bytes from a source vector - we can use this to avoid having to shuffle 2 vectors and ORing the result when the used inputs from a vector are all zeroable.

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

llvm-svn: 225551
2015-01-09 22:03:19 +00:00
Kevin Enderby 0512bd75f7 Fix an ASAN failure introduced with r225537 (adding the -universal-headers to llvm-obdump).
And a fly by fix to some formatting issues with the same commit.

llvm-svn: 225550
2015-01-09 21:55:03 +00:00
Stephane Sezer 24a14c93e6 Modify dotest.py to be able to run without an lldb build.
Summary: This will ease llgs development a bit by not requiring an lldb/lldb.py build to launch the tests. Also, we can now use LLDB_DEBUGSERVER_PATH to point to a debug server to use to run the tests. I used that to point to a ds2 build and run llgs tests against ds2.

Reviewers: clayborg, tfiala, vharron

Subscribers: lldb-commits

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

llvm-svn: 225549
2015-01-09 21:54:27 +00:00
Zachary Turner f16ae603e8 Fix issues with LLDB's interpreter and MS ABI guard variables.
MS ABI guard variables end with @4IA, so this patch teaches the
interpreter about that.  Additionally, there was an issue with
TurnGuardLoadIntoZero which was causing some guard uses of a
variable to be missed.  This fixes that by calling
Instruction::replaceAllUsesWith() instead of trying to replicate
that function.

llvm-svn: 225547
2015-01-09 21:12:22 +00:00
Kostya Serebryany 96fc9a2537 [sanitizer] use the right memory order
llvm-svn: 225546
2015-01-09 21:01:34 +00:00
Rafael Espindola 1ea49d1bdd Add a testcase of llvm-lto error handling.
llvm-svn: 225545
2015-01-09 20:55:09 +00:00
Michael Zolotukhin 1c38bc12de Remove duplicating code. NFC.
The removed condition is checked in the previous loop.

llvm-svn: 225542
2015-01-09 20:36:19 +00:00
Marshall Clow e21582e742 Walter Brown sent a list of tests which needed 'additional includes' to match what was in the standard. Added these includes to the tests. No changes to the library or test results.
llvm-svn: 225541
2015-01-09 20:25:52 +00:00
Zachary Turner 898e10e4d3 Change int32_t to uint32_t to fix warnings.
Variable was being declared as signed, but treated as unsigned at
every point of use.

Patch by Dan Sinclair
Differential Revision: http://reviews.llvm.org/D6897

llvm-svn: 225540
2015-01-09 20:15:21 +00:00
Zachary Turner 225cc30afe Change auto to size_t to fix warning.
Patch by Dan Sinclair
Differential Revision: http://reviews.llvm.org/D6899

llvm-svn: 225539
2015-01-09 20:15:03 +00:00
Enrico Granata 3f7f2077c3 Make the list of synthetic children thread safe
I have been seeing a few crashes where LLDB tries to acquire a cached synthetic child by index, and crashes in the ClusterManager obtaining a shared_ptr for that ValueObject
That kind of crash most often means that I am holding on to a raw pointer to a ValueObject that was let go from the cluster

The main way that could happen is that the synthetic provider is being updated at the same time that some child is being accessed from the previous provider state

This fixes the problem by making the children be stored in a thread-safe map

Fixes rdar://18627964

llvm-svn: 225538
2015-01-09 19:47:45 +00:00
Kevin Enderby 131d1770f6 Add the option, -universal-headers, used with -macho to print the Mach-O universal headers to llvm-objdump.
llvm-svn: 225537
2015-01-09 19:22:37 +00:00
Tim Northover eb16112e97 Re-reapply r221924: "[GVN] Perform Scalar PRE on gep indices that feed loads before
doing Load PRE"

It's not really expected to stick around, last time it provoked a weird LTO
build failure that I can't reproduce now, and the bot logs are long gone. I'll
re-revert it if the failures recur.

Original description: Perform Scalar PRE on gep indices that feed loads before
doing Load PRE.

llvm-svn: 225536
2015-01-09 19:19:56 +00:00
Greg Clayton b547278cae Fixed an issue where you couldn't delete a user defined regex, python, or multi-word command by adding a new "command delete" command.
This new command will delete user defined regular commands, but not aliases. We still have "command unalias" to remove aliases as they are currently in different buckets. Appropriate error messages are displayed to inform the user when "command unalias" is used on removable user defined commands that points users to the "command delete" command.

Added a test to verify we can remove user defined commands and also verify that "command unalias" fails when used on a user defined command.
<rdar://problem/18248300>

llvm-svn: 225535
2015-01-09 19:08:20 +00:00
Lang Hames 1e923ec122 Recommit r224935 with a fix for the ObjC++/AArch64 bug that that revision
introduced.

A test case for the bug was already committed in r225385.

Patch by Rafael Espindola.

llvm-svn: 225534
2015-01-09 18:55:42 +00:00
David Majnemer d527199c37 Parse: Don't crash when an annotation token shows up in a C++11 attr
It's not safe to blindly call getIdentifierInfo without checking the
token is not an annotation token.

llvm-svn: 225533
2015-01-09 18:09:39 +00:00
Dan Albert 2bcfc6f95e [libc++] Refactor test components into modules.
Summary:
I've moved the bulk of `lit.cfg` into `test/libcxx/testconfig.py` and
`test/libcxx/testformat.py`. All that remains in `lit.cfg` is the
logic to discover lit.site.cfg if lit.cfg was run directly, and the
logic for loading configuration variants.

The configuration variant flow has changed with this patch. Rather
than instantiating an object of type `<VARIANT>Configuration`, we now
instatiate an object of type `Configuration` that was loaded from the
module `<VARIANT>.testconfig.py`.

This has to be done on a per-project basis rather than in LIT itself
because LIT doesn't actually know where the real test directory is,
only where the site configuration is (which is usually in the output
directory). It's simple enough to do though, so it's fine to require
each project to do it themselves.

I also cleaned up all the pylint issues while I was here, which was
mostly just a matter of fixing long lines.

Reviewers: mclow.lists, jroelofs, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

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

llvm-svn: 225532
2015-01-09 18:03:29 +00:00
Duncan P. N. Exon Smith 9ed19665bb Revert "Bitcode: Move the DEBUG_LOC record to DEBUG_LOC_OLD"
This reverts commit r225498 (but leaves r225499, which was a worthy
cleanup).

My plan was to change `DEBUG_LOC` to store the `MDNode` directly rather
than its operands (patch was to go out this morning), but on reflection
it's not clear that it's strictly better.  (I had missed that the
current code is unlikely to emit the `MDNode` at all.)

Conflicts:
	lib/Bitcode/Reader/BitcodeReader.cpp (due to r225499)

llvm-svn: 225531
2015-01-09 17:53:27 +00:00
Hans Wennborg a7707220e3 Driver: tweak the code for determining default image name
It seemed odd to have to make DefaultImageName be a mutable member of Driver.
We don't need to the full result of computeTargetTriple() to determine the
image name; just base it on DefaultTargetTriple.

llvm-svn: 225530
2015-01-09 17:38:53 +00:00
Daniel Sanders 1440bb2a26 [mips] Add support for accessing $gp as a named register.
Summary:
Mips Linux uses $gp to hold a pointer to thread info structure and accesses it
with a named register. This makes this work for LLVM.

The N32 ABI doesn't quite work yet since the frontend generates incorrect IR
for this case. It neglects to truncate the 64-bit GPR to a 32-bit value before
converting to a pointer. Given correct IR (as in the testcase in this patch),
it works correctly.

Reviewers: sstankovic, vmedic, atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

llvm-svn: 225529
2015-01-09 17:21:30 +00:00
Sanjay Patel 2ce8169ed3 fix typos; remove names from comments; NFC
llvm-svn: 225528
2015-01-09 17:11:51 +00:00
Marshall Clow 3e33d11b06 K-Ballo found a place where we were using 'V' as a template parameter. Replace with '_Vp' for protection against user-defined macros.
llvm-svn: 225527
2015-01-09 17:03:36 +00:00
Sanjay Patel 2a385e2494 remove names from comments; NFC
llvm-svn: 225526
2015-01-09 16:47:20 +00:00
Sanjay Patel 938e279082 fix typos; NFC
llvm-svn: 225525
2015-01-09 16:35:37 +00:00
Sanjay Patel e6e58c1a9e fix typo; NFC
llvm-svn: 225524
2015-01-09 16:29:50 +00:00
Sanjay Patel d729115fa7 more efficient use of a dyn_cast; no functional change intended
llvm-svn: 225523
2015-01-09 16:28:15 +00:00
Hal Finkel b359b735d6 [PowerPC] Enable late partial unrolling on the POWER7
The P7 benefits from not have really-small loops so that we either have
multiple dispatch groups in the loop and/or the ability to form more-full
dispatch groups during scheduling. Setting the partial unrolling threshold to
44 seems good, empirically, for the P7. Compared to using no late partial
unrolling, this yields the following test-suite speedups:

SingleSource/Benchmarks/Adobe-C++/simple_types_constant_folding
	-66.3253% +/- 24.1975%
SingleSource/Benchmarks/Misc-C++/oopack_v1p8
	-44.0169% +/- 29.4881%
SingleSource/Benchmarks/Misc/pi
	-27.8351% +/- 12.2712%
SingleSource/Benchmarks/Stanford/Bubblesort
	-30.9898% +/- 22.4647%

I've speculatively added a similar setting for the P8. Also, I've noticed that
the unroller does not quite calculate the unrolling factor correctly for really
tiny loops because it neglects to account for the fact that not every loop body
replicant contains an ending branch and counter increment. I'll fix that later.

llvm-svn: 225522
2015-01-09 15:51:16 +00:00
Toma Tabacu 68e8a9c0dd [mips] Add comment which explains why we need to change the assembler options before and after inline asm blocks. NFC.
llvm-svn: 225521
2015-01-09 15:00:30 +00:00
Daniel Jasper 02c9153009 clang-tidy: [misc-use-override] Simplify regular expressions in test.
No functional changes.

llvm-svn: 225520
2015-01-09 14:10:15 +00:00
Daniel Jasper e73cfbf6ba clang-tidy: [misc-use-override] Fix 'override' insertion.
Before:
  void f() __attribute__((override unused))

After:
  void f() override __attribute__((unused))

llvm-svn: 225519
2015-01-09 13:56:35 +00:00
David Majnemer 0fe3f4d731 Sema: Don't crash when variable is redefined as a constexpr function
We have a diagnostic describing that constexpr changed in C++14 when
compiling in C++11 mode.  While doing this, it examines the previous
declaration and assumes that it is a function.  However it is possible,
in the context of error recovery, for this to not be the case.

llvm-svn: 225518
2015-01-09 10:33:23 +00:00
Suyog Sarda 85d0473650 Assumption that "VectorizedValue" will always be an Instruction is not correct.
It can be a constant or a vector argument.

ex :

define i32 @hadd(<4 x i32> %a) #0 {
entry:
  %vecext = extractelement <4 x i32> %a, i32 0
  %vecext1 = extractelement <4 x i32> %a, i32 1
  %add = add i32 %vecext, %vecext1
  %vecext2 = extractelement <4 x i32> %a, i32 2
  %add3 = add i32 %add, %vecext2
  %vecext4 = extractelement <4 x i32> %a, i32 3
  %add5 = add i32 %add3, %vecext4
  ret i32 %add5
}

llvm-svn: 225517
2015-01-09 10:23:48 +00:00
Manuel Klimek 949ff4d9f2 Add the shifted cursor position to XML output, so it can be used by editor integrations.
llvm-svn: 225516
2015-01-09 10:03:47 +00:00
Olivier Goffart aabcb80096 Fix test from my previous commit
(I should have re-run the test after running clang-format)

llvm-svn: 225515
2015-01-09 09:42:32 +00:00
David Majnemer 02e764487f Parse: Don't crash when namespace is in GNU statement expr
Parser::ParseNamespace can get a little confused when it found itself
inside a compound statement inside of a non-static data member
initializer.

Try to determine that the statement expression's scope makes sense
before trying to parse it's contents.

llvm-svn: 225514
2015-01-09 09:38:14 +00:00
Olivier Goffart ed13fab4bc Fix crash in typo correction while correcting enum within a struct in C
llvm-svn: 225513
2015-01-09 09:37:26 +00:00
Tobias Grosser 0a092763e7 Adjust test for the new 'distinct' metadata nodes
'distinct' was introduced in 225474. We now adjust the test cases
to match for the additional 'distinct' marker.

llvm-svn: 225512
2015-01-09 08:10:36 +00:00
David Majnemer aa30dd7497 Sema: RecordDecl shouldn't have a FunctionDecl as a Decl
RecordDecls should have things like CXXMethodDecls or FriendDecls as a
decl but not things like FunctionDecls.

llvm-svn: 225511
2015-01-09 07:36:13 +00:00
Saleem Abdulrasool b68fa3b576 ARM: add support for R_ARM_ABS16
Add support for R_ARM_ABS16 relocation mapping.  Addresses PR22156.

llvm-svn: 225510
2015-01-09 06:57:24 +00:00
Saleem Abdulrasool 3e81ecfeb6 test: add additional test for SVN r225507
Add an additional test case to ensure that we generate the relocation even if
the thumb target is used.

llvm-svn: 225509
2015-01-09 06:57:18 +00:00
David Majnemer 8c6db7056a Sema: Don't crash when specializing a global scope function in a class
We assumed that class-scope specializations would result in a
CXXMethodDecl for that class.  However, globally qualified functions
will result in normal FunctionDecls.

llvm-svn: 225508
2015-01-09 06:10:21 +00:00