platform/upstream/llvm.git
9 years ago[compiler-rt] Make the MSAN wmemset intercepter call wmemset instead of memset. Fixes...
Eric Fiselier [Mon, 24 Nov 2014 18:17:04 +0000 (18:17 +0000)]
[compiler-rt] Make the MSAN wmemset intercepter call wmemset instead of memset. Fixes PR 21579

Summary:
Exactly what the title says. I've tested this change against the libc++ test failures and it solves all of them. The check-msan rule also still passes.
I'm not sure why it called memset originally.

I can add tests if requested but currently there are no tests involving wide chars and they are a c++11 features.

Reviewers: kcc, eugenis

Reviewed By: eugenis

Subscribers: llvm-commits

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

llvm-svn: 222673

9 years ago[PowerPC] Fix PR 21652 - copy st_other bits on symbol assignment
Ulrich Weigand [Mon, 24 Nov 2014 18:09:47 +0000 (18:09 +0000)]
[PowerPC] Fix PR 21652 - copy st_other bits on symbol assignment

When processing an assignment in the integrated assembler that sets
a symbol to the value of another symbol, we need to copy the st_other
bits that encode the local entry point offset.

Modeled after MipsTargetELFStreamer::emitAssignment handling of the
ELF::STO_MIPS_MICROMIPS flag.

llvm-svn: 222672

9 years agoMore long path name support on Windows, this time in program execution.
Paul Robinson [Mon, 24 Nov 2014 18:05:29 +0000 (18:05 +0000)]
More long path name support on Windows, this time in program execution.
Allows long paths for the executable and redirected stdin/stdout/stderr.
Addresses PR21563.

llvm-svn: 222671

9 years ago[Hexagon] Adding asrh instruction, removing unused multiclasses.
Colin LeMahieu [Mon, 24 Nov 2014 18:04:42 +0000 (18:04 +0000)]
[Hexagon] Adding asrh instruction, removing unused multiclasses.

llvm-svn: 222670

9 years ago[Hexagon] Adding aslh instruction.
Colin LeMahieu [Mon, 24 Nov 2014 17:44:19 +0000 (17:44 +0000)]
[Hexagon] Adding aslh instruction.

llvm-svn: 222668

9 years agoReverting r222646; the tests do not pass on Windows. Also reverts r222664, which...
Aaron Ballman [Mon, 24 Nov 2014 17:39:44 +0000 (17:39 +0000)]
Reverting r222646; the tests do not pass on Windows. Also reverts r222664, which was required for r222646 to compile with Visual Studio 2012.

llvm-svn: 222667

9 years agoFix line endings
Nico Rieck [Mon, 24 Nov 2014 17:29:52 +0000 (17:29 +0000)]
Fix line endings

llvm-svn: 222666

9 years agoFix crash when using __if_exists in C mode
Nico Rieck [Mon, 24 Nov 2014 17:29:35 +0000 (17:29 +0000)]
Fix crash when using __if_exists in C mode

llvm-svn: 222665

9 years agoUnbreaking the MSVC 2012 build; however, these tests still fail on Windows.
Aaron Ballman [Mon, 24 Nov 2014 17:22:32 +0000 (17:22 +0000)]
Unbreaking the MSVC 2012 build; however, these tests still fail on Windows.

llvm-svn: 222664

9 years ago[Hexagon] Adding zxth instruction.
Colin LeMahieu [Mon, 24 Nov 2014 17:11:34 +0000 (17:11 +0000)]
[Hexagon] Adding zxth instruction.

llvm-svn: 222662

9 years agoAdding const iterator to MCInst. http://reviews.llvm.org/D6359
Colin LeMahieu [Mon, 24 Nov 2014 16:50:40 +0000 (16:50 +0000)]
Adding const iterator to MCInst. reviews.llvm.org/D6359

llvm-svn: 222661

9 years ago[Hexagon] Adding zxtb instruction.
Colin LeMahieu [Mon, 24 Nov 2014 16:48:43 +0000 (16:48 +0000)]
[Hexagon] Adding zxtb instruction.

llvm-svn: 222660

9 years agoInstCombine: Don't create an unused instruction
David Majnemer [Mon, 24 Nov 2014 16:41:13 +0000 (16:41 +0000)]
InstCombine: Don't create an unused instruction

We would create an instruction but not inserting it.
Not inserting the unused instruction would lead us to verification
failure.

This fixes PR21653.

llvm-svn: 222659

9 years ago[mips][microMIPS] Fix JRADDIUSP instruction
Jozef Kolek [Mon, 24 Nov 2014 16:14:10 +0000 (16:14 +0000)]
[mips][microMIPS] Fix JRADDIUSP instruction

Fix JRADDIUSP instruction, remove delay slot flag because this instruction
doesn't have delay slot.

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

llvm-svn: 222658

9 years agoReverting r222638; it broke the MSVC build bots because Visual Studio 2012 does not...
Aaron Ballman [Mon, 24 Nov 2014 15:42:34 +0000 (15:42 +0000)]
Reverting r222638; it broke the MSVC build bots because Visual Studio 2012 does not support variadic templates. Also reverting r222641 because it was relying on 222638.

llvm-svn: 222656

9 years agoFix lldb(1) man page formatting
Ed Maste [Mon, 24 Nov 2014 15:01:11 +0000 (15:01 +0000)]
Fix lldb(1) man page formatting

- Use canonical date order (per groff & mandoc)
- Fix capitalization on one .Nm
- Remove EOL whitespace

Patch by Baptiste Daroussin in FreeBSD svn r274927.

llvm-svn: 222655

9 years agoAdded comment about llvm_execute_on_thread waiting for thread to complete.
Yaron Keren [Mon, 24 Nov 2014 14:51:41 +0000 (14:51 +0000)]
Added comment about llvm_execute_on_thread waiting for thread to complete.

llvm-svn: 222654

9 years ago[mips][microMIPS] Implement LBU16, LHU16, LW16, SB16, SH16 and SW16 instructions
Jozef Kolek [Mon, 24 Nov 2014 14:39:13 +0000 (14:39 +0000)]
[mips][microMIPS] Implement LBU16, LHU16, LW16, SB16, SH16 and SW16 instructions

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

llvm-svn: 222653

9 years ago[mips][microMIPS] Implement 16-bit instructions registers including ZERO instead...
Jozef Kolek [Mon, 24 Nov 2014 14:25:53 +0000 (14:25 +0000)]
[mips][microMIPS] Implement 16-bit instructions registers including ZERO instead of S0

Implement microMIPS 16-bit instructions register set: $0, $2-$7 and $17.

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

llvm-svn: 222652

9 years ago[Mips] Update MIPS relocations list
Simon Atanasyan [Mon, 24 Nov 2014 14:17:33 +0000 (14:17 +0000)]
[Mips] Update MIPS relocations list

No functional changes.

llvm-svn: 222651

9 years agoReplace a comment that says 'unreachable' with llvm_unreachable in TableGen AsmWriter...
Craig Topper [Mon, 24 Nov 2014 14:09:52 +0000 (14:09 +0000)]
Replace a comment that says 'unreachable' with llvm_unreachable in TableGen AsmWriter output.

llvm-svn: 222650

9 years agoRemoving a variable that is initialized but never read. The original author has been...
Aaron Ballman [Mon, 24 Nov 2014 14:03:16 +0000 (14:03 +0000)]
Removing a variable that is initialized but never read. The original author has been alerted to the warning, in case this variable is meant to be used. Fixes -Werror builds in the meantime.

llvm-svn: 222649

9 years ago[mips][microMIPS] Implement disassembler support for 16-bit instructions
Jozef Kolek [Mon, 24 Nov 2014 13:29:59 +0000 (13:29 +0000)]
[mips][microMIPS] Implement disassembler support for 16-bit instructions

With the help of new method readInstruction16() two bytes are read and
decodeInstruction() is called with DecoderTableMicroMips16, if this fails
four bytes are read and decodeInstruction() is called with
DecoderTableMicroMips32.

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

llvm-svn: 222648

9 years ago[X86] Improved target specific combine on VSELECT dag nodes.
Andrea Di Biagio [Mon, 24 Nov 2014 12:23:15 +0000 (12:23 +0000)]
[X86] Improved target specific combine on VSELECT dag nodes.

This patch teaches function 'transformVSELECTtoBlendVECTOR_SHUFFLE' how to
convert VSELECT dag nodes to shuffles on targets that do not have SSE4.1.
On pre-SSE4.1 targets, we can still perform blend operations using movss/movsd.

Also, removed a target specific combine that performed a premature lowering of
VSELECT nodes to target specific MOVSS/MOVSD nodes.

llvm-svn: 222647

9 years agoAdding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName
Manuel Klimek [Mon, 24 Nov 2014 09:10:56 +0000 (09:10 +0000)]
Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName

Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.

The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.

Patch by Hendrik von Prince.

llvm-svn: 222646

9 years agoInstCombine: Don't assume DataLayout is always available
David Majnemer [Mon, 24 Nov 2014 07:26:20 +0000 (07:26 +0000)]
InstCombine: Don't assume DataLayout is always available

We tried to get the result of DataLayout::getLargestLegalIntTypeSize but
we didn't have a DataLayout.  This resulted in opt crashing.

This fixes PR21651.

llvm-svn: 222645

9 years agoSupport: Add *cast_or_null<> for pointer wrappers
Duncan P. N. Exon Smith [Mon, 24 Nov 2014 03:13:02 +0000 (03:13 +0000)]
Support: Add *cast_or_null<> for pointer wrappers

Fill in omission of `cast_or_null<>` and `dyn_cast_or_null<>` for types
that wrap pointers (e.g., smart pointers).

Type traits need to be slightly stricter than for `cast<>` and
`dyn_cast<>` to resolve ambiguities with simple types.

There didn't seem to be any unit tests for pointer wrappers, so I tested
`isa<>`, `cast<>`, and `dyn_cast<>` while I was in there.

This only supports pointer wrappers with a conversion to `bool` to check
for null.  If in the future it's useful to support wrappers without such
a conversion, it should be a straightforward incremental step to use the
`simplify_type` machinery for the null check.  In that case, the unit
tests should be updated to remove the `operator bool()` from the
`pointer_wrappers::PTy`.

llvm-svn: 222644

9 years agoDetect best type for some static index tables instead of just using uint32_t to reduc...
Craig Topper [Mon, 24 Nov 2014 02:08:35 +0000 (02:08 +0000)]
Detect best type for some static index tables instead of just using uint32_t to reduce total data size.

llvm-svn: 222643

9 years agoclang-format: Make short case labels work with #ifs
Daniel Jasper [Sun, 23 Nov 2014 21:45:03 +0000 (21:45 +0000)]
clang-format: Make short case labels work with #ifs

Before:
  switch (a) {
  #if FOO
  case 0: return 0; #endif
  }

After:
  switch (a) {
  #if FOO
  case 0: return 0;
  #endif
  }

This fixed llvm.org/PR21544.

llvm-svn: 222642

9 years agoclang-format: [Java] Treat 'instanceof' like other binary operators.
Daniel Jasper [Sun, 23 Nov 2014 21:34:25 +0000 (21:34 +0000)]
clang-format: [Java] Treat 'instanceof' like other binary operators.

This fixes llvm.org/PR21436.

llvm-svn: 222641

9 years agoclang-format: [Java] Space before array initializers.
Daniel Jasper [Sun, 23 Nov 2014 20:54:37 +0000 (20:54 +0000)]
clang-format: [Java] Space before array initializers.

Before:
  new int[]{1, 2, 3, 4};

After:
  new int[] {1, 2, 3, 4};

llvm-svn: 222640

9 years agoclang-format: Improve ObjC blocks with return type.
Daniel Jasper [Sun, 23 Nov 2014 19:15:35 +0000 (19:15 +0000)]
clang-format: Improve ObjC blocks with return type.

Before:
  Block b = ^int * (A * a, B * b) {}

After:
  Block b = ^int *(A *a, B *b) {}

This fixed llvm.org/PR21619.

llvm-svn: 222639

9 years agoclang-format: Refactoring.
Daniel Jasper [Sun, 23 Nov 2014 19:03:25 +0000 (19:03 +0000)]
clang-format: Refactoring.

Provide more overloads to simplify testing the type of a token. No
functional changes intended.

llvm-svn: 222638

9 years agoclang-format: [JS] Support Closure's module statements.
Daniel Jasper [Sun, 23 Nov 2014 16:46:28 +0000 (16:46 +0000)]
clang-format: [JS] Support Closure's module statements.

These are like import statements and should not be line-wrapped. Minor
restructuring of the handling of other import statements.

llvm-svn: 222637

9 years agoConverted back to Unix format (after my last commit 222632)
Elena Demikhovsky [Sun, 23 Nov 2014 15:21:53 +0000 (15:21 +0000)]
Converted back to Unix format (after my last commit 222632)

llvm-svn: 222636

9 years ago[X86] Fixes bug in build_vector v4x32 lowering
Michael Kuperstein [Sun, 23 Nov 2014 13:09:06 +0000 (13:09 +0000)]
[X86] Fixes bug in build_vector v4x32 lowering

r222375 made some improvements to build_vector lowering of v4x32 and v4xf32 into an insertps, but it missed a case where:

1. A single extracted element is used twice.
2. The lower of the two non-zero indexes should be preserved, and the higher should be used for the dest mask.

This caused a crash, since the source value for the insertps ends-up uninitialized.

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

llvm-svn: 222635

9 years agoAdd missing override keywords.
Craig Topper [Sun, 23 Nov 2014 09:40:13 +0000 (09:40 +0000)]
Add missing override keywords.

llvm-svn: 222634

9 years agoTablegen output formatting fixes.
Craig Topper [Sun, 23 Nov 2014 09:40:10 +0000 (09:40 +0000)]
Tablegen output formatting fixes.

llvm-svn: 222633

9 years agoMasked Vector Load and Store Intrinsics.
Elena Demikhovsky [Sun, 23 Nov 2014 08:07:43 +0000 (08:07 +0000)]
Masked Vector Load and Store Intrinsics.
Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores.
Added SDNodes for masked operations and lowering patterns for X86 code generator.
Examples:
<16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask)
declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask)

Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch.

http://reviews.llvm.org/D6191

llvm-svn: 222632

9 years agoR600: Fix extloads of i1 on R600/Evergreen
Matt Arsenault [Sun, 23 Nov 2014 02:57:54 +0000 (02:57 +0000)]
R600: Fix extloads of i1 on R600/Evergreen

llvm-svn: 222631

9 years agoR600: Fix assert on copy of an i1 on pre-SI
Matt Arsenault [Sun, 23 Nov 2014 02:57:52 +0000 (02:57 +0000)]
R600: Fix assert on copy of an i1 on pre-SI

i1 is not a legal type on Evergreen, so this combine proceeded
and tried to produce a bitcast between i1 and i8.

llvm-svn: 222630

9 years agoR600/SI: Add additional tests for i1 loads
Matt Arsenault [Sun, 23 Nov 2014 02:57:50 +0000 (02:57 +0000)]
R600/SI: Add additional tests for i1 loads

llvm-svn: 222629

9 years agoR600/SI: Fix broken check lines and modernize prefixes
Matt Arsenault [Sun, 23 Nov 2014 02:57:49 +0000 (02:57 +0000)]
R600/SI: Fix broken check lines and modernize prefixes

Use -LABEL and remove -CHECK

llvm-svn: 222628

9 years agoR600/SI: Fix missing -verify-machineinstrs on a test
Matt Arsenault [Sun, 23 Nov 2014 02:57:47 +0000 (02:57 +0000)]
R600/SI: Fix missing -verify-machineinstrs on a test

llvm-svn: 222627

9 years agoCodeGen: tweak struct ABI handling
Saleem Abdulrasool [Sun, 23 Nov 2014 02:16:24 +0000 (02:16 +0000)]
CodeGen: tweak struct ABI handling

Cygwin and MinGW fail to conform to the underlying system's structure passing
ABI.  Make the check more precise to ensure that we correctly generate code for
the itanium environment.

llvm-svn: 222626

9 years agoInstCombine: Propagate exact for (sdiv X, Pow2) -> (udiv X, Pow2)
David Majnemer [Sat, 22 Nov 2014 20:00:41 +0000 (20:00 +0000)]
InstCombine: Propagate exact for (sdiv X, Pow2) -> (udiv X, Pow2)

llvm-svn: 222625

9 years agoInstCombine: Propagate exact for (sdiv X, Y) -> (udiv X, Y)
David Majnemer [Sat, 22 Nov 2014 20:00:38 +0000 (20:00 +0000)]
InstCombine: Propagate exact for (sdiv X, Y) -> (udiv X, Y)

llvm-svn: 222624

9 years agoInstCombine: Propagate exact for (sdiv -X, C) -> (sdiv X, -C)
David Majnemer [Sat, 22 Nov 2014 20:00:34 +0000 (20:00 +0000)]
InstCombine: Propagate exact for (sdiv -X, C) -> (sdiv X, -C)

llvm-svn: 222623

9 years agoTidied up target triple OS detection. NFC
Simon Pilgrim [Sat, 22 Nov 2014 19:12:10 +0000 (19:12 +0000)]
Tidied up target triple OS detection. NFC

Use Triple::isOS*() helper functions where possible.

llvm-svn: 222622

9 years agoReduce size of some tables in tablegen register info output.
Craig Topper [Sat, 22 Nov 2014 18:30:18 +0000 (18:30 +0000)]
Reduce size of some tables in tablegen register info output.

Primarily done by using SequenceToOffsetTable to reduce the register pressure set tables and then sizing the indices into the tables appropriately. Size a few other table entries based on content as well. Reduces X86RegisterInfo.o by ~9k.

llvm-svn: 222621

9 years agoInstCombine: Propagate exact in (udiv (lshr X,C1),C2) -> (udiv x,C1<<C2)
David Majnemer [Sat, 22 Nov 2014 18:16:54 +0000 (18:16 +0000)]
InstCombine: Propagate exact in (udiv (lshr X,C1),C2) -> (udiv x,C1<<C2)

llvm-svn: 222620

9 years agoTry to fix ARM buildbots
Renato Golin [Sat, 22 Nov 2014 16:59:03 +0000 (16:59 +0000)]
Try to fix ARM buildbots

llvm-svn: 222619

9 years agoSupport matching signext attribute in the parallel_num_threads_codegen test to appeas...
Daniel Sanders [Sat, 22 Nov 2014 16:21:18 +0000 (16:21 +0000)]
Support matching signext attribute in the parallel_num_threads_codegen test to appease clang-cmake-mips builder.

The Mips target adds the signext attribute to signed 32-bit integers in order
to support the N32/N64 correctly. Integers must be promoted to 64-bit bit on
these ABI's.

llvm-svn: 222618

9 years agoSupport matching signext attribute in vla-lambda-capturing test to appease clang...
Daniel Sanders [Sat, 22 Nov 2014 16:08:56 +0000 (16:08 +0000)]
Support matching signext attribute in vla-lambda-capturing test to appease clang-cmake-mips builder.

The Mips target adds the signext attribute to signed 32-bit integers in order
to support the N32/N64 correctly. Integers must be promoted to 64-bit bit on
these ABI's.

llvm-svn: 222617

9 years agoCodeGen: Make atomic operations play nice with address spaces
David Majnemer [Sat, 22 Nov 2014 10:44:12 +0000 (10:44 +0000)]
CodeGen: Make atomic operations play nice with address spaces

We were being a little sloppy with our pointer/address space casts.

This fixes PR21643.

llvm-svn: 222615

9 years ago[x86] Teach the vector shuffle yet another step of canonicalization.
Chandler Carruth [Sat, 22 Nov 2014 09:18:53 +0000 (09:18 +0000)]
[x86] Teach the vector shuffle yet another step of canonicalization.

No functionality changed yet, but this will prevent subsequent patches
from having to handle permutations of various interleaved shuffle
patterns.

llvm-svn: 222614

9 years agoInstCombine: Propagate NSW/NUW for X*(1<<Y) -> X<<Y
David Majnemer [Sat, 22 Nov 2014 08:57:02 +0000 (08:57 +0000)]
InstCombine: Propagate NSW/NUW for X*(1<<Y) -> X<<Y

llvm-svn: 222613

9 years agoInstCombine: Propagate NSW for -X * -Y -> X * Y
David Majnemer [Sat, 22 Nov 2014 07:25:19 +0000 (07:25 +0000)]
InstCombine: Propagate NSW for -X * -Y -> X * Y

llvm-svn: 222612

9 years agoInstSimplify: Simplify (sub 0, X) -> X if it's NUW
David Majnemer [Sat, 22 Nov 2014 07:15:16 +0000 (07:15 +0000)]
InstSimplify: Simplify (sub 0, X) -> X if it's NUW

This is a generalization of the X - (0 - Y) -> X transform.

llvm-svn: 222611

9 years agoSimplify MicrosoftMangleContextImpl::shouldMangleStringLiteral
David Majnemer [Sat, 22 Nov 2014 06:20:38 +0000 (06:20 +0000)]
Simplify MicrosoftMangleContextImpl::shouldMangleStringLiteral

No functionality changed.

llvm-svn: 222610

9 years agoInstCombine: Silence a parenthesis warning
David Majnemer [Sat, 22 Nov 2014 06:09:28 +0000 (06:09 +0000)]
InstCombine: Silence a parenthesis warning

llvm-svn: 222609

9 years agoMark 9 lldb unit tests for ubuntu as XFAIL.
Siva Chandra [Sat, 22 Nov 2014 05:55:00 +0000 (05:55 +0000)]
Mark 9 lldb unit tests for ubuntu as XFAIL.

The following lldb unit tests fail check-lldb on ubuntu:

TestDataFormatterStdMap.py
TestDataFormatterStdVBool.py
TestDataFormatterStdVector.py
TestDataFormatterSynthVal.py
TestEvents.py
TestInitializerList.py
TestMemoryHistory.py
TestReportData.py
TestValueVarUpdate.py

These unit test failures are for non-core functionality. The intent is to
reduce the check-lldb FAILS to core functionality FAILS and then circle
back later and fix these FAILS at a later date.

llvm-svn: 222608

9 years ago[x86] Add some tests for a common unpack pattern of vector shuffle that
Chandler Carruth [Sat, 22 Nov 2014 05:44:43 +0000 (05:44 +0000)]
[x86] Add some tests for a common unpack pattern of vector shuffle that
has a remarkably unique and efficient lowering.

While we get this some of the time already, we miss a few cases and
there wasn't a principled reason we got it. We should at least test
this. v8 already has tests for this pattern.

llvm-svn: 222607

9 years agoInstCombine: Preserve nsw when folding X*(2^C) -> X << C
David Majnemer [Sat, 22 Nov 2014 04:52:55 +0000 (04:52 +0000)]
InstCombine: Preserve nsw when folding X*(2^C) -> X << C

llvm-svn: 222606

9 years agoInstCombine: Preserve nsw/nuw for ((X << C2)*C1) -> (X * (C1 << C2))
David Majnemer [Sat, 22 Nov 2014 04:52:52 +0000 (04:52 +0000)]
InstCombine: Preserve nsw/nuw for ((X << C2)*C1) -> (X * (C1 << C2))

llvm-svn: 222605

9 years agoInstCombine: Preserve nsw for (mul %V, -1) -> (sub 0, %V)
David Majnemer [Sat, 22 Nov 2014 04:52:38 +0000 (04:52 +0000)]
InstCombine: Preserve nsw for (mul %V, -1) -> (sub 0, %V)

llvm-svn: 222604

9 years agoDelay checking overrides for exception specifications if the overridden
Richard Smith [Sat, 22 Nov 2014 03:09:05 +0000 (03:09 +0000)]
Delay checking overrides for exception specifications if the overridden
specification has not yet been parsed.

llvm-svn: 222603

9 years agoFixed an issue where a DW_FORM_ref{2,4,8} might be extracted incorrectly because...
Greg Clayton [Sat, 22 Nov 2014 01:58:59 +0000 (01:58 +0000)]
Fixed an issue where a DW_FORM_ref{2,4,8} might be extracted incorrectly because the wrong compile unit was being used to calculate the compile unit relative offset.

This was fixed by making the DWARFFormValue contain the compile unit that it needs so it can decode its form value correctly. Any form value that requires a compile unit will now assert. If any of the assertions that were added are triggered, then code that led to the extraction of the form value without properly setting the compile unit must be fixed immediately.

<rdar://problem/19035440>

llvm-svn: 222602

9 years agoWhen a RegisterContext produces an invalid CFA address, change
Jason Molenda [Sat, 22 Nov 2014 01:52:03 +0000 (01:52 +0000)]
When a RegisterContext produces an invalid CFA address, change
UnwindLLDB::AddOneMoreFrame to try the fallback unwind plan on
that same stack frame before it tries the fallback unwind plan
on the "next" or callee frame.

In RegisterContextLLDB::TryFallbackUnwindPlan, when we're
trying the fallback unwind plan to see if it is valid, make
sure we change all of the object ivars that might be used in
the process of fetching the CFA & caller's saved pc value
and restore those if we decide not to use the fallback
unwindplan.

<rdar://problem/19035079>

llvm-svn: 222601

9 years agoThis is the first step of making lldb able to create target-specific things
Jim Ingham [Sat, 22 Nov 2014 01:42:44 +0000 (01:42 +0000)]
This is the first step of making lldb able to create target-specific things
(e.g. breakpoints, stop-hooks) before we have any targets - for instance in
your ~/.lldbinit file.  These will then get copied over to any new targets
that get created.  So far, you can only make stop-hooks.

Breakpoints will have to learn to move themselves from target to target for
us to get them from no-target to new-target.

We should also make a command & SB API way to prime this ur-target.

llvm-svn: 222600

9 years agoMake the sourcing of the local .lldbinit file quiet.
Jim Ingham [Sat, 22 Nov 2014 01:33:22 +0000 (01:33 +0000)]
Make the sourcing of the local .lldbinit file quiet.

<rdar://problem/19065278>

llvm-svn: 222599

9 years agoSilence a -Wcast-qual warning
David Majnemer [Sat, 22 Nov 2014 00:45:01 +0000 (00:45 +0000)]
Silence a -Wcast-qual warning

llvm-svn: 222598

9 years ago[ProcessWindows] Clean up the register definitions array.
Zachary Turner [Sat, 22 Nov 2014 00:37:14 +0000 (00:37 +0000)]
[ProcessWindows] Clean up the register definitions array.

llvm-svn: 222597

9 years agoJust a few words to introduce the extra optional argument to Python summaries
Enrico Granata [Sat, 22 Nov 2014 00:06:30 +0000 (00:06 +0000)]
Just a few words to introduce the extra optional argument to Python summaries

llvm-svn: 222594

9 years agoEnable Python summaries to use custom SBTypeSummaryOptions if the user is so inclined...
Enrico Granata [Sat, 22 Nov 2014 00:02:47 +0000 (00:02 +0000)]
Enable Python summaries to use custom SBTypeSummaryOptions if the user is so inclined. Updates to the webdoc will follow

llvm-svn: 222593

9 years agoFix mispelled 'ling' Python property to be 'line' in
Jason Molenda [Sat, 22 Nov 2014 00:00:17 +0000 (00:00 +0000)]
Fix mispelled 'ling' Python property to be 'line' in
SBLineEntry and SBDeclaration.  Patch from Chris Willmore.
<rdar://problem/19054323>

llvm-svn: 222592

9 years agoMS ABI: Mangle u8 string literals
David Majnemer [Fri, 21 Nov 2014 23:56:50 +0000 (23:56 +0000)]
MS ABI: Mangle u8 string literals

UTF8 string literals are mangled just like ASCII string literals.

llvm-svn: 222591

9 years ago[InstCombine] Re-commit of r218721 (Optimize icmp-select-icmp sequence)
Gerolf Hoflehner [Fri, 21 Nov 2014 23:36:44 +0000 (23:36 +0000)]
[InstCombine] Re-commit of  r218721 (Optimize icmp-select-icmp sequence)

Fixes the self-host fail. Note that this commit activates dominator
analysis in the combiner by default (like the original commit did).

llvm-svn: 222590

9 years agoRemove print statement that was accidentally left in.
Greg Clayton [Fri, 21 Nov 2014 23:34:35 +0000 (23:34 +0000)]
Remove print statement that was accidentally left in.

llvm-svn: 222589

9 years agoDon't make check-sanitizer depend on profile on Windows
Reid Kleckner [Fri, 21 Nov 2014 23:09:51 +0000 (23:09 +0000)]
Don't make check-sanitizer depend on profile on Windows

We don't build the profiling library on Windows, so CMake warns that the
target doesn't exist.

llvm-svn: 222588

9 years agoFix transformation of add with pc argument to adr for non-immediate
Joerg Sonnenberger [Fri, 21 Nov 2014 22:39:34 +0000 (22:39 +0000)]
Fix transformation of add with pc argument to adr for non-immediate
arguments.

llvm-svn: 222587

9 years ago[asan] remove old experimental code
Kostya Serebryany [Fri, 21 Nov 2014 22:34:29 +0000 (22:34 +0000)]
[asan] remove old experimental code

llvm-svn: 222586

9 years agoR600/SI: Add a failing test case for offset order in ds_read2 instructions
Tom Stellard [Fri, 21 Nov 2014 22:31:47 +0000 (22:31 +0000)]
R600/SI: Add a failing test case for offset order in ds_read2 instructions

llvm-svn: 222585

9 years agoR600/SI: Add an s_mov_b32 to patterns which use the M0RegClass
Tom Stellard [Fri, 21 Nov 2014 22:31:46 +0000 (22:31 +0000)]
R600/SI: Add an s_mov_b32 to patterns which use the M0RegClass

We need to use a s_mov_b32 rather than a copy, so that CSE will
eliminate redundant moves to the m0 register.

llvm-svn: 222584

9 years agoR600/SI: Emit s_mov_b32 m0, -1 before every DS instruction
Tom Stellard [Fri, 21 Nov 2014 22:31:44 +0000 (22:31 +0000)]
R600/SI: Emit s_mov_b32 m0, -1 before every DS instruction

This s_mov_b32 will write to a virtual register from the M0Reg
class and all the ds instructions now take an extra M0Reg explicit
argument.

This change is necessary to prevent issues with the scheduler
mixing together instructions that expect different values in the m0
registers.

llvm-svn: 222583

9 years agoPer off-list feedback, this API returns the *first* value with a given name, not...
Enrico Granata [Fri, 21 Nov 2014 22:23:08 +0000 (22:23 +0000)]
Per off-list feedback, this API returns the *first* value with a given name, not the *only* one. Rename it to reflect that

llvm-svn: 222582

9 years agoR600/SI: Add SIFoldOperands pass
Tom Stellard [Fri, 21 Nov 2014 22:06:37 +0000 (22:06 +0000)]
R600/SI: Add SIFoldOperands pass

This pass attempts to fold the source operands of mov and copy
instructions into their uses.

llvm-svn: 222581

9 years ago[mips][microMIPS] This patch implements functionality in MIPS delay slot
Jozef Kolek [Fri, 21 Nov 2014 22:04:35 +0000 (22:04 +0000)]
[mips][microMIPS] This patch implements functionality in MIPS delay slot
filler such as if delay slot filler have to put NOP instruction into the
delay slot of microMIPS BEQ or BNE instruction which uses the register $0,
then instead of emitting NOP this instruction is replaced by the corresponding
microMIPS compact branch instruction, i.e. BEQZC or BNEZC.

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

llvm-svn: 222580

9 years agoR600/SI: Mark s_mov_b32 and s_mov_b64 as rematerializable
Tom Stellard [Fri, 21 Nov 2014 22:00:16 +0000 (22:00 +0000)]
R600/SI: Mark s_mov_b32 and s_mov_b64 as rematerializable

llvm-svn: 222579

9 years agoR600/SI: Use hex notation for constant in test
Tom Stellard [Fri, 21 Nov 2014 22:00:13 +0000 (22:00 +0000)]
R600/SI: Use hex notation for constant in test

llvm-svn: 222578

9 years ago[Hexagon] Adding sxth instruction.
Colin LeMahieu [Fri, 21 Nov 2014 21:54:59 +0000 (21:54 +0000)]
[Hexagon] Adding sxth instruction.

llvm-svn: 222577

9 years agoAdd an API on SBValueList to find the first value with a given name stored in the...
Enrico Granata [Fri, 21 Nov 2014 21:45:03 +0000 (21:45 +0000)]
Add an API on SBValueList to find the first value with a given name stored in the list

llvm-svn: 222576

9 years ago[Hexagon] Adding sxtb instruction. Renaming some identically named classes that...
Colin LeMahieu [Fri, 21 Nov 2014 21:35:52 +0000 (21:35 +0000)]
[Hexagon] Adding sxtb instruction.  Renaming some identically named classes that will be removed after converting referencing defs.

llvm-svn: 222575

9 years ago[Mips] Use endian::read() for relocation addendum reading
Simon Atanasyan [Fri, 21 Nov 2014 21:26:32 +0000 (21:26 +0000)]
[Mips] Use endian::read() for relocation addendum reading

llvm-svn: 222574

9 years ago[asan] add statistic counter to dynamic alloca instrumentation
Kostya Serebryany [Fri, 21 Nov 2014 21:25:18 +0000 (21:25 +0000)]
[asan] add statistic counter to dynamic alloca instrumentation

llvm-svn: 222573

9 years ago[ASan] Get fake stack code working with GCC 4.8.2.
Jay Foad [Fri, 21 Nov 2014 21:25:09 +0000 (21:25 +0000)]
[ASan] Get fake stack code working with GCC 4.8.2.

Summary:
TestCases/Linux/heavy_uar_test.cc was failing on my
PowerPC64 box with GCC 4.8.2, because the compiler recognised
a memset-like loop and turned it into a call to memset, which
got intercepted by __asan_memset, which got upset because it was
being called on an address in high shadow memory.

Use break_optimization to stop the compiler from doing this.

Reviewers: kcc, samsonov

Reviewed By: kcc

Subscribers: llvm-commits

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

llvm-svn: 222572

9 years ago[Hexagon] Removing SUB_rr and replacing with A2_sub.
Colin LeMahieu [Fri, 21 Nov 2014 21:19:18 +0000 (21:19 +0000)]
[Hexagon] Removing SUB_rr and replacing with A2_sub.

llvm-svn: 222571

9 years agoObjective-C ARC. Fixes a crash when checking for 'weak' propery
Fariborz Jahanian [Fri, 21 Nov 2014 21:12:11 +0000 (21:12 +0000)]
Objective-C ARC. Fixes a crash when checking for 'weak' propery
whose base is not an expression. rdar://19053620

llvm-svn: 222570

9 years agoSema: Don't permit variably modified types in typeid
David Majnemer [Fri, 21 Nov 2014 21:09:12 +0000 (21:09 +0000)]
Sema: Don't permit variably modified types in typeid

GCC and ICC both reject this and the 'Runtime-sized arrays with
automatic storage duration' (N3639) paper forbade this as well.
Previously, we would crash on our way to mangling.

This fixes PR21632.

llvm-svn: 222569

9 years agoImplement -Wcast-qual, fixing #13772.
Roman Divacky [Fri, 21 Nov 2014 21:03:10 +0000 (21:03 +0000)]
Implement -Wcast-qual, fixing #13772.

Many thanks to dblaikie for his advices and suggestions!

llvm-svn: 222568