Commit Graph

230894 Commits

Author SHA1 Message Date
Davide Italiano e7c56c5c4f [SCCP] Use range-based for loops. NFC.
llvm-svn: 269578
2016-05-14 20:59:09 +00:00
Mehdi Amini c048b6c4cd Revert "Revert 220932.": "Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex"
This reverts commit r221331 and reinstate r220932 as discussed in D19271.
Original commit message was:

This patch adds an llvm_call_once which is a wrapper around
std::call_once on platforms where it is available and devoid
of bugs. The patch also migrates the ManagedStatic mutex to
be allocated using llvm_call_once.

These changes are philosophically equivalent to the changes
added in r219638, which were reverted due to a hang on Win32
which was the result of a bug in the Windows implementation
of std::call_once.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269577
2016-05-14 20:55:52 +00:00
Xinliang David Li 23a66e45ed [profile] Eliminate dynamic memory allocation for vp writing
This is part-3 of the effort to eliminate dependency on
libc allocator in instr profiler runtime. With this change,
the profile dumper is completely free of malloc/calloc. 
Value profile instr API implementation is the only remaining
piece with calloc dependency.

llvm-svn: 269576
2016-05-14 20:12:42 +00:00
Oleksiy Vyalov 94854be9e1 Revert r269546 "Added support to the ASTImporter for C++ constructor initializers." as it breaks TestDataFormatterSynthVal.DataFormatterSynthValueTestCase.test_with_run_command_dwarf test - http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/14699
llvm-svn: 269575
2016-05-14 19:07:13 +00:00
Saleem Abdulrasool 8df2f49889 ARM: support export directives for Windows
It seems that cl will emit the export directives for Windows ARM targets.  The
fact that it did this had originally been missed and this functionality was
never implemented.  This makes it possible to rely solely on the source code for
indicating what the exported interfaces are and brings us more compatibility
with cl.

llvm-svn: 269574
2016-05-14 18:58:34 +00:00
Chad Rosier 7e8dd51d50 [AArch64] Update local variable names to conform to coding standard. NFC.
llvm-svn: 269573
2016-05-14 18:56:28 +00:00
Nick Lewycky 2eeddfb1ef Warn when a reference is bound to an empty l-value (dereferenced null pointer).
llvm-svn: 269572
2016-05-14 17:44:14 +00:00
Daniel Sanders 962b2cda9c [mips][ias] Two XFAIL's now pass on 32-bit MIPS.
llvm-svn: 269571
2016-05-14 16:18:16 +00:00
Craig Topper 77334aa996 [AVX512] Immediate for permd builtins should be an ICE.
llvm-svn: 269570
2016-05-14 15:27:13 +00:00
Elena Demikhovsky e79b716daf Fixed lowering of _comi_ intrinsics from all sets - SSE/SSE2/AVX/AVX-512
Differential revision http://reviews.llvm.org/D19261

llvm-svn: 269569
2016-05-14 15:06:09 +00:00
Renato Golin f4917d35c9 Revert "[llc] New diagnostic handler"
This reverts commit r269563. Even though now it passes all LLDB bots
after a local fix, there's a new buildbot it fails with tests that we
hadn't seen locally:

http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15647

Adding those tests to the list to investigate.

llvm-svn: 269568
2016-05-14 14:37:11 +00:00
NAKAMURA Takumi 2c8500996d Re-enable llvm/test/ThinLTO/X86/cache.ll.
This reverts;
  r269548, "XFAIL ThinLTO Caching test on Windows."
  r269561, "Rework r269548, "XFAIL ThinLTO Caching test on Windows.", not to use XFAIL, for now."

llvm-svn: 269567
2016-05-14 14:28:17 +00:00
Renato Golin ace59c711a [Docs] Add some requirements to the Testing Guide
Patch by Diana Picus.

llvm-svn: 269566
2016-05-14 14:27:40 +00:00
NAKAMURA Takumi f5e36ad863 CachePruning.cpp: Don't use errno.
llvm-svn: 269565
2016-05-14 14:21:39 +00:00
Dima Stepanov 590d7b2e4a Revert changes after test commit.
llvm-svn: 269564
2016-05-14 13:29:52 +00:00
Renato Golin c001e67baf [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h.

Patch by Diana Picus.

llvm-svn: 269563
2016-05-14 13:15:22 +00:00
Renato Golin 15cb0bd080 [LLDB] Adding lldb_private namespace to DiagnosticSeverity. NFC.
This is a fix due to the addition of the new DiagnosticSeverity in
LLVMContext.h. This may warrant a change in name to be LLDB specific
but I leave that to the LLDB experts to refactor.

llvm-svn: 269562
2016-05-14 13:14:39 +00:00
NAKAMURA Takumi c50a2a93ae Rework r269548, "XFAIL ThinLTO Caching test on Windows.", not to use XFAIL, for now.
It was passing (and is XPASSing) with --host=linux --target=win32.

llvm-svn: 269561
2016-05-14 12:47:40 +00:00
Daniel Sanders e160f83f71 [mips] Enable IAS by default for 32-bit MIPS targets (O32).
Summary:
The MIPS IAS can now pass 'ninja check-all', recurse, build a bootable linux
kernel, and pass a variety of LNT testing.

Unfortunately we can't enable it by default for 64-bit targets yet since the N32
ABI is still very buggy and this also means we can't enable it for N64 either
because we can't distinguish between N32 and N64 in the relevant code.

Reviewers: vkalintiris

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18759
Differential Revision: http://reviews.llvm.org/D18761

llvm-svn: 269560
2016-05-14 12:43:08 +00:00
NAKAMURA Takumi 81b08dedde ModuleMap.h: Fix a \param. [-Wdocumentation]
llvm-svn: 269559
2016-05-14 12:37:06 +00:00
Dima Stepanov 435072d3e1 Test commt: remove a blank line.
llvm-svn: 269558
2016-05-14 10:30:54 +00:00
NAKAMURA Takumi 2326f79a60 MSVCToolChain.cpp: Make version.dll generic for win32.
We may consider msvc features may be capable on mingw host, if it can.
Consider --host=mingw --target=msvc.

llvm-svn: 269557
2016-05-14 08:12:37 +00:00
NAKAMURA Takumi 4b8e3e59cd MSVCToolChain.cpp: Use explicit constructor for SmallString from std::string, to appease mingw-g++.
llvm-svn: 269556
2016-05-14 08:09:12 +00:00
NAKAMURA Takumi bfd1e9a044 llvm/Support/MachO.h: Fix warnings. [-Wpedantic]
llvm-svn: 269555
2016-05-14 08:00:11 +00:00
Sean Callanan f3682a7014 Update identifiers as needed when loading macros from serialized ASTs.
This is essential for iterating across macros properly, which LLDB does when
loading macros from modules.  A naiver version of this patch (without the
conditional) caused assertion failures in the testsuite, but this version should
be safe.

Thanks to Ben Langmuir for the refinement that made this work.

llvm-svn: 269554
2016-05-14 06:24:14 +00:00
Sean Callanan f94ef1df8b Fixed a bug where the ASTImporter didn't propagate builtin IDs at all.
IdentifierInfos are assigned builtin IDs during parsing, but Idents.get() does 
not do that work.  So the ASTImporter needs to additionally set the builtin ID
for the newly-created IdentifierInfo.  This patch does that.

Currently ASTMerge tests only check syntax and the ASTMatchers don't check for
builtin IDs, so this is tricky to test, but LLDB will have a test for this.

llvm-svn: 269553
2016-05-14 06:11:19 +00:00
Craig Topper 4537ea74eb [X86] Change most 'void' pointers in builtin type lists to more correct types. Fix some unaligned load/store intrinsics to use a less aligned type in their pointer casts.
llvm-svn: 269552
2016-05-14 06:03:13 +00:00
Sean Callanan 041cceb019 Handle injected class names in the ASTImporter.
Every class as parsed by Clang has a forward declaration of itself as a member:

class A {
  class A;
  ...
}

but when the parser generates this it ensures that the RecordTypes for the two 
are the same.  This makes (among other things) inheritance work.  This patch
fixes a bug where the ASTImporter generated two separate RecordTypes when
importing the class and the contained forward declaration, and adds a test case.

Thanks to Doug Gregor for advice on this.

llvm-svn: 269551
2016-05-14 05:43:57 +00:00
Chandler Carruth a3cd590644 Revert "Reapply "[ProfileData] (compiler-rt) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269493 as the corresponding LLVM commit was
reverted due to lots of warnings. See the review thread for the original
LLVM commit (r269491) for details.

llvm-svn: 269550
2016-05-14 05:40:00 +00:00
Chandler Carruth 1b766d09d1 Revert "Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269492 as the corresponding LLVM commit was
reverted due to lots of warnings. See the review thread for the original
LLVM commit (r269491) for details.

llvm-svn: 269549
2016-05-14 05:39:45 +00:00
Mehdi Amini 66862c2797 XFAIL ThinLTO Caching test on Windows.
I have no idea what's going on on Windows here.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269548
2016-05-14 05:38:58 +00:00
Chandler Carruth 5957375902 Revert "Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269491. It triggers warnings with Clang, breaking
builds for -Werror users including several build bots.

llvm-svn: 269547
2016-05-14 05:26:26 +00:00
Sean Callanan 55d486d72a Added support to the ASTImporter for C++ constructor initializers.
Thanks to Aleksei Sidorin for review and advice.

llvm-svn: 269546
2016-05-14 05:20:31 +00:00
Mehdi Amini ab4a8b6ca3 Add testing in llvm-lto for ThinLTO caching.
Trying to improve code coverage for `make check`

From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8>
llvm-svn: 269545
2016-05-14 05:16:41 +00:00
Mehdi Amini b02139d66f ThinLTOCodeGenerator: handle cases where temporary files can't be renamed
For instance when they're on different filesystem.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269544
2016-05-14 05:16:35 +00:00
Mehdi Amini 34b0241b81 Revert "Add testing in llvm-lto for ThinLTO caching."
This reverts commit r269538 and r269542.
"rename()" is expected to fail across filesystems, will handle this.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269543
2016-05-14 05:07:44 +00:00
Mehdi Amini e19c794741 Increase verbosity in the test output to help debugging windows issues
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269542
2016-05-14 05:01:36 +00:00
Mehdi Amini 2a16a5fae5 ThinLTOCodeGenerator: handle std::error_code instead of silently dropping it.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269541
2016-05-14 04:58:38 +00:00
Mehdi Amini db8dd5515d StripDebugInfo: uses isa<DbgInfoIntrinsic> instead of matching against llvm.dbg.* (NFC)
Suggested by Adrian. This is NFC right now but is more clean and
robust against future potential new debug info intrinsics.

From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8>
llvm-svn: 269540
2016-05-14 04:58:35 +00:00
Mehdi Amini 2f8a5f3f44 Revert "StripDebugInfo: uses isa<DbgInfoIntrinsic> instead of matching against llvm.dbg.* (NFC)"
This reverts commit r269537, was not ready to be commited and went through by mistake

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269539
2016-05-14 04:42:51 +00:00
Mehdi Amini dec0e54d58 Add testing in llvm-lto for ThinLTO caching.
Trying to improve code coverage for `make check`

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269538
2016-05-14 04:41:26 +00:00
Mehdi Amini ac85189998 StripDebugInfo: uses isa<DbgInfoIntrinsic> instead of matching against llvm.dbg.* (NFC)
Suggested by Adrian. This is NFC right now but is more clean and
robust against future potential new debug info intrinsics.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269537
2016-05-14 04:41:21 +00:00
Mehdi Amini cbe76a0df7 Remove unwanted fprintf debug
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269536
2016-05-14 04:41:14 +00:00
Craig Topper 449c2ea734 Revert r269534 "Silence a -Wundefined-var-template build warning." The bots didn't like that.
llvm-svn: 269535
2016-05-14 03:59:25 +00:00
Craig Topper a72939bc64 Silence a -Wundefined-var-template build warning.
llvm-svn: 269534
2016-05-14 03:48:43 +00:00
Xinliang David Li a16c754e17 minor cleanup -- reset buffer pointer
llvm-svn: 269533
2016-05-14 03:16:47 +00:00
Marcin Koscielnicki bcbba8caed Revert "[MSan] Enable on PowerPC64."
This reverts commit r269522.

This broke dtls_test.c on ppc64le buildbots.

llvm-svn: 269532
2016-05-14 02:17:38 +00:00
Dan Gohman a01e8bde57 [WebAssembly] Fix legalization of i128 shifts.
compiler-rt/libgcc shift routines expect the shift count to be an i32, so
use i32 as the shift count for shifts that are legalized to libcalls. This
also reverts r268991, now that the signatures are correct.

llvm-svn: 269531
2016-05-14 02:15:47 +00:00
Richard Smith 9385d704c1 When typo-correcting a using-declaration, actually correct the name of the
UsingDecl (so that redeclaration lookup can find it).

llvm-svn: 269530
2016-05-14 01:58:49 +00:00
Richard Smith 81ef0e1adb Fix some typos.
llvm-svn: 269528
2016-05-14 01:21:40 +00:00