Commit Graph

172040 Commits

Author SHA1 Message Date
Chandler Carruth 47c480875b [Allocator] Make the ContentCache object actually carry the 8-byte
alignment constraint rather than using the allocator function's over
alignment "feature". This was the only use of the "feature" which I plan
to remove next. =] Attaching the alignment to the type seems cleaner and
more principled anyways.

llvm-svn: 206324
2014-04-15 21:34:12 +00:00
Akira Hatanaka 3d90f99d1a Make FastISel::SelectInstruction return before target specific fast-isel code
handles Intrinsic::trap if TargetOptions::TrapFuncName is set.

This fixes a bug in which the trap function was not taken into consideration
when a program was compiled without optimization (at -O0).

<rdar://problem/16291933>

llvm-svn: 206323
2014-04-15 21:30:06 +00:00
Justin Bogner e2ef2a09ef CodeGen: Emit warnings for out of date profile data during PGO
This adds a warning that triggers when profile data doesn't match for
the source that's being compiled with -fprofile-instr-use=. This fires
only once per translation unit, as warning on every mismatched
function would be quite noisy.

llvm-svn: 206322
2014-04-15 21:22:35 +00:00
Justin Bogner 3f0c79ce8d CodeGen: Remove a comment that isn't in the right place
This comment also appears elsewhere where it actually makes sense, and
it's just confusing here.

llvm-svn: 206321
2014-04-15 20:37:41 +00:00
Richard Smith 93da092f10 Move comment back to being next to the thing it's describing.
llvm-svn: 206320
2014-04-15 20:27:15 +00:00
Ed Maste 9b8d847b8f Add FreeBSD-specific SIGTHR and SIGLIBRT signals
llvm-svn: 206319
2014-04-15 20:22:32 +00:00
Tobias Grosser 364c136d08 Dependences: Do not fail in case a schedule eliminates all dependences
The following example shows a non-parallel loop

void f(int a[]) {
  int i;
  for (i = 0; i < 10; ++i)
    A[i] = A[i+5];
}

which, in case we import a schedule that limits the iteration domain
to 0 <= i < 5, becomes parallel. Previously we crashed in such cases, now we
just recognize it as parallel.

This fixes http://llvm.org/PR19435

Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 206318
2014-04-15 20:14:57 +00:00
Justin Bogner 399093276c AST: Respect alignment attributes on typedef'd arrays
When instantiating an array that has an alignment attribute on it, we
were looking through the array type and only considering the element
type for the resulting alignment. We need to make sure we take the
array's requirements into account too.

llvm-svn: 206317
2014-04-15 20:12:41 +00:00
Andrea Di Biagio aac2eac4c2 [X86] Improve the lowering of packed shifts by constant build_vector.
This patch teaches the backend how to efficiently lower logical and
arithmetic packed shifts on both SSE and AVX/AVX2 machines.

When possible, instead of scalarizing a vector shift, the backend should try
to expand the shift into a sequence of two packed shifts by immedate count
followed by a MOVSS/MOVSD.

Example
  (v4i32 (srl A, (build_vector < X, Y, Y, Y>)))

Can be rewritten as:
  (v4i32 (MOVSS (srl A, <Y,Y,Y,Y>), (srl A, <X,X,X,X>)))

[with X and Y ConstantInt]

The advantage is that the two new shifts from the example would be lowered into
X86ISD::VSRLI nodes. This is always cheaper than scalarizing the vector into
four scalar shifts plus four pairs of vector insert/extract.

llvm-svn: 206316
2014-04-15 19:30:48 +00:00
Quentin Colombet 9d8105130a [ARM64] Update tests to reflect the change of the default CPU in llvm.
llvm-svn: 206314
2014-04-15 19:09:58 +00:00
Quentin Colombet 72dad56c53 [ARM64] Set default CPU to generic instead of cyclone.
llvm-svn: 206313
2014-04-15 19:08:46 +00:00
David Blaikie b035f6d878 Blind fix Polly for r206310
llvm-svn: 206312
2014-04-15 18:45:27 +00:00
Robert Lougher a9bf2463b9 Revert r191049/r191059 as it can produce wrong code (see PR17975).
It has already been reverted on the 3.4 branch in r196521.

llvm-svn: 206311
2014-04-15 18:34:24 +00:00
David Blaikie ec649acb82 Use unique_ptr to manage ownership of child Regions within llvm::Region
llvm-svn: 206310
2014-04-15 18:32:43 +00:00
Ben Langmuir 8832c066a2 Honour -ivfsoverlay in ASTUnit to match clang
This allows code indexing, etc. to use the VFS in the same way as the
compiler.

llvm-svn: 206309
2014-04-15 18:16:25 +00:00
Julien Lerouge be4fe32eb8 Add lifetime markers for allocas created to hold byval arguments, make them
appear in the InlineFunctionInfo.

llvm-svn: 206308
2014-04-15 18:06:46 +00:00
Julien Lerouge 957e91c4d8 Split byval argument initialization so the memcpy(s) are injected at the
beginning of the first new block after inlining.

llvm-svn: 206307
2014-04-15 18:01:54 +00:00
Duncan P. N. Exon Smith 2b69189c9c LTO: Add more loop simplification passes to LTO
Similar to r202051, add missing loop simplification passes to the LTO
optimization pipeline.

Patch by Rafael Espindola.

llvm-svn: 206306
2014-04-15 17:48:15 +00:00
Duncan P. N. Exon Smith 0d640014ff verify-di: Add back braces for MSVC compatability
Fixup after r206300.

<rdar://problem/15500563>

llvm-svn: 206305
2014-04-15 17:28:26 +00:00
Eli Bendersky e1627b43f9 Replace push_back()s by initializer list for shorter and cleaner code.
llvm-svn: 206304
2014-04-15 17:19:26 +00:00
Eli Bendersky 8578c8f1e3 Add test case for r206302
llvm-svn: 206303
2014-04-15 16:57:53 +00:00
Eli Bendersky e06a2c4f90 Add support for CUDA __launch_bounds__ attribute to CodeGen.
Sema does have a CUDALaunchBoundsAttr, but CodeGen was doing nothing with it.
This change translates CUDALaunchBoundsAttr to maxntidx and minctasm
metadata, which NVPTX then translates to the correct PTX directives.

Patch by Manjunath Kudlur.

llvm-svn: 206302
2014-04-15 16:57:05 +00:00
Duncan P. N. Exon Smith 52eaffee03 verify-di: Call debug info verifier from clang
This is paired with a patch to LLVM that creates a separate pass for
verifying debug info.

<rdar://problem/15500563>

llvm-svn: 206301
2014-04-15 16:27:43 +00:00
Duncan P. N. Exon Smith 6ef5f284d6 verify-di: Implement DebugInfoVerifier
Implement DebugInfoVerifier, which steals verification relying on
DebugInfoFinder from Verifier.

  - Adds LegacyDebugInfoVerifierPassPass, a ModulePass which wraps
    DebugInfoVerifier.  Uses -verify-di command-line flag.

  - Change verifyModule() to invoke DebugInfoVerifier as well as
    Verifier.

  - Add a call to createDebugInfoVerifierPass() wherever there was a
    call to createVerifierPass().

This implementation as a module pass should sidestep efficiency issues,
allowing us to turn debug info verification back on.

<rdar://problem/15500563>

llvm-svn: 206300
2014-04-15 16:27:38 +00:00
Duncan P. N. Exon Smith 67b44da0dd verify-di: split out VerifierSupport
Split out assertion and output helpers from Verifier in preparation for
writing the DebugInfoVerifier.

<rdar://problem/15500563>

llvm-svn: 206299
2014-04-15 16:27:32 +00:00
Alp Toker 48c7e17a24 Fix a comment to match the implementation
llvm-svn: 206298
2014-04-15 16:24:50 +00:00
David Blaikie 0afad5e8bc Use unique_ptr to manage PassInfo instances in the PassRegistry
llvm-svn: 206297
2014-04-15 15:17:14 +00:00
Tim Northover c801b4a2aa ARM64: track alignment padding registers on AAPCS targets
This implements clause C.8 of the AAPCS in the front-end, so that Clang
accurately knows when the registers run out and it has to insert padding before
the stack objects begin.

PR19432.

llvm-svn: 206296
2014-04-15 14:55:11 +00:00
Alexander Kornienko 64a42b8dd2 Fix assertion when breaking string literals with tab characters.
Summary: Fixes http://llvm.org/PR19368

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, klimek

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

llvm-svn: 206295
2014-04-15 14:52:43 +00:00
NAKAMURA Takumi eec6fa541c Mark clang/test/Index/pch-with-errors.c as XFAIL:mingw for now. Investigating.
This has been failing since r206202.

llvm-svn: 206294
2014-04-15 14:44:55 +00:00
NAKAMURA Takumi e1f3583b96 MipsAsmParser.cpp: Fix vg_leak in MipsOperand::CreateMem(). Mem.Base is managed by k_Memory itself.
llvm-svn: 206293
2014-04-15 14:13:21 +00:00
NAKAMURA Takumi bd524ef129 MipsAsmParser::ParseRegister(): Be responsible to delete an Operand on a temporary Operands.
llvm-svn: 206292
2014-04-15 14:06:27 +00:00
Tim Northover bd668872c0 AArch64/ARM64: enable more AArch64 tests on ARM64.
No code changes for this bunch, just some test rejigs.

llvm-svn: 206291
2014-04-15 14:00:29 +00:00
Tim Northover ebb3123a5f AArch64/ARM64: add missing pattern for extending load.
llvm-svn: 206290
2014-04-15 14:00:19 +00:00
Tim Northover cbcb7a37f7 AArch64/ARM64: only mangle MOVZ/MOVN during encoding when needed
Sometimes we need emit the bits that would actually be a MOVN when producing a
relocated MOVZ instruction (don't ask). But not always, a check which ARM64 got
wrong until now.

llvm-svn: 206289
2014-04-15 14:00:15 +00:00
Tim Northover 6e27b8ded5 AArch64/ARM64: add support for large code-model jump tables.
I've left the MachO CodeGen as it is, there's a reasonable chance it should use
the GOT like ConstPools, but I'm not certain.

llvm-svn: 206288
2014-04-15 14:00:11 +00:00
Tim Northover 221b583951 AArch64/ARM64: add patterns for various commutations of FNMADD.
llvm-svn: 206287
2014-04-15 14:00:06 +00:00
Tim Northover b37cff1ae2 AArch64/ARM64: add half as a storage type on ARM64.
This brings it into line with the AArch64 behaviour and should open the way for
certain OpenCL features.

llvm-svn: 206286
2014-04-15 14:00:03 +00:00
Tim Northover 80a70a265a AArch64/ARM64: copy patterns for fixed-point conversions
Code is mostly copied directly across, with a slight extension of the
ISelDAGToDAG function so that it can cope with the floating-point constants
being behind a litpool.

llvm-svn: 206285
2014-04-15 13:59:57 +00:00
Tim Northover f70577b1cd ARM64: add constraints to various FastISel operations
llvm-svn: 206284
2014-04-15 13:59:53 +00:00
Tim Northover 2f553f326a FastISel: constrain the RegClass of operands when emitting instructions.
ARM64 suffered multiple -verify-machineinstr failures (principally over the
xsp/xzr issue) because FastISel was completely ignoring which subset of the
general-purpose registers each instruction required.

More fixes are coming in ARM64 specific FastISel, but this should cover the
generic problems.

llvm-svn: 206283
2014-04-15 13:59:49 +00:00
Tim Northover 27010074fb AArch64/ARM64: add more arm64 lines to AArch64 regression tests
llvm-svn: 206282
2014-04-15 13:59:44 +00:00
Tim Northover 20603726ce AArch64/ARM64: add dp tests from AArch64
llvm-svn: 206281
2014-04-15 13:59:40 +00:00
Kostya Serebryany d4b1b2068e [asan] fix the alloctor code to not use opaque data structure, which was larger than needed. This was a leftover of the allocator1=>allocator2 migration; thanks Yuri Gribov for reminding
llvm-svn: 206280
2014-04-15 13:30:32 +00:00
NAKAMURA Takumi 6091e1aed5 ARM64AsmParser.cpp: Fix vg_leak in MC/ARM64/fp-encoding.s.
llvm-svn: 206279
2014-04-15 13:22:11 +00:00
Sylvestre Ledru a3e4cebd96 Remove trailing spaces
llvm-svn: 206278
2014-04-15 12:08:57 +00:00
Sylvestre Ledru 5ac35ae6f7 Make LLDB builds against the current LLVM sources (modification on createMCDisassembler introduced by r206241)
llvm-svn: 206277
2014-04-15 12:07:25 +00:00
Stepan Dyatkovskiy 95cdac43af Optional hash symbol feature support for ARM64
http://reviews.llvm.org/D3328

llvm-svn: 206276
2014-04-15 11:43:09 +00:00
Fraser Cormack 01648e0463 Allow address space qualifiers on OpenCL array parameters
llvm-svn: 206275
2014-04-15 11:38:29 +00:00
Alexander Potapenko 65a6c57013 [ASan] Replace a CHECK for mmap_limit_mb with a RAW_CHECK.
In the case of a CHECK failure the program tries to fork and launch llvm-symbolizer,
but hangs in mz_force_lock because one of the allocator locks is already acquired.

llvm-svn: 206274
2014-04-15 11:36:18 +00:00