Commit Graph

204750 Commits

Author SHA1 Message Date
Daniel Sanders f423f5627c Change the last few internal StringRef triples into Triple objects.
Summary:
This concludes the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.

At this point, the StringRef-form of GNU Triples should only be used in the
public API (including IR serialization) and a couple objects that directly
interact with the API (most notably the Module class). The next step is to
replace these Triple objects with the TargetTuple object that will represent
our authoratative/unambiguous internal equivalent to GNU Triples.

Reviewers: rengolin

Subscribers: llvm-commits, jholewinski, ted, rengolin

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

llvm-svn: 241472
2015-07-06 16:56:07 +00:00
Adrian Prantl ef8f95417a Update testcase to reflect new behavior in DIBuilder.
llvm-svn: 241471
2015-07-06 16:36:04 +00:00
Adrian Prantl 4276d4a8d0 DIBuilder: Don't rauw null pointers with empty arrays in finalize().
This makes the IR a little easier to read.

llvm-svn: 241470
2015-07-06 16:36:02 +00:00
Daniel Sanders fbdab437f0 Where Triple has a suitable predicate, use it rather than the enum values. NFC.
Reviewers: mcrosier

Subscribers: llvm-commits, rengolin

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

llvm-svn: 241469
2015-07-06 16:33:18 +00:00
Sanjay Patel d2b7144c4a use range-based for loops; NFCI
llvm-svn: 241468
2015-07-06 16:27:35 +00:00
Teresa Johnson 8749d80431 Resubmit "Pass down the -flto option to the -cc1 job" (r239481)
The patch is the same except for the addition of a new test for the
issue that required reverting the dependent llvm commit.

--Original Commit Message--

Pass down the -flto option to the -cc1 job, and from there into the
CodeGenOptions and onto the PassManagerBuilder. This enables gating
the new EliminateAvailableExternally module pass on whether we are
preparing for LTO.

If we are preparing for LTO (e.g. a -flto -c compile), the new pass is not
included as we want to preserve available externally functions for possible
link time inlining.

llvm-svn: 241467
2015-07-06 16:23:00 +00:00
Teresa Johnson d3a33a16bb Resubmit "Add new EliminateAvailableExternally module pass" (r239480)
This change includes a fix for https://code.google.com/p/chromium/issues/detail?id=499508#c3,
which required updating the visibility for symbols with eliminated definitions.

--Original Commit Message--

Add new EliminateAvailableExternally module pass, which is performed in
O2 compiles just before GlobalDCE, unless we are preparing for LTO.

This pass eliminates available externally globals (turning them into
declarations), regardless of whether they are dead/unreferenced, since
we are guaranteed to have a copy available elsewhere at link time.
This enables additional opportunities for GlobalDCE.

If we are preparing for LTO (e.g. a -flto -c compile), the pass is not
included as we want to preserve available externally functions for possible
link time inlining. The FE indicates whether we are doing an -flto compile
via the new PrepareForLTO flag on the PassManagerBuilder.

llvm-svn: 241466
2015-07-06 16:22:42 +00:00
Adrian Prantl 0e224a646c Use an early exit in DIBuilder::finalize() to improve readability.
llvm-svn: 241465
2015-07-06 16:22:12 +00:00
Adrian Prantl 4afc1f4225 Use the correct DIArray types in DICompileUnit::replace*().
Thanks to Yaron Keren for noticing!

llvm-svn: 241464
2015-07-06 16:22:07 +00:00
Sanjay Patel 6d4c3e3ded use range-based for loops; NFCI
llvm-svn: 241463
2015-07-06 16:19:14 +00:00
Matt Arsenault 706f930b72 AMDGPU/SI: Add debugging subtarget feature for DS offsets
We don't have a good way to detect most situations where
DS offsets are usable on SI, so add an option to force using
them even if unsafe for debugging performance problems.

llvm-svn: 241462
2015-07-06 16:01:58 +00:00
James Y Knight 89ac11de32 [Sparc] Add more instruction aliases.
These are mostly from the chart in the SparcV8 spec, section "A.3
Synthetic Instructions".

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

llvm-svn: 241461
2015-07-06 16:01:07 +00:00
James Y Knight 7208a12eef [Sparc] Add support for flush instruction.
Differential Revision: http://reviews.llvm.org/D9833

llvm-svn: 241460
2015-07-06 16:01:04 +00:00
Pavel Labath 05ab2374be Fix dosep.py on windows after r240946
Summary:
On windows, global python variables are not automatically passed to child processes. This commit
makes sure the default timeout value is available to child processes by passing it directly.
I pass the whole dotest_opts value to the children, so we can use the other members as well if we
need to do it in the future.

Reviewers: amccarth

Subscribers: lldb-commits-list

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

llvm-svn: 241459
2015-07-06 15:57:52 +00:00
Rafael Espindola c7689300bb Simplify. NFC.
llvm-svn: 241458
2015-07-06 15:53:43 +00:00
Bruce Mitchener 88205302c1 [lldb-mi] Use 'override' on overridden virtual methods.
Summary: [lldb-mi] Use 'override' on overridden virtual methods.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 241457
2015-07-06 15:48:55 +00:00
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