Commit Graph

186709 Commits

Author SHA1 Message Date
Hans Wennborg 05d50a9645 clang-cl: Ignore the new /Zo[-] option (PR21571)
Also fix the ignored options test which didn't fail properly on
unknown options.

llvm-svn: 222013
2014-11-14 18:24:08 +00:00
Matt Arsenault 94812216ef R600/SI: Use S_BFE_I64 for 64-bit sext_inreg
llvm-svn: 222012
2014-11-14 18:18:16 +00:00
Daniel Jasper 4bfa736f1b clang-format: [Java] Further improve generics formatting.
llvm-svn: 222011
2014-11-14 17:30:15 +00:00
Daniel Jasper d127e3b6af clang-format: Correctly detect multiplication in ctor initializer.
Before:
  Constructor() : a(a), area(width *height) {}

After:
  Constructor() : a(a), area(width * height) {}

llvm-svn: 222010
2014-11-14 17:26:49 +00:00
Fariborz Jahanian b7859ddf9b [Sema]. Warn when logical expression is a pointer
which evaluates to true. rdar://18716393.
Reviewed by Richard Trieu

llvm-svn: 222009
2014-11-14 17:12:50 +00:00
Chad Rosier df8f2a23cb [Reassociate] Canonicalize the operands of all binary operators.
llvm-svn: 222008
2014-11-14 17:09:19 +00:00
Frederic Riss 39e1cda45b Tentatively appease the bots.
If this workaround gets the bots green, then we have to find out
why the -dwarf-accel-tables=Enable option doesn't work as
expected on non-darwin platforms.

llvm-svn: 222007
2014-11-14 17:08:18 +00:00
Chad Rosier d99df68e19 [Reassociate] Canonicalize operands of vector binary operators.
Prior to this commit fmul and fadd binary operators were being canonicalized for
both scalar and vector versions.  We now canonicalize add, mul, and, or, and xor
vector instructions.

llvm-svn: 222006
2014-11-14 17:08:15 +00:00
Chad Rosier f8b55f1bc5 [Reassociate] Canonicalize constants to RHS operand.
llvm-svn: 222005
2014-11-14 17:05:59 +00:00
Oleksiy Vyalov 477e42a6fb Apply SOCK_CLOEXEC flag to socket API functions in order to avoid handle leakage to a forked child process.
http://reviews.llvm.org/D6204

llvm-svn: 222004
2014-11-14 16:25:18 +00:00
Frederic Riss e837ec29c3 Reapply "[dwarfdump] Add support for dumping accelerator tables."
This reverts commit r221842 which was a revert of r221836 and of the
test parts of r221837.

This new version fixes an UB bug pointed out by David (along with
addressing some other review comments), makes some dumping more
resilient to broken input data and forces the accelerator tables
to be dumped in the tests where we use them (this decision is
platform specific otherwise).

llvm-svn: 222003
2014-11-14 16:15:53 +00:00
Cameron McInally 04400449c5 [AVX512] Add 512b masked integer shift by immediate patterns.
llvm-svn: 222002
2014-11-14 15:43:00 +00:00
Jay Foad 1180c05db2 [ASan] Improved stack overflow detection for PowerPC64
Summary:
AsanOnSIGSEGV has some heuristics for detecting stack overflow, but
they don't cope with a PowerPC store-with-update instruction which
modifies sp and stores to the modified address in one instruction.

This patch adds some PowerPC-specific code to check for this case.

This fixes the last few cases of the stack-overflow test.

Reviewers: kcc, samsonov, eugenis

Reviewed By: eugenis

Subscribers: llvm-commits

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

llvm-svn: 222001
2014-11-14 15:30:39 +00:00
Evgeniy Stepanov ceaebb8ebb [sanitizer] Extend a comment in SlowUnwind.
This better explains a change in r221520.

llvm-svn: 222000
2014-11-14 15:13:23 +00:00
Chad Rosier f59e548ba7 [Reassociate] Improve rank debug information. NFC.
llvm-svn: 221999
2014-11-14 15:01:38 +00:00
Aaron Ballman 918474c7f9 Silencing a -Wparentheses warning; NFC.
llvm-svn: 221998
2014-11-14 14:40:49 +00:00
Timur Iskhodzhanov 4d28002728 Replace weird whitespace symbols with good old spaces
llvm-svn: 221997
2014-11-14 14:16:34 +00:00
Timur Iskhodzhanov 46a18efa5a Add one illustrative class hierarchy as an example in a comment to the VFTableBuilder code
llvm-svn: 221996
2014-11-14 14:10:15 +00:00
Tom Stellard 9dec074399 R600/SI: Fix assembly names for exec_hi and exec_lo
llvm-svn: 221995
2014-11-14 14:08:04 +00:00
Tom Stellard 9d7ddd516e R600/SI: Start implementing an assembler
This was done using the Sparc and PowerPC AsmParsers as guides.  So far it
is very simple and only supports sopp instructions.

llvm-svn: 221994
2014-11-14 14:08:00 +00:00
Aaron Ballman 631bd7b110 Oops, the underline was too short for sphinx to like.
llvm-svn: 221993
2014-11-14 14:01:55 +00:00
Aaron Ballman eb1e2f213a Correcting some grammar and typos, and adding CERT as a collaborator.
llvm-svn: 221992
2014-11-14 13:48:34 +00:00
Aaron Ballman a0344c5d7b Complete support for the SD-6 standing document (based off N4200) with support for __has_cpp_attribute.
llvm-svn: 221991
2014-11-14 13:44:02 +00:00
Daniel Jasper c670688add clang-format: Give clang-format-diff.py a -v option.
With it, it prints the file being formatted. Apparently people are
formatting thousands of files and some progress indication is helpful.

llvm-svn: 221990
2014-11-14 13:27:28 +00:00
Daniel Jasper 6c0ee17b89 clang-format: Improve function parameter packing.
Before:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb);

After:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa,
      int bbbbbbbbbbbbb);

llvm-svn: 221989
2014-11-14 13:14:45 +00:00
Bill Schmidt 8ff672d397 [PowerPC] Enable vec_perm for long long and double vector types for VSX
VSX makes the "vector long long" and "vector double" types available.
This patch enables the vec_perm interface for these types.  The same
builtin is generated regardless of the specified type, so no
additional work or testing is needed in the back end.  Tests are added
to ensure this builtin is generated by the front end.

llvm-svn: 221988
2014-11-14 13:10:13 +00:00
Daniel Jasper 6c22c44e12 clang-format: Support assignments as conditional operands.
Before:
  return a != b
             // comment
             ? a
             : a = a != b
                   // comment
         ? a =
               b : a;
After:
  return a != b
             // comment
             ? a
             : a = a != b
                       // comment
                       ? a = b
                       : a;

llvm-svn: 221987
2014-11-14 13:03:40 +00:00
Evgeniy Stepanov ba7308c07e [asan] Revert r221882.
This code is not part of ASan runtime (as it may be linked into a different
DSO), and thus can not call non-exported functions.

llvm-svn: 221986
2014-11-14 13:02:28 +00:00
Daniel Jasper 119ff533e4 clang-format: Improve indentation of comments in expressions.
Before:
  int i = (a)
              // comment
          + b;
  return aaaa == bbbb
                 // comment
             ? aaaa
             : bbbb;
After:
  int i = (a)
          // comment
          + b;
  return aaaa == bbbb
             // comment
             ? aaaa
             : bbbb;

llvm-svn: 221985
2014-11-14 12:31:14 +00:00
Bill Schmidt cee13a2712 [PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a
new test case.  The builtins are accessed using vec_div in altivec.h.
Builtins are listed (mostly) alphabetically there, so inserting these
changed the line numbers for deprecation warnings tested in
test/Headers/altivec-intrin.c.

There is a companion patch for LLVM.

llvm-svn: 221984
2014-11-14 12:10:51 +00:00
Bill Schmidt 7674692961 [PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a
test case.  Straightforward stuff.

There's a companion patch for Clang.

llvm-svn: 221983
2014-11-14 12:10:40 +00:00
Tobias Grosser c98a8fccf7 Use nullptr instead of '0' for pointers
llvm-svn: 221982
2014-11-14 11:12:31 +00:00
Daniel Jasper 734d52b58b clang-format: [Java] Fix line break behavior of class declarations.
Change breaking preferences:
1. Break before "extends"
2. Break before "implements"
3. Break within the implements list.

llvm-svn: 221981
2014-11-14 10:15:56 +00:00
Stephane Sezer 5109a7938d Properly specify the regex used to match register indexes.
Summary: Something like "core:1" would match and try to be interpreted by the following code otherwise.

Test Plan: Run tests and make sure the ones failing previously now pass.

Reviewers: tfiala, clayborg

Subscribers: lldb-commits

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

llvm-svn: 221980
2014-11-14 09:46:21 +00:00
Daniel Jasper 09f6abe8d8 clang-format: [Java] Improve generic return type formatting.
Before:
  public<R> ArrayList<R> get() {

After:
  public <R> ArrayList<R> get() {

llvm-svn: 221979
2014-11-14 09:05:32 +00:00
Daniel Jasper 30a2406e65 clang-format: [Java] No altnerative operator names in Java.
Before:
  someObject.and ();

After:
  someObject.and();

llvm-svn: 221978
2014-11-14 09:02:28 +00:00
David Majnemer 2ee635a6a6 Calm down build bots
r221975 seemed to trigger an ambiguous conversion that only irritated
clang, not gcc.

llvm-svn: 221977
2014-11-14 08:38:17 +00:00
Daniel Jasper 61d81973c1 clang-format: [Java] Improve formatting of generics.
Before:
  Function < F, ? extends T > function;

After:
  Function<F, ? extends T> function;

llvm-svn: 221976
2014-11-14 08:22:46 +00:00
David Majnemer f69b0585c1 obj2yaml, yaml2obj: Add support for COFF executables
In support of serializing executables, obj2yaml now records the virtual address
and size of sections.  It also serializes whatever we strictly need from
the PE header, it expects that it can reconstitute everything else via
inference.

yaml2obj can reconstitute a fully linked executable.

In order to get executables correctly serialized/deserialized, other
bugs were fixed as a circumstance.  We now properly respect file and
section alignments.  We also avoid writing out string tables unless they
are strictly necessary.

llvm-svn: 221975
2014-11-14 08:15:42 +00:00
Simon Atanasyan 55c2699d29 Follow-up to r221913. Fix some -Wcast-qual warning reasons.
llvm-svn: 221974
2014-11-14 07:15:43 +00:00
Rafael Espindola c50a913f32 Use size_type for operator[].
This matches std::vector and is more efficient as it avoids
truncations.

With this the text segment of opt goes from 19705442 bytes
to 19703930 bytes.

llvm-svn: 221973
2014-11-14 07:02:38 +00:00
Shankar Easwaran c37f8af577 [ELF] Dynamic section was not aligned properly.
The dynamic section was not aligned properly. The alignment of the section is
determined by the word size of the architecture.

llvm-svn: 221972
2014-11-14 04:57:21 +00:00
NAKAMURA Takumi 548d7f614f SearchForAddressOfSymbol(): Disable 3 symbols, copysignf, fminf, and fmaxf, on msc17. *These were added in VS 2013*
llvm-svn: 221971
2014-11-14 04:53:55 +00:00
Alexey Bataev 9aba41c822 [OPENMP] Temporary fix for processing of global variables in loops.
Currently there is a bug in processing of global variables used as loop control variables in 'omp for/simd' constructs: these globals must be captured as private variables, but currently they are nor. This is a temporary bug fix for this problem until the correct solution is prepared. If a global var used as lcv without explicit mark as a private/linear/lastprivate the error message is emitted.

llvm-svn: 221970
2014-11-14 04:08:45 +00:00
Eric Fiselier 950a166710 Split string capacity test into two parts and mark one part as UNSUPPORTED when using sanitizers.
The test is split such that:
- max_size.pass.cpp tests that string::resize() fails to allocator for max_size
  and max_size -1
- over_max_size.pass.cpp tests that string::resize() throws a length error for
  max_size + 1

The test was split into two because max_size.pass.cpp cannot pass with 
sanitizers but over_max_size.pass.cpp can.

llvm-svn: 221969
2014-11-14 03:16:12 +00:00
Alexey Samsonov 4c12c6cf3b [Sanitizer] Refactor SanitizerArgs parsing in Driver.
Remove flag parsing details from the public header.
Use SanitizerSet to represent the set of enabled sanitizers.
Cleanup the implementation: update the comments to
reflect reality, remove dead code.

No functionality change.

llvm-svn: 221968
2014-11-14 02:59:20 +00:00
Eric Fiselier eb2378b70c Mark more tests as UNSUPPORTED with ASAN and MSAN.
These tests fail for 2 reasons when using ASAN and MSAN.
1. If allocator_may_return_null=0 they will fail because null is returned
   or an exception is thrown.
2. When allocator_may_return_null=1 the new_handler is still not called. This
   results in an assertion failures.

llvm-svn: 221967
2014-11-14 02:55:16 +00:00
Eric Fiselier b941b50b16 Setup llvm-symbolizer when running the tests with sanitizers
llvm-svn: 221966
2014-11-14 02:47:08 +00:00
Matt Arsenault 21c938e14b R600/SI: Make constant array static
llvm-svn: 221965
2014-11-14 02:21:58 +00:00
Eric Fiselier bc2d632964 Add -O3 when testing with UBSAN. This triggers far undefined behaviour
llvm-svn: 221964
2014-11-14 02:07:52 +00:00