Commit Graph

204684 Commits

Author SHA1 Message Date
Rafael Espindola 704cd841a1 Simplify. NFC.
llvm-svn: 241456
2015-07-06 15:47:43 +00:00
Ed Schouten 2a80cab90e Make locale code compile on CloudABI.
After r241454 landed, libc++'s locale code compiles on CloudABI, with
the exception of the following two bits:

- CloudABI doesn't have setlocale(), as the C library does not keep
  track of any global state. The global locale is always set to "C".
  Disable the call to setlocale() on this system.
- Similarly, mbtowc_l() is also not present, as it is also not
  thread-safe. As CloudABI does not support state-dependent encodings,
  simply disable that part of the logic.

The locale code now compiles out of the box on CloudABI.

Differential Revision:	http://reviews.llvm.org/D10729
Reviewed by:	jroelofs

llvm-svn: 241455
2015-07-06 15:39:36 +00:00
Ed Schouten 2a7ab629e5 Cleanup: prefer _LIBCPP_GET_C_LOCALE over __cloc().
The __cloc() function is only present in case the environment does not
provide a way to refer to the C locale using a compile-time constant
expression. _LIBCPP_GET_C_LOCALE seems to be defined unconditionally.

This improves compilation of the locale code on CloudABI.

Differential Revision:	http://reviews.llvm.org/D10690
Reviewed by:	jroelofs

llvm-svn: 241454
2015-07-06 15:37:40 +00:00
Rafael Espindola 286e7409df Inline function into single use. NFC.
llvm-svn: 241453
2015-07-06 15:36:50 +00:00
Tobias Grosser ec46e5376d Print thread-identifiers in GPU debug output
This helps us to understand which thread prints which information.

llvm-svn: 241452
2015-07-06 15:36:16 +00:00
Douglas Katzman 0dd8eb324d Grammar bug. NFC
llvm-svn: 241451
2015-07-06 15:25:31 +00:00
Rafael Espindola 76ad232179 Remove getRelocationAddress.
Originally added in r139314.

Back then it didn't actually get the address, it got whatever value the
relocation used: address or offset.

The values in different object formats are:

* MachO: Always an offset.
* COFF: Always an address, but when talking about the virtual address of
  sections it says: "for simplicity, compilers should set this to zero".
* ELF: An offset for .o files and and address for .so files. In the case of the
  .so, the relocation in not linked to any section (sh_info is 0). We can't
  really compute an offset.

Some API mappings would be:

* Use getAddress for everything. It would be quite cumbersome. To compute the
  address elf has to follow sh_info, which can be corrupted and therefore the
  method has to return an ErrorOr. The address of the section is also the same
  for every relocation in a section, so we shouldn't have to check the error
  and fetch the value for every relocation.

* Use a getValue and make it up to the user to know what it is getting.

* Use a getOffset and:
 * Assert for dynamic ELF objects. That is a very peculiar case and it is
   probably fair to ask any tool that wants to support it to use ELF.h. The
   only tool we have that reads those (llvm-readobj) already does that. The
   only other use case I can think of is a dynamic linker.
 * Check that COFF .obj files have sections with zero virtual address spaces. If
   it turns out that some assembler/compiler produces these, we can change
   COFFObjectFile::getRelocationOffset to subtract it. Given COFF format,
   this can be done without the need for ErrorOr.

The getRelocationAddress method was never implemented for COFF. It also
had exactly one use in a very peculiar case: a shortcut for adding the
section value to a pcrel reloc on MachO.

Given that, I don't expect that there is any use out there of the C API. If
that is not the case, let me know and I will add it back with the implementation
inlined and do a proper deprecation.

llvm-svn: 241450
2015-07-06 14:55:37 +00:00
Chad Rosier 85a346395e Fix a bug in the A57FPLoadBalancing register tracking/scavenger.
The code in AArch64A57FPLoadBalancing::scavengeRegister() to handle dead defs
was not correctly handling aliased registers.  E.g. if the dead def was of D2,
then S2 was not being marked as unavailable, so it could potentially be used
across a live-range in which it would be clobbered.

Patch by Geoff Berry <gberry@codeaurora.org>!
Phabricator: http://reviews.llvm.org/D10900

llvm-svn: 241449
2015-07-06 14:46:34 +00:00
Bruce Mitchener 6b067074f9 [lldb-mi] Fix misc. typos in comments.
llvm-svn: 241448
2015-07-06 14:37:53 +00:00
Rafael Espindola 76d650e8d7 Check that COFF .obj files have sections with zero virtual address spaces.
When talking about the virtual address of sections the coff spec says:
  ... for simplicity, compilers should set this to zero. Otherwise, it is an
  arbitrary value that is subtracted from offsets during relocation.

We don't currently subtract it, so check that it is zero.

If some producer does create such files, we can change getRelocationOffset
instead.

llvm-svn: 241447
2015-07-06 14:26:07 +00:00
Daniel Jasper 5c235c0966 clang-format: [JS] Properly reset parse state after parsing interface.
llvm-svn: 241446
2015-07-06 14:26:04 +00:00
Simon Pilgrim a092fd8fc4 [X86][SSE] Added missing stack folding test for SQRTSD and SQRTSS instructions.
llvm-svn: 241445
2015-07-06 14:15:02 +00:00
Daniel Jasper b2328b1e7f clang-format: [JS] Prevent confusing TypeScript parameters wraps.
Before:
  aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa:
                     aaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {}

After:
  aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa,
                     aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa):
      aaaaaaaaaaaaaaaaaaaaaa {}

llvm-svn: 241444
2015-07-06 14:07:51 +00:00
Asaf Badouh c6f3c82ffc [X86][AVX512] Multiply Packed Unsigned Integers with Round and Scale
pmulhrsw

review:
http://reviews.llvm.org/D10948

llvm-svn: 241443
2015-07-06 14:03:40 +00:00
Petar Jovanovic 0326a06c15 [Mips] Add support for MCJIT for MIPS32r6
Add support for resolving MIPS32r6 relocations in MCJIT.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 241442
2015-07-06 12:50:55 +00:00
Abhishek Aggarwal d6a62cc2fe Use both OS and Architecture to choose correct ABI
Summary:
   - In ABIMacOSX_i386.cpp:
        -- Earlier, only Triple:Arch was used to choose ABI
        -- Now, Triple:OS is also used along with Triple:Arch

   - Resolves PR-23718

Change-Id: Id8b1d86dda763241f9e594a1c71252555939af1e
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits

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

llvm-svn: 241441
2015-07-06 12:49:47 +00:00
Rafael Espindola 5504eb79b4 Fix handling of ELF::R_MIPS_32 on Mips64.
Thanks to Aboud, Amjad for reporting the regression and providing the testcase.

llvm-svn: 241440
2015-07-06 12:18:44 +00:00
Daniel Jasper a5fa4d1d7e clang-format: Fix __attribute__ being treated as decl name.
__attribute__ was treated as the name of a function definition, with the
tokens in parentheses being the parameter list. This formats incorrectly
with AlwaysBreakAfterDefinitionReturnType. Fix it by treating
__attribute__ like decltype.

Patch by Strager Neds, thank you.

llvm-svn: 241439
2015-07-06 11:30:34 +00:00
Abhishek Aggarwal 25026f52d0 Revert the patch to Test Commit Access
llvm-svn: 241438
2015-07-06 11:26:51 +00:00
Abhishek Aggarwal 9d6f541b60 Test Commit Access: Please Ignore
llvm-svn: 241437
2015-07-06 11:19:32 +00:00
Tamas Berghammer 931901e56c Make TestStopHook* remote platform compatible
llvm-svn: 241436
2015-07-06 10:46:34 +00:00
Tamas Berghammer b8d2e9e309 Fix final wait in ExprSyscallTestCase for aarch64
llvm-svn: 241435
2015-07-06 10:02:56 +00:00
Tamas Berghammer 8d53464472 Improve UnwindLLDB with better detection for unwinding failures
Previously we accepted a frame as correct result if the PC pointed
into an executable section of code. The isse with that approac is
that if we calculated PC correctly but messed up the value of CFA
then unwinding from the next fram will most likely fail.

With this change I modify the logic with keeping the requirement
for PC to point to an executable section and also check that we can
continue the unwind from the frame we calculated. If continuing from
the frame calculated with the primary unwind plan isn't working then
fall back to the fallback plan with the hope for a better frame (if
the fallback plan won't help then we acceot the frame from the
primary plan).

Differential revision: http://reviews.llvm.org/D10932

llvm-svn: 241434
2015-07-06 09:24:20 +00:00
Yaron Keren 5b816061ba Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Patch by Eugene Kosov.

llvm-svn: 241433
2015-07-06 08:47:15 +00:00
Yaron Keren 763a38a80c Teach mingw toolchain the msys2 mingw-w64 distribution C++ dirs.
llvm-svn: 241432
2015-07-06 07:40:10 +00:00
Craig Topper 839a25a8a7 [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC
llvm-svn: 241431
2015-07-06 06:23:06 +00:00
Craig Topper d26d2d9a50 [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC
llvm-svn: 241430
2015-07-06 06:23:01 +00:00
Alexey Bataev 7d5d33ea33 [OPENMP 4.0] Codegen for 'omp cancel' directive.
Add the next codegen for 'omp cancel' directive:
if (__kmpc_cancel()) {
  __kmpc_cancel_barrier();
  <exit construct>;
}

llvm-svn: 241429
2015-07-06 05:50:32 +00:00
Richard Smith fc805cad14 PR24030, PR24033: Consistently check whether a new declaration conflicts with
an existing using shadow declaration if they define entities of the same kind
in different namespaces.

We'd previously check this consistently if the using-declaration came after the
other declaration, but not if it came before.

llvm-svn: 241428
2015-07-06 04:43:58 +00:00
Rafael Espindola 37d8b67426 Make this test a bit more interesting.
Before every test was using a section with an address of zero.

llvm-svn: 241427
2015-07-06 02:45:01 +00:00
Rui Ueyama 92a8c82076 COFF: Set TLS table header field.
TLS table header field is supposed to have address and size of TLS table.
The linker doesn't have to understand what TLS table is. TLS table's name
is always "_tls_used", so if there's that symbol, the linker simply sets
that symbol's RVA to the header. The size of the TLS table is always 40 bytes.

llvm-svn: 241426
2015-07-06 01:48:01 +00:00
Richard Smith 88fe69ce21 DR1909: Diagnose all invalid cases of a class member sharing its name with the class.
llvm-svn: 241425
2015-07-06 01:45:27 +00:00
Richard Smith a60a6db73f When we see something that looks like a constructor with a return type, only issue one error, not two.
llvm-svn: 241424
2015-07-06 01:04:39 +00:00
NAKAMURA Takumi ff35c338dc Untabify.
llvm-svn: 241423
2015-07-06 00:48:17 +00:00
Sanjay Patel 1a6a58caf5 change CHECK to CHECK-LABEL for more precision
llvm-svn: 241422
2015-07-05 23:19:16 +00:00
NAKAMURA Takumi 258c068008 Mark clang/test/Modules/signal.m as REQUIRES:crash-recovery.
llvm-svn: 241421
2015-07-05 23:00:44 +00:00
Rui Ueyama adcde5384e COFF: Make ArchiveFile::getMember thread-safe.
This function is called SymbolTable::readObjects, so in order to
parallelize that function, we have to make this function thread-safe.

llvm-svn: 241420
2015-07-05 22:50:00 +00:00
Sanjay Patel 787e12aec1 remove unnecessary test specifications
llvm-svn: 241419
2015-07-05 22:37:51 +00:00
Sanjay Patel 8ee056c5e7 minimize test case and remove unnecessary opt passes
llvm-svn: 241418
2015-07-05 22:30:12 +00:00
Rui Ueyama e2eb15577d COFF: Use CAS to update Sym->Body.
Note that the linker is not multi-threaded yet.
This is a preparation for that.

llvm-svn: 241417
2015-07-05 22:05:08 +00:00
Rui Ueyama c80c03da6c COFF: Use atomic pointers in preparation for parallelizing.
In the new design, mutation of Symbol pointers is the name resolution
operation. This patch makes them atomic pointers so that they can
be mutated by multiple threads safely. I'm going to use atomic
compare-exchange on these pointers.

dyn_cast<> doesn't recognize atomic pointers as pointers,
so we need to call load(). This is unfortunate, but in other places
automatic type conversion works fine.

llvm-svn: 241416
2015-07-05 21:54:42 +00:00
Sanjay Patel cc9fad0bf7 remove unnecessary temp variable; NFCI
llvm-svn: 241415
2015-07-05 21:21:47 +00:00
Peter Collingbourne 46eb0f539c Verifier: Forbid comdats on linker declarations.
Differential Revision: http://reviews.llvm.org/D10945

llvm-svn: 241414
2015-07-05 20:52:40 +00:00
Peter Collingbourne 6a9d1774d0 IR: Do not consider available_externally linkage to be linker-weak.
From the linker's perspective, an available_externally global is equivalent
to an external declaration (per isDeclarationForLinker()), so it is incorrect
to consider it to be a weak definition.

Also clean up some logic in the dead argument elimination pass and clarify
its comments to better explain how its behavior depends on linkage,
introduce GlobalValue::isStrongDefinitionForLinker() and start using
it throughout the optimizers and backend.

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

llvm-svn: 241413
2015-07-05 20:52:35 +00:00
Sanjay Patel a4860f3af2 use range-based for loops; NFCI
llvm-svn: 241412
2015-07-05 20:15:21 +00:00
Benjamin Kramer 9bfb627a0e [TargetLowering] StringRefize asm constraint getters.
There is some functional change here because it changes target code from
atoi(3) to StringRef::getAsInteger which has error checking. For valid
constraints there should be no difference.

llvm-svn: 241411
2015-07-05 19:29:18 +00:00
Simon Pilgrim 08049fedc7 [X86][SSE3] Just use an explicit SSE3 target attribute - not a cpu type.
Merged arch/target into a specific triple - we had i686 and x86_64 targets overriding each other....

llvm-svn: 241410
2015-07-05 19:06:32 +00:00
Simon Pilgrim 434cb684a8 [X86][SSE2] Just use an explicit SSE2 target attribute - not a cpu type.
corei7 is capable of a lot more than just SSE2.... 

llvm-svn: 241409
2015-07-05 19:03:51 +00:00
Lang Hames a3229d7ff8 [RuntimeDyld] Add comment documenting the behavior change in r241383.
llvm-svn: 241408
2015-07-05 18:49:17 +00:00
Yaron Keren e41dee1da4 Document problems when trying libclang tests on Windows 7.
llvm-svn: 241407
2015-07-05 17:53:00 +00:00