Commit Graph

161939 Commits

Author SHA1 Message Date
Chandler Carruth 1205a6c0c1 [PM] Run clang-format on a few lines that I missed in my first pass,
pulling them under 80-columns. No functionality changed.

llvm-svn: 194856
2013-11-15 21:44:35 +00:00
Ed Maste 21ad67b4ef test: Remove annotation for now-fixed FreeBSD issue pr15302
The failure to demangle 'anonymous namespace' on FreeBSD is fixed (twice)

- the failure in FreeBSD's in-tree __cxa_demangle has been addressed

- FreeBSD now uses the copy of the demangler built into lldb, due to other
  remaining limitations in the in-tree __cxa_demangle

llvm.org/pr15302

llvm-svn: 194855
2013-11-15 21:33:30 +00:00
Chad Rosier 7fa60db4a9 These ACLE tests no longer need to cast the return value.
llvm-svn: 194854
2013-11-15 21:28:24 +00:00
Chad Rosier 0c57c3402e [AArch64] Fix the scalar NEON ACLE functions so that they return float/double
rather than the vector equivalent.

llvm-svn: 194853
2013-11-15 21:28:10 +00:00
Rui Ueyama e448f9e418 Path: Recognize COFF import library file magic.
Summary: Make identify_magic to recognize COFF import file.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 194852
2013-11-15 21:22:02 +00:00
Rui Ueyama 94f2271d63 [PECOFF] Remove unnecessary static member.
llvm-svn: 194851
2013-11-15 21:12:11 +00:00
Richard Smith ca9b0b6863 Diagnose C++11 attributes before fp_contract pragmas.
llvm-svn: 194850
2013-11-15 21:10:54 +00:00
Richard Smith 33c7b4a8b3 Fix bogus diagnostic wording. There's no such thing as a compound expression.
llvm-svn: 194849
2013-11-15 21:08:45 +00:00
Adrian Prantl 7d828bbe46 Reimplement r194843 in a slightly less broken way.
llvm-svn: 194848
2013-11-15 21:05:09 +00:00
Rui Ueyama 9442a79914 [PECOFF] Give a better name to the linker generated file.
llvm-svn: 194847
2013-11-15 21:04:23 +00:00
Manman Ren bc37658a7f ArgumentPromotion: correctly transfer TBAA tags and alignments.
We used to use std::map<IndicesVector, LoadInst*> for OriginalLoads, and when we
try to promote two arguments, they will both write to OriginalLoads causing
created loads for the two arguments to have the same original load. And the same
tbaa tag and alignment will be put to the created loads for the two arguments.

The fix is to use std::map<std::pair<Argument*, IndicesVector>, LoadInst*>
for OriginalLoads, so each Argument will write to different parts of the map.

PR17906

llvm-svn: 194846
2013-11-15 20:41:15 +00:00
Alp Toker 7874bdc6c1 Revert "Using an invalid -O falls back on -O3 instead of an error"
Trying to fix test failures since earlier today.

One of the tests added in this commit is outputting test/Driver/clang_f_opts.s
which the builders that build in-tree (eg. clang-native-arm-cortex-a9) are
trying to run as a test case, causing failures.

clang_f_opts.c:
  If -### doesn't emit the warning then this test probably shouldn't be in
  here in the first place. Frontend maybe?

invalid-o-level.c:
  Running %clang_cc1 in the Driver tests doesn't make sense because -cc1
  bypasses the driver. (I'm not reverting the commit that introduced this but
  please fix instead of keeping it this way.)

Reverting to fix the build failures and also so that the tests can be thought
out more thoroughly.

This reverts commit r194817.

llvm-svn: 194845
2013-11-15 20:40:58 +00:00
Rui Ueyama 15ba1e20db Readobj: If NumbersOfSections is 0xffff, it's an COFF import library.
0xffff does not mean that there are 65535 sections in a COFF file but
indicates that it's a COFF import library. This patch fixes SEGV error
when an import library file is passed to llvm-readobj.

llvm-svn: 194844
2013-11-15 20:23:25 +00:00
Adrian Prantl fc0fea0251 Restore the behaviour from before r194728.
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie.

llvm-svn: 194843
2013-11-15 19:53:23 +00:00
Ed Maste ddb573063d Remove FreeBSD test failure annotations for llvm.org/pr17213
This was a FreeBSD kernel issue, now fixed.

llvm-svn: 194842
2013-11-15 19:15:43 +00:00
Bob Wilson 99d8fa92c3 Remove #include of net/ip_mroute.h for SANITIZER_MAC.
This header has not been supported at all for the last 2 major OS X releases.
Removed its include and the capture of related symbols.

<rdar://problem/15303348>

llvm-svn: 194841
2013-11-15 19:13:08 +00:00
Bob Wilson 9f3e6b25ee Avoid illegal integer promotion in fastisel
Stop folding constant adds into GEP when the type size doesn't match.
Otherwise, the adds' operands are effectively being promoted, changing the
conditions of an overflow.  Results are different when:

    sext(a) + sext(b) != sext(a + b)

Problem originally found on x86-64, but also fixed issues with ARM and PPC,
which used similar code.

<rdar://problem/15292280>

Patch by Duncan Exon Smith!

llvm-svn: 194840
2013-11-15 19:09:27 +00:00
Justin Bogner fd6cfe92d3 Add the CMakeLists.txt that was missed in r194825
llvm-svn: 194838
2013-11-15 18:34:43 +00:00
Hans Wennborg 444c37da85 clang-cl: Make the driver parse all(?) msvc flags
Even if we don't support a flag, we should be able to parse it
to provide a better error message than the current default
"error: no such file or directory: '/foo'" (which we should probably
also tweak, btw).

This also tries to clean up the test file a bit.

llvm-svn: 194837
2013-11-15 18:29:58 +00:00
Tom Stellard 519ae39c45 R600/SI: Add VReg_96 register class to SIRegisterInfo::hasVGPRs()
This fixes a crash with GNOME settings manager.

llvm-svn: 194836
2013-11-15 18:26:45 +00:00
Alp Toker 3aa8779ca2 Remove an unused local from r194827
llvm-svn: 194835
2013-11-15 18:09:28 +00:00
Justin Bogner 13a641b338 Darwin: Look for libc++ headers in include/, rather than lib/
Up until now we were expecting that when libc++ is installed alongside
clang the headers would be in lib/, which was true if the configure
build was used and false if the cmake build was.

We've now corrected the configure build to install in include/, and
with this change we'll be able to find the correct headers with both
build systems.

llvm-svn: 194834
2013-11-15 18:07:59 +00:00
Justin Bogner 2e8350b2b9 libc++: Install headers in include/, rather than lib/
When using the configure build system, the libc++ headers were being
installed in lib/, whereas cmake installs them in include/. Since
include/ makes more sense for headers, we'll make both systems install
headers there.

llvm-svn: 194833
2013-11-15 18:07:57 +00:00
Andrew Kaylor d9f3381e51 Resolve JIT runtime linking problems on Android.
Patch by James Lyon!

llvm-svn: 194832
2013-11-15 17:59:43 +00:00
Andrew Kaylor 3b44237938 Don't try to initialize memory for a global if the allocation failed in ExecutionEngine.
Patch by Dale Martin!

llvm-svn: 194831
2013-11-15 17:52:54 +00:00
Fariborz Jahanian 617e49ad59 ObjectiveC. Fixes a bogus warning of unused backing
ivar when property belongs to a super class and
currnt class happens to have a method with same name as
property. // rdar//15473432

llvm-svn: 194830
2013-11-15 17:48:00 +00:00
Chad Rosier a6dedc6ccc Update contact information.
llvm-svn: 194829
2013-11-15 17:35:53 +00:00
Chad Rosier 24def30af6 Update contact information.
llvm-svn: 194828
2013-11-15 17:35:29 +00:00
Hans Wennborg 88497d6157 [-cxx-abi microsoft] Emit thunks for pointers to virtual member functions
Instead of storing the vtable offset directly in the function pointer and
doing a branch to check for virtualness at each call site, the MS ABI
generates a thunk for calling the function at a specific vtable offset,
and puts that in the function pointer.

This patch adds support for emitting such thunks. However, it doesn't support
pointers to virtual member functions that are variadic, have an incomplete
aggregate return type or parameter, or are overriding a function in a virtual
base class.

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

llvm-svn: 194827
2013-11-15 17:24:45 +00:00
Daniel Sanders 6747c64068 [mips][msa] Merge basic_operations_little.ll into basic_operations.ll.
Now that FileCheck supports multiple check prefixes, we don't need to keep the
little and big endian versions of this test separate anymore. Merge them back
together.

llvm-svn: 194826
2013-11-15 17:24:41 +00:00
Howard Hinnant 6a0d6cea40 Justin Bogner: This makes the headers available in the build directory, making it
easier to use freshly-built clang with freshly-built libc++.

Basically, this makes it possible to run clang with libc++ without
having to install it, even if you don't have any version of libc++
installed in /usr/

llvm-svn: 194825
2013-11-15 17:18:57 +00:00
Cameron McInally ad41f1f693 Add AVX512 unmasked FMA intrinsics and support.
llvm-svn: 194824
2013-11-15 17:01:14 +00:00
Dmitry Vyukov 4bbe6dc8a9 tsan: add support for robust mutexes
llvm-svn: 194823
2013-11-15 16:58:12 +00:00
Alexander Potapenko 4fe1301bea [ASan] Fix darwin-sanitizer-ld.c for iossim, which seems to use -lc++ instead of -lstdc++.
llvm-svn: 194822
2013-11-15 16:57:57 +00:00
Justin Holewinski f4919c545d [NVPTX] Fix type in usage doc
llvm-svn: 194821
2013-11-15 16:08:49 +00:00
Alexander Potapenko 868cca96c4 [ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Add a test.

llvm-svn: 194820
2013-11-15 16:07:44 +00:00
Daniel Sanders 71ce0cab02 [mips][msa] lowerMSABitClear() should use SelectionDAG::getNOT() instead of using a long-winded equivalent.
Now that getConstant(-1, MVT::v2i64) works correctly on MIPS32 we can use
SelectionDAG::getNOT() to produce the bitmask.

llvm-svn: 194819
2013-11-15 16:02:04 +00:00
Alexey Samsonov 0d4f1c51db Hopefully fix uninitialized memory read in AArch64AsmParser found by MSan bootstrap bot
llvm-svn: 194818
2013-11-15 15:49:30 +00:00
Sylvestre Ledru 6ae3980118 Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Reviewers: chandlerc, rafael, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

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

llvm-svn: 194817
2013-11-15 15:39:14 +00:00
Alexander Potapenko 19e7bfdd8d [ASan] If the iOS Simulator SDK is available, build the ASan iossim runtime using configure+make.
llvm-svn: 194816
2013-11-15 14:56:31 +00:00
Sylvestre Ledru f0f2d58086 Improve the set of the Python libraries during the cmake build.
Thanks to Kal Conley for the patch

llvm-svn: 194815
2013-11-15 14:15:10 +00:00
Alp Toker 9c5ae47c94 Ignore test Inputs globally and remove redundant lit.local.cfg files
By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.

This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.

llvm-svn: 194814
2013-11-15 13:37:49 +00:00
Alexander Potapenko bf50fbfc21 [ASan] Add the configure+make rules for building the ASan runtime for iOS simulator.
llvm-svn: 194813
2013-11-15 13:13:01 +00:00
Justin Holewinski fb9bd75370 [NVPTX] Update the usage document
llvm-svn: 194812
2013-11-15 13:02:10 +00:00
Daniel Sanders 50b8041066 Fix illegal DAG produced by SelectionDAG::getConstant() for v2i64 type
Summary:
When getConstant() is called for an expanded vector type, it is split into
multiple scalar constants which are then combined using appropriate build_vector
and bitcast operations.

In addition to the usual big/little endian differences, the case where the
element-order of the vector does not have the same endianness as the elements
themselves is also accounted for.  For example, for v4i32 on big-endian MIPS,
the byte-order of the vector is <3210,7654,BA98,FEDC>. For little-endian, it is
<0123,4567,89AB,CDEF>.
Handling this case turns out to be a nop since getConstant() returns a splatted
vector (so reversing the element order doesn't change the value)

This fixes a number of cases in MIPS MSA where calling getConstant() during
operation legalization introduces illegal types (e.g. to legalize v2i64 UNDEF
into a v2i64 BUILD_VECTOR of illegal i64 zeros). It should also handle bigger
differences between illegal and legal types such as legalizing v2i64 into v8i16.

lowerMSASplatImm() in the MIPS backend no longer needs to avoid calling
getConstant() so this function has been updated in the same patch.

For the sake of transparency, the steps I've taken since the review are:
* Added 'virtual' to isVectorEltOrderLittleEndian() as requested. This revealed
  that the MIPS tests were falsely passing because a polymorphic function was
  not actually polymorphic in the reviewed patch.
* Fixed the tests that were now failing. This involved deleting the code to
  handle the MIPS MSA element-order (which was previously doing an byte-order
  swap instead of an element-order swap). This left
  isVectorEltOrderLittleEndian() unused and it was deleted.
* Fixed build failures caused by rebasing beyond r194467-r194472. These build
  failures involved the bset, bneg, and bclr instructions added in these commits
  using lowerMSASplatImm() in a way that was no longer valid after this patch.
  Some of these were fixed by calling SelectionDAG::getConstant() instead,
  others were fixed by a new function getBuildVectorSplat() that provided the
  removed functionality of lowerMSASplatImm() in a more sensible way.

Reviewers: bkramer

Reviewed By: bkramer

CC: llvm-commits

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

llvm-svn: 194811
2013-11-15 12:56:49 +00:00
Justin Holewinski 3d49e5c655 [NVPTX] Fix handling of indirect calls
Using a special machine node is cleaner than an InlineAsm node, and fixes an assertion failure in InstrEmitter

llvm-svn: 194810
2013-11-15 12:30:04 +00:00
Kostya Serebryany b41503253b [asan] helper script to dump/merge coverage data
llvm-svn: 194809
2013-11-15 11:51:08 +00:00
Yaron Keren a17df036b5 Correct spelling.
llvm-svn: 194808
2013-11-15 11:42:49 +00:00
Manuel Klimek fe3f34e50b Always add core checkers if static analyzer checks are enabled.
In response to post-commit feedback by Jordan, this is required to
make sure path-sensitive checks work correctly.

llvm-svn: 194807
2013-11-15 11:19:56 +00:00
Daniel Sanders 1ede3002fa [mips][msa] Build all the tests in little and big endian modes and correct an incorrect test.
Summary:
This patch (correctly) breaks some MSA tests by exposing the cases when
SelectionDAG::getConstant() produces illegal types. These have been temporarily
marked XFAIL and the XFAIL flag will be removed when
SelectionDAG::getConstant() is fixed.

There are three categories of failure:
* Immediate instructions are not selected in one endian mode.
* Immediates used in ldi.[bhwd] must be different according to endianness.
  (this only affects cases where the 'wrong' ldi is used to load the correct
   bitpattern. E.g. (bitcast:v2i64 (build_vector:v4i32 ...)))
* Non-immediate instructions that rely on immediates affected by the
  previous two categories as part of their match pattern.
  For example, the bset match pattern is the vector equivalent of
  'ws | (1 << wt)'.

One test needed correcting to expect different output depending on whether big
or little endian was in use. This test was
test/CodeGen/Mips/msa/basic_operations.ll and experiences the second category
of failure shown above. The little endian version of this test is named
basic_operations_little.ll and will be merged back into basic_operations.ll in
a follow up commit now that FileCheck supports multiple check prefixes.

Reviewers: bkramer, jacksprat, dsanders

Reviewed By: dsanders

CC: llvm-commits

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

llvm-svn: 194806
2013-11-15 11:04:16 +00:00