Commit Graph

187396 Commits

Author SHA1 Message Date
Rafael Espindola ffbfcf29f2 Add and use Type::subtypes. NFC.
llvm-svn: 222682
2014-11-24 20:44:36 +00:00
Rafael Espindola 3410466495 Pass the .ll files to llvm-link directly. NFC.
llvm-svn: 222681
2014-11-24 20:35:59 +00:00
Saleem Abdulrasool aca550fdb5 CodeGen: make i686-windows-itanium more similar to msvc
The itanium environment follows the system calling convention for structures.
Pass small aggregates via registers.

llvm-svn: 222680
2014-11-24 20:14:29 +00:00
Saleem Abdulrasool 76ecafd523 CodeGen: use a range-based for loop
Convert a debug assertion into a range-based loop form.  NFC.

llvm-svn: 222679
2014-11-24 20:14:26 +00:00
Sergey Dmitrouk c98f8bc1db Correct path to regression tests in ExtendingLLVM
llvm-svn: 222678
2014-11-24 19:40:07 +00:00
Chad Rosier ba0e0664ff [AArch64] Fix clobber computation in A57LoadBalancing pass.
Extremely difficult to reproduce, so no test case included.
PR21637

llvm-svn: 222677
2014-11-24 18:57:58 +00:00
Colin LeMahieu 287c4e1762 Removing unused variable.
llvm-svn: 222676
2014-11-24 18:55:32 +00:00
Kostya Serebryany 4cadd4afa0 [asan/coverage] change the way asan coverage instrumentation is done: instead of setting the guard to 1 in the generated code, pass the pointer to guard to __sanitizer_cov and set it there. No user-visible functionality change expected
llvm-svn: 222675
2014-11-24 18:49:53 +00:00
Eric Fiselier 90c138ea6d [libcxxabi] Delay adjustment of pointer to prevent referencing invalid memory.
Summary:
This patch delays the dereference adjustment until we are sure the thrown type is a pointer type. It is possible the thrown type is not a pointer and is smaller than `sizeof(void*)`. If the thrown type is is smaller than `sizeof(void*)` the deference adjustment will result in a heap buffer overflow.

I audited all the call sites of `can_catch(...)` and there are no places where `adjustedPtr` is used if `can_catch(...)` returns false. For this reason the patch should not introduce any functionality change.

This patch fixes the following tests when using ASAN:
* unwind_01.cpp
* unwind_02.cpp
* unwind_04.cpp



Reviewers: danalbert, jroelofs, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 222674
2014-11-24 18:46:37 +00:00
Eric Fiselier 909deebfc8 [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
2014-11-24 18:17:04 +00:00
Ulrich Weigand a69bcd5ed0 [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
2014-11-24 18:09:47 +00:00
Paul Robinson c38deee807 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
2014-11-24 18:05:29 +00:00
Colin LeMahieu 397a25e7cd [Hexagon] Adding asrh instruction, removing unused multiclasses.
llvm-svn: 222670
2014-11-24 18:04:42 +00:00
Colin LeMahieu 3b3197ef95 [Hexagon] Adding aslh instruction.
llvm-svn: 222668
2014-11-24 17:44:19 +00:00
Aaron Ballman 6265102c17 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
2014-11-24 17:39:44 +00:00
Nico Rieck e50e59a55a Fix line endings
llvm-svn: 222666
2014-11-24 17:29:52 +00:00
Nico Rieck dfff5d22e6 Fix crash when using __if_exists in C mode
llvm-svn: 222665
2014-11-24 17:29:35 +00:00
Aaron Ballman 54891e047f Unbreaking the MSVC 2012 build; however, these tests still fail on Windows.
llvm-svn: 222664
2014-11-24 17:22:32 +00:00
Colin LeMahieu 098256c5e6 [Hexagon] Adding zxth instruction.
llvm-svn: 222662
2014-11-24 17:11:34 +00:00
Colin LeMahieu 06bc0caa1f Adding const iterator to MCInst. http://reviews.llvm.org/D6359
llvm-svn: 222661
2014-11-24 16:50:40 +00:00
Colin LeMahieu bb7d6f5514 [Hexagon] Adding zxtb instruction.
llvm-svn: 222660
2014-11-24 16:48:43 +00:00
David Majnemer 8e6f6a98b5 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
2014-11-24 16:41:13 +00:00
Jozef Kolek 11bdb8bf33 [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
2014-11-24 16:14:10 +00:00
Aaron Ballman 484ee9b404 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
2014-11-24 15:42:34 +00:00
Ed Maste ef43413593 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
2014-11-24 15:01:11 +00:00
Yaron Keren ea5f06a568 Added comment about llvm_execute_on_thread waiting for thread to complete.
llvm-svn: 222654
2014-11-24 14:51:41 +00:00
Jozef Kolek e8c9d1eaf7 [mips][microMIPS] Implement LBU16, LHU16, LW16, SB16, SH16 and SW16 instructions
Differential Revision: http://reviews.llvm.org/D5122

llvm-svn: 222653
2014-11-24 14:39:13 +00:00
Jozef Kolek 1904fa2197 [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
2014-11-24 14:25:53 +00:00
Simon Atanasyan 7760da3103 [Mips] Update MIPS relocations list
No functional changes.

llvm-svn: 222651
2014-11-24 14:17:33 +00:00
Craig Topper a4ff6ae766 Replace a comment that says 'unreachable' with llvm_unreachable in TableGen AsmWriter output.
llvm-svn: 222650
2014-11-24 14:09:52 +00:00
Aaron Ballman 41580deaf1 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
2014-11-24 14:03:16 +00:00
Jozef Kolek ea22c4cfbb [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
2014-11-24 13:29:59 +00:00
Andrea Di Biagio 23e2cfa834 [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
2014-11-24 12:23:15 +00:00
Manuel Klimek da50ff8e4a 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
2014-11-24 09:10:56 +00:00
David Majnemer b2a6e7458d 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
2014-11-24 07:26:20 +00:00
Duncan P. N. Exon Smith 4030118485 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
2014-11-24 03:13:02 +00:00
Craig Topper ba6d83e64b Detect best type for some static index tables instead of just using uint32_t to reduce total data size.
llvm-svn: 222643
2014-11-24 02:08:35 +00:00
Daniel Jasper 79f226e780 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
2014-11-23 21:45:03 +00:00
Daniel Jasper 325e486f9b clang-format: [Java] Treat 'instanceof' like other binary operators.
This fixes llvm.org/PR21436.

llvm-svn: 222641
2014-11-23 21:34:25 +00:00
Daniel Jasper a0143fab5e clang-format: [Java] Space before array initializers.
Before:
  new int[]{1, 2, 3, 4};

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

llvm-svn: 222640
2014-11-23 20:54:37 +00:00
Daniel Jasper bb86d847ba 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
2014-11-23 19:15:35 +00:00
Daniel Jasper 7198b0c778 clang-format: Refactoring.
Provide more overloads to simplify testing the type of a token. No
functional changes intended.

llvm-svn: 222638
2014-11-23 19:03:25 +00:00
Daniel Jasper 616de864da 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
2014-11-23 16:46:28 +00:00
Elena Demikhovsky 6de72e5b0c Converted back to Unix format (after my last commit 222632)
llvm-svn: 222636
2014-11-23 15:21:53 +00:00
Michael Kuperstein 9ef90647b9 [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
2014-11-23 13:09:06 +00:00
Craig Topper 8c5128bf1b Add missing override keywords.
llvm-svn: 222634
2014-11-23 09:40:13 +00:00
Craig Topper ca331bef51 Tablegen output formatting fixes.
llvm-svn: 222633
2014-11-23 09:40:10 +00:00
Elena Demikhovsky 9e5089a938 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
2014-11-23 08:07:43 +00:00
Matt Arsenault 2a495975ed R600: Fix extloads of i1 on R600/Evergreen
llvm-svn: 222631
2014-11-23 02:57:54 +00:00
Matt Arsenault 28638f1e2c 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
2014-11-23 02:57:52 +00:00