Commit Graph

163558 Commits

Author SHA1 Message Date
Alexander Kornienko fe7a57fa78 Early attempts to format in GNU style.
Summary:
This still misses a few important features, so there's no mention of
this style in the help message, but a few style rules are implemented.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 196928
2013-12-10 15:42:15 +00:00
Chad Rosier ff3b79aead [AArch64] Refactor the Neon vector/scalar floating-point convert implementation.
Specifically, reuse the ARM intrinsics when possible.

llvm-svn: 196927
2013-12-10 15:35:40 +00:00
Chad Rosier fcc4c366d1 [AArch64] Refactor the Neon vector/scalar floating-point convert implementation.
Specifically, reuse the ARM intrinsics when possible.

llvm-svn: 196926
2013-12-10 15:35:33 +00:00
Andrea Di Biagio f7c33c8162 Ensure that the backend no longer emits unnecessary vector insert instructions
immediately after SSE scalar fp instructions like addss or mulss.

Added patterns to select SSE scalar fp arithmetic instructions from a scalar
fp operation followed by a blend.

For example, given the following code:
  __m128 foo(__m128 A, __m128 B) {
    A[0] += B[0];
    return A;
  }

previously we generated:
  addss %xmm0, %xmm1
  movss %xmm1, %xmm0

now we generate:
  addss %xmm1, %xmm0

llvm-svn: 196925
2013-12-10 15:22:48 +00:00
Rafael Espindola 2f6d7b96e7 Use Field Lists for the types' "Overview", "Syntax" and "Examples".
Thanks to Sean Silva for the suggestion.

llvm-svn: 196924
2013-12-10 14:53:22 +00:00
Vincent Lejeune cc0ea74c7b R600: Fix an infinite loop when trying to reorganize export/tex vector input
llvm-svn: 196923
2013-12-10 14:43:31 +00:00
Vincent Lejeune f92d64d160 R600: Fix input modifiers lost for Cayman
llvm-svn: 196922
2013-12-10 14:43:27 +00:00
Reed Kotler 0ff4001781 Next step in Mips16 prologue/epilogue cleanup.
Save S2(reg 18) only when we are calling floating point stubs that
have a return value of float or complex. Some more work to make this
better but this is the first step.

llvm-svn: 196921
2013-12-10 14:29:38 +00:00
Ed Maste 0508125cd4 test: FreeBSD calls the 64-bit x86 platform amd64
Also add decorator for an issue that this uncovered: llvm.org/pr18200

llvm-svn: 196920
2013-12-10 14:25:28 +00:00
Ed Maste 687a0c043a test: Fix match string to work with st0 or stmm0
llvm-svn: 196919
2013-12-10 14:20:50 +00:00
Elena Demikhovsky e382c3fdcd AVX-512: changed intrinsics for mask operations
llvm-svn: 196918
2013-12-10 13:53:10 +00:00
Alp Toker 8c7cbdf53a clang-format-diff.py: Support -regex filter and more filename extensions
Add support for more filename extensions based on the list in the clang
plus JavaScript.

Also adds a -regex option so users can override defaults if they have unusual
file extensions or want to format everything in the diff.

Keeping with tradition the flag is modelled on Unix conventions, this time
matching the semantics of find(1).

llvm-svn: 196917
2013-12-10 13:51:53 +00:00
NAKAMURA Takumi ac85179219 [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196916
2013-12-10 12:40:37 +00:00
NAKAMURA Takumi 320b4d21c8 Add ObjCARCOpts to LINK_COMPONENTS.
llvm-svn: 196915
2013-12-10 12:40:11 +00:00
Elena Demikhovsky 6270b388c8 AVX-512: Changed intrinsics of VPCONFLICT to match GCC builtin form
llvm-svn: 196914
2013-12-10 11:58:35 +00:00
Tim Northover 0d3caa7ff6 Darwin: update clang test to new iOS default version (5.0)
llvm-svn: 196913
2013-12-10 11:53:25 +00:00
Tim Northover 3e8df696ea Darwin: update default iOS version to 5.0
Defaulting to iOS 3.0 when LLVM has to guess the version is no longer a useful
option and can give surprising results (like tail calls being disabled).

5.0 seems like a reasonable compromise as a platform that's still interesting
to some people.

rdar://problem/15567348

llvm-svn: 196912
2013-12-10 11:53:16 +00:00
NAKAMURA Takumi 17b23098ee [CMake] Add MCDisassembler to tools/lto. (has been removed since r196908)
lto.exports really exports LLVM-C Disasm stuff.

llvm-svn: 196911
2013-12-10 11:50:34 +00:00
Daniel Sanders c309be2f1f [mips][msa] Correct sld and sldi builtins.
Summary: The result register of these instructions is also the first operand.

Reviewers: jacksprat, dsanders

Reviewed By: dsanders

Differential Revision: http://llvm-reviews.chandlerc.com/D2362
Differential Revision: http://llvm-reviews.chandlerc.com/D2363

llvm-svn: 196910
2013-12-10 11:37:00 +00:00
Alexander Kornienko c1637f167c Allow predefined styles to define different options for different languages.
Summary:
Allow predefined styles to define different options for different
languages so that one can run:
  clang-format -style=google file1.cpp file2.js

or use a single .clang-format file with "BasedOnStyle: Google" for both c++ and
JS files.

Added Google style for JavaScript with "BreakBeforeTernaryOperators" set to
false.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 196909
2013-12-10 11:28:13 +00:00
NAKAMURA Takumi b5c4b87690 [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
NAKAMURA Takumi db0768cb8c Add JIT to LINK_COMPONENTS in MCJITTests/Makefile.
llvm-svn: 196907
2013-12-10 11:12:35 +00:00
Richard Sandiford bef3d7af2b Add TargetLowering::prepareVolatileOrAtomicLoad
One unusual feature of the z architecture is that the result of a
previous load can be reused indefinitely for subsequent loads, even if
a cache-coherent store to that location is performed by another CPU.
A special serializing instruction must be used if you want to force
a load to be reattempted.

Since volatile loads are not supposed to be omitted in this way,
we should insert a serializing instruction before each such load.
The same goes for atomic loads.

The patch implements this at the IR->DAG boundary, in a similar way
to atomic fences.  It is a no-op for targets other than SystemZ.

llvm-svn: 196906
2013-12-10 10:49:34 +00:00
Richard Sandiford 9afe613d12 Add TargetLowering::prepareVolatileOrAtomicLoad
One unusual feature of the z architecture is that the result of a
previous load can be reused indefinitely for subsequent loads, even if
a cache-coherent store to that location is performed by another CPU.
A special serializing instruction must be used if you want to force
a load to be reattempted.

Since volatile loads are not supposed to be omitted in this way,
we should insert a serializing instruction before each such load.
The same goes for atomic loads.

The patch implements this at the IR->DAG boundary, in a similar way
to atomic fences.  It is a no-op for targets other than SystemZ.

llvm-svn: 196905
2013-12-10 10:36:34 +00:00
Kostya Serebryany b00a0e2971 [asan] relax HugeMallocTest so that it does not fail on small-RAM machines
llvm-svn: 196904
2013-12-10 10:34:55 +00:00
Alexander Kornienko 6d2c88eafd Trivial change: added 'using clang::format::FormatStyle;'
llvm-svn: 196903
2013-12-10 10:30:34 +00:00
NAKAMURA Takumi 16ff7bd5d2 [CMake] lli/CMakeLists.txt: Move add_subdirectory(ChildTarget) to the front. It depends on nothing described in LLVM_LINK_COMPONENTS.
llvm-svn: 196902
2013-12-10 10:30:08 +00:00
Alexander Kornienko fdca83d487 Support GNU style rule to put a space before opening parenthesis.
Summary:
The rule from the GNU style states:
"We find it easier to read a program when it has spaces before the open-parentheses and after the commas."

http://www.gnu.org/prep/standards/standards.html#index-spaces-before-open_002dparen

This patch makes clang-format adds an option to put spaces before almost all open parentheses, except the cases, where different behavior is dictated by the style rules or language syntax:
  * preprocessor:
    ** function-like macro definitions can't have a space between the macro name and the parenthesis;
    ** `#if defined(...)` can have a space, but it seems, that it's more frequently used without a space in GCC, for example;
  * never add spaces after unary operators;
  * adding spaces between two opening parentheses is controlled with the `SpacesInParentheses` option;
  * never add spaces between `[` and `(` (there's no option yet).

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 196901
2013-12-10 10:18:34 +00:00
Kostya Serebryany b2eb3d3177 [asan] remove one test from SizedStackTest which relied on a now-wrong assumption that the left stack redzone is >= 32 bytes (PR18195)
llvm-svn: 196900
2013-12-10 09:49:31 +00:00
Rui Ueyama 0bf1381902 Add explicit keyword.
llvm-svn: 196898
2013-12-10 09:12:07 +00:00
Rui Ueyama 3619f00ad5 [PECOFF] Make more member functions non-virtual.
llvm-svn: 196897
2013-12-10 09:02:00 +00:00
Rui Ueyama 9c922dd6ae [PECOFF] Optimize the writer a bit by removing a loop.
llvm-svn: 196896
2013-12-10 08:59:12 +00:00
Rui Ueyama d9d4be6993 [PECOFF] Refactor COFF section header creation.
Code to create COFF section header was scattered across many member functions
of SectionChunk. Consolidate it to a member function of SectionHeaderTableChunk.

llvm-svn: 196895
2013-12-10 08:39:06 +00:00
Timur Iskhodzhanov 89a346c2a1 [ASan] Fix StackTrace::SlowUnwindStack on Windows
llvm-svn: 196894
2013-12-10 08:30:39 +00:00
Richard Smith 8e6afd4785 Regenerate DR status page.
llvm-svn: 196893
2013-12-10 08:26:19 +00:00
Richard Smith ab44d5badf Implement DR1460: fix handling of default initializers in unions; don't allow
more than one such initializer in a union, make mem-initializers override
default initializers for other union members, handle anonymous unions with
anonymous struct members better. Fix a couple of semi-related bugs exposed by
the tests for same.

llvm-svn: 196892
2013-12-10 08:25:00 +00:00
Rui Ueyama 27964e663b Add more const qualifiers.
llvm-svn: 196891
2013-12-10 07:15:57 +00:00
Rui Ueyama 17e663154a Remove data members used for relocations
... because they are used only in the function for relocations.

llvm-svn: 196890
2013-12-10 06:54:13 +00:00
Kevin Qin 43385c7065 [AArch64 NEON] Replace fpimm with fpz32 for floating compare with zero.
This is a small change to be strict. Just want get pattern safer.

llvm-svn: 196889
2013-12-10 06:51:07 +00:00
Kevin Qin fb79d7f843 [AArch64 NEON] Support poly128_t and implement relevant intrinsic.
llvm-svn: 196888
2013-12-10 06:49:01 +00:00
Kevin Qin 04396d1e69 [AArch64 NEON] Support poly128_t and implement relevant intrinsic.
llvm-svn: 196887
2013-12-10 06:48:35 +00:00
Rui Ueyama 906d93432e Skip the body of a loop as early as possible.
llvm-svn: 196884
2013-12-10 06:32:21 +00:00
Rui Ueyama c53b3b0809 Style fixes. No functionality change.
llvm-svn: 196883
2013-12-10 06:19:09 +00:00
NAKAMURA Takumi 7ce0fe015e GCOV.cpp: Use PRIu64 instead of %lu.
llvm-svn: 196882
2013-12-10 05:39:40 +00:00
NAKAMURA Takumi 396d4d3c7e Add proper dependencies to LLVMBuild.txt in llvm/lib.
I'll prune redundant deps in LLVMBuild.txt, later.

llvm-svn: 196881
2013-12-10 05:39:34 +00:00
NAKAMURA Takumi e3afe2ef62 Whitespaces.
llvm-svn: 196880
2013-12-10 05:39:12 +00:00
Reid Kleckner 0a9509f080 Revert "Fix miscompile of MS inline assembly with stack realignment"
This reverts commit r196876.  Its tests failed on the bots, so I'll
figure it out tomorrow.

llvm-svn: 196879
2013-12-10 05:31:27 +00:00
Rui Ueyama 2f47acfd6a Make anonymous namespace as small as possible.
Use of static is recommended by the style guide.

llvm-svn: 196877
2013-12-10 05:15:38 +00:00
Reid Kleckner 7f10a8cd45 Fix miscompile of MS inline assembly with stack realignment
For stack frames requiring realignment, three pointers may be needed:
- ebp to address incoming arguments
- esi (could be any callee-saved register) to address locals
- esp to address outgoing arguments

We would use esi unconditionally without verifying that it did not
conflict with inline assembly.

This change doesn't do the verification, it simply emits a fatal error
on functions that use stack realignment, dynamic SP adjustments, and
inline assembly.

Because stack realignment is common on Windows, we also no longer assume
that MS inline assembly clobbers esp.  Instead, we analyze the inline
instructions for implicit definitions and check if esp is there.  If so,
we require the use of a base pointer and consider it in the condition
above.

Mostly fixes PR16830, but we could try harder to find a non-conflicting
base pointer.

Reviewers: sunfish

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

llvm-svn: 196876
2013-12-10 05:12:23 +00:00
Chandler Carruth 3f697191bb Revert a final patch that was committed without the author contributing
it to the LLVM project through the appropriate channels.

This reverts:
r195837: "[Sanitizer] Add rudimentary support for using libbacktrace in ..."

llvm-svn: 196875
2013-12-10 04:40:39 +00:00