Commit Graph

156480 Commits

Author SHA1 Message Date
Tom Stellard 7da047c9fb SelectionDAG: Use correct pointer size when splitting vector stores
llvm-svn: 189224
2013-08-26 15:05:55 +00:00
Tom Stellard f3d166aa1e R600: Add support for i8 and i16 local memory stores
llvm-svn: 189223
2013-08-26 15:05:49 +00:00
Tom Stellard 2ffc330673 R600: Add support for v4i32 and v2i32 local stores
llvm-svn: 189222
2013-08-26 15:05:44 +00:00
Tom Stellard fd155828ed SelectionDAG: Use correct pointer size when lowering function arguments v2
This adds minimal support to the SelectionDAG for handling address spaces
with different pointer sizes.  The SelectionDAG should now correctly
lower pointer function arguments to the correct size as well as generate
the correct code when lowering getelementptr.

This patch also updates the R600 DataLayout to use 32-bit pointers for
the local address space.

v2:
  - Add more helper functions to TargetLoweringBase
  - Use CHECK-LABEL for tests

llvm-svn: 189221
2013-08-26 15:05:36 +00:00
Douglas Gregor 047b16a665 CMake Xcode builds: symlink tblgen targets out to bin/.
Xcode always puts executable targets in the directory
bin/<Config>. When building separate LLVM and Clang projects for
Xcode, this prevents the CMake-configured project for Clang from
finding llvm-tblgen. Add a symlink so that tblgen executables are
always available in bin/ (regardless of the configuration LLVM is
built with).

llvm-svn: 189220
2013-08-26 14:43:19 +00:00
Wei Pan 8d6b19a518 Handle predefined expression for a captured statement
- __func__ or __FUNCTION__ returns captured statement's parent
  function name, not the one compiler generated.

Differential Revision: http://llvm-reviews.chandlerc.com/D1491

Reviewed by bkramer

llvm-svn: 189219
2013-08-26 14:27:34 +00:00
Rafael Espindola 91780dec58 Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.
llvm-svn: 189218
2013-08-26 14:05:41 +00:00
Sergey Matveev 9e3e80208f [sanitizer] Add a fast version of StackDepotGet() for use in LSan.
Add a class that holds a snapshot of the StackDepot optimized for querying by
ID. This allows us to speed up LSan dramatically.

llvm-svn: 189217
2013-08-26 13:24:43 +00:00
Sergey Matveev ef7db73e11 [sanitizer] Handle Die() in StopTheWorld.
Handle calls to Die() from the tracer thread. Fixes a bug where a CHECK
could fail in the tracer thread, resulting in a call to AsanDie. The tracer
thread then exited and the parent process continued execution despite its
address space being in an unusable state.

llvm-svn: 189216
2013-08-26 13:20:31 +00:00
Elena Demikhovsky 0a2b6290f1 AVX-512: Added shuffle instructions -
VPSHUFD, VPERMILPS, VMOVDDUP, VMOVLHPS, VMOVHLPS, VSHUFPS, VALIGN
 single and double forms.

llvm-svn: 189215
2013-08-26 12:45:35 +00:00
Timur Iskhodzhanov f46993e40a Fix virtual destructor mangling when using "-cxx-abi microsoft" on x64
llvm-svn: 189214
2013-08-26 10:32:04 +00:00
Vladimir Medic 8277c1874a This patch implements trap instructions for mips. The test cases are added.
llvm-svn: 189213
2013-08-26 10:02:40 +00:00
Chandler Carruth 1f2b2f8d45 Teach the Linux toolchain about more modern Gentoo installations of GCC
which add another wrinkle to the installation of the libstdc++ headers.

Add at least some basic testing of the weirdnesses of Gentoo's layout.

llvm-svn: 189212
2013-08-26 08:59:53 +00:00
Daniel Jasper 8863ada85b clang-format: Fix bug in column-layout formatting.
Specific arrangements of comments after trailing commas could confuse
the column width calculation, e.g. in:

vector<int> x = { a, b,
                  /* some */ /* comment */ };

llvm-svn: 189211
2013-08-26 08:10:17 +00:00
Manuel Klimek aeb642276e Include a clearer policy about what's ok/nok to speed up code reviews.
llvm-svn: 189210
2013-08-26 07:29:08 +00:00
Shankar Easwaran f1947537a0 [lld][ELF] Cleanup ELF writing, No change in functionality
The cleanup includes :-

* Rename ambiguous Header class to ELFHeader
* Convert Chunk contentype and kind to be a enumerated class
* Remove functions that are not being used, avoids future confusion

llvm-svn: 189209
2013-08-26 03:16:13 +00:00
David Majnemer a4778cc2f1 [-cxx-abi microsoft] Unnamed types are mangled less wrong
llvm-svn: 189208
2013-08-26 02:35:51 +00:00
Shankar Easwaran da7ceb9b58 [lld][ELF] Indent the td file to < 80 columns
llvm-svn: 189207
2013-08-26 01:56:27 +00:00
Craig Topper 6269f49505 Make sure x86 instructions using ssmem/sdmem operand types are only able to parse memory operands of the proper size in Intel syntax. Primarily affects some of sse cvt instructions.
llvm-svn: 189206
2013-08-26 00:39:04 +00:00
Craig Topper 5500d83793 Remove some unnecessary PredicateMethod overrides. Add RenderMethod overrides to remove forwarding in the X86AsmParser code itself. No functional change.
llvm-svn: 189205
2013-08-26 00:13:09 +00:00
Craig Topper 8c26c424c6 Put some of the AVX-512 parsing stuff in a more consistent place with the existing functions.
llvm-svn: 189204
2013-08-25 23:18:05 +00:00
Benjamin Kramer 7463ed7c89 CodeGen: Unify two implementations of canDevirtualizeMemberFunctionCall.
They were mostly copy&paste of each other, move it to CodeGenFunction. Of course
the two implementations have diverged over time; the one in CGExprCXX seems to
be the more modern one so I picked that one and moved it to CGClass which feels
like a better home for it. No intended functionality change.

llvm-svn: 189203
2013-08-25 22:46:27 +00:00
Bill Schmidt 0300813d6a [PowerPC] Add fast-isel branch and compare selection.
First chunk of actual fast-isel selection code.  This handles direct
and indirect branches, as well as feeding compares for direct
branches.  PPCFastISel::PPCEmitIntExt() is just roughed in and will be
expanded in a future patch.  This also corrects a problem with
selection for constant pool entries in JIT mode or with small code
model.

llvm-svn: 189202
2013-08-25 22:33:42 +00:00
Craig Topper 1885417372 First round of fixes for the x86 fixes for the x86 move accumulator from/to memory offset instructions.
-Assembly parser now properly check the size of the memory operation specified in intel syntax. So 'mov word ptr [5], al' is no longer accepted.
-x86-32 disassembly of these instructions no longer sign extends the 32-bit address immediate based on size.
-Intel syntax printing prints the ptr size and places brackets around the address immediate.

Known remaining issues with these instructions:
-Segment override prefix is not supported. PR16962 and PR16961.
-Immediate size should be changed by address size prefix.

llvm-svn: 189201
2013-08-25 22:23:38 +00:00
David Majnemer a3644d6046 DebugInfo: Emit info for casted decls in template args
Summary:
Previously the backend wouldn't get to see the underlying GlobalValue
that corresponds to the template argument because it would be hidden by
a cast at the IR level.  Instead strip the pointer casts off of the
value until we see the underlying GlobalValue.

Reviewers: dblaikie, echristo, majnemer

Reviewed By: majnemer

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1508

llvm-svn: 189200
2013-08-25 22:13:27 +00:00
Jakub Staszak 4e0150b600 Fix #include guard.
llvm-svn: 189199
2013-08-25 19:48:46 +00:00
Venkatraman Govindaraju 35e0c382d5 [Sparc] Add long double (f128) instructions to sparc backend.
llvm-svn: 189198
2013-08-25 18:30:06 +00:00
Shankar Easwaran 0f2a45cac5 [lld][ELF][Cleanup] Create multiclass for variations in options usage
llvm-svn: 189197
2013-08-25 18:05:15 +00:00
Shankar Easwaran be81dd757e [lld][ELF] process fini_array sections
This change processes fini_array section in addition to processing
init_array sections. This also makes functions registered at compile
time for initialization and finalization to be run during execution

llvm-svn: 189196
2013-08-25 18:05:12 +00:00
Venkatraman Govindaraju 12d8089b8e [Sparc] Added V9's extra floating point registers and their aliases.
llvm-svn: 189195
2013-08-25 17:03:02 +00:00
Howard Hinnant 59a5a956f5 Propagate the removal of _LIBCPP_CANTTHROW (r189046) to libcxxabi. This fixes http://llvm.org/bugs/show_bug.cgi?id=16996.
llvm-svn: 189194
2013-08-25 17:00:57 +00:00
Rafael Espindola e8025644b2 Produce an error when trying to link with -emit-llvm.
llvm-svn: 189193
2013-08-25 14:27:09 +00:00
Virgile Bello a4fe3a1259 PECOFF: Add support for export table.
llvm-svn: 189192
2013-08-25 13:27:20 +00:00
Virgile Bello 8452cb5486 Fix DWARF for 0-length CIE (data after the length should not be read if length is 0).
llvm-svn: 189191
2013-08-25 13:24:48 +00:00
Renato Golin 171b6b19f1 Tests for ARM aligned access + reserved R9
Patch by Jeroen Hofstee.

llvm-svn: 189190
2013-08-25 13:01:50 +00:00
Elena Demikhovsky f8f478b19d AVX-512: added UNPACK instructions and tests for all-zero/all-ones vectors
llvm-svn: 189189
2013-08-25 12:54:30 +00:00
Chandler Carruth ba689b3315 Fix a bug where we would corrupt the offset when evaluating
a non-constant GEP.

I don't have any test case that demonstrates this, Nadav (indirectly)
pointed this out in code review. I'm not sure how possible it is to
contrive a test case for the current users of this code that triggers
the bad issue sadly.

llvm-svn: 189188
2013-08-25 10:46:39 +00:00
David Majnemer b78df507c8 AsmPrinter: Get rid of llvm$workaround$fake$stub$
We currently emit labels with the prefix Lllvm$workaround$fake$stub$ if
the target's MCAsmInfo has getLinkOnceDirective() mapped to something
interesting.  This was apparently a work around introduced in r31033 for
binutils that we don't need anymore.

llvm-svn: 189187
2013-08-25 09:18:19 +00:00
Reed Kotler 7d0fb7ebd5 Start to add the LLVM builtins to the mips16 exclusion lists for fp.
I need to add the rest of these to the list or else to delay putting
out the actual stub until later in code generation when I know if
the external function ever got emitted

Resubmit this patch. The target triple needs to be added to the test so that 
clang does not tell the backend the wrong target when the host is BSD. There
is a clang bug in here somewhere that I need to track down. At Mips this
has been filed internally as a bug.

llvm-svn: 189186
2013-08-25 02:40:25 +00:00
Michael Han b3edc32cfa Fix comment.
llvm-svn: 189185
2013-08-25 01:29:56 +00:00
Howard Hinnant c9d3ae43d2 G M: Improve support for compilers not supporting defaulted functions.
llvm-svn: 189184
2013-08-24 21:31:37 +00:00
Saleem Abdulrasool f9024e9cda [Support] fix compile with -Werror
error: commas at the end of enumerator lists are a C++11 extension
[-Werror,-Wc++11-extensions]

llvm-svn: 189183
2013-08-24 20:35:16 +00:00
Craig Topper 0714d51cba Add hasSideEffects/mayLoad/mayStore flags to the X86 moffs8/moffs16/moffs32/moffs64 versions of move.
llvm-svn: 189182
2013-08-24 20:31:14 +00:00
Saleem Abdulrasool 1089265a1d [PECOFF] support additional subsystem identifiers
This completes the subsystem name parsing to support the identifiers that the
Microsoft link.exe linker supports.  "windows" and "console" are left as the
first items as they are the expected common paths.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 189181
2013-08-24 20:14:54 +00:00
Saleem Abdulrasool 32a6797c8a [Support] add missing enumeration values
This adds additional missing Windows subsystem identifiers to the
IMAGE_SUBSYSTEM enumeration.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 189180
2013-08-24 20:14:40 +00:00
Matt Arsenault 8405888af1 Check if in set on insertion instead of separately
llvm-svn: 189179
2013-08-24 19:55:38 +00:00
Craig Topper 092e2fe426 Remove trailing whitespace.
llvm-svn: 189178
2013-08-24 19:50:11 +00:00
Tobias Grosser 4c932b8a4b Remove unneeded comma and update formatting
llvm-svn: 189177
2013-08-24 17:58:59 +00:00
Shuxin Yang b64ab41936 Revert 189161
llvm-svn: 189176
2013-08-24 17:53:16 +00:00
Renato Golin a146a48349 Add gcc ARM flags -munaligned-access / -mno-unaligned-access
clang already had a mstrict-align which mentiones "Force all memory
accesses to be aligned (ARM only)". On gcc arm this is controlled by
-munaligned-access / -mno-unaligned-access. Add the gcc versions to
the frontend and make -mstrict-align and alias to -mno-unaligned-access
and only show it in clang -cc1 -help.

Since the default value for unaligned accesses / strict alignment
depends on the tripple, both the enable and disable flags are added.
If both are set, the no-unaligned-access is used.

Patch by Jeroen Hofstee.

llvm-svn: 189175
2013-08-24 14:44:41 +00:00