Commit Graph

263338 Commits

Author SHA1 Message Date
Diana Picus bf4aed2c38 [ARM] GlobalISel: Support array returns
These are a bit rare in practice, but they don't require anything
special compared to array parameters, so support them as well.

llvm-svn: 304137
2017-05-29 08:19:19 +00:00
Tobias Grosser d9fb2842e7 Adapt to recent clang-format changes
llvm-svn: 304136
2017-05-29 08:06:29 +00:00
Martin Probst b2f06eae8d clang-format: [JS] fix indenting bound functions.
Summary:
The previous fix to force build style wrapping if the previous token is a closing parenthesis broke a peculiar pattern where users parenthesize the function declaration in a bind call:
    fn((function() { ... }).bind(this));

This restores the previous behaviour by reverting that change, but narrowing the special case for unindenting closing parentheses to those followed by semicolons and opening braces, i.e. immediate calls and function declarations.

Reviewers: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D33640

llvm-svn: 304135
2017-05-29 07:50:52 +00:00
Egor Churaev dd7d82c408 [OpenCL] Test on half immediate support.
Reviewers: Anastasia

Reviewed By: Anastasia

Subscribers: yaxunl, cfe-commits, bader

Differential Revision: https://reviews.llvm.org/D33592

llvm-svn: 304134
2017-05-29 07:44:22 +00:00
Hiroshi Inoue e3c14ebbfa [PPC] Fix assertion failure during binary encoding with -mcpu=pwr9
Summary
clang -c -mcpu=pwr9 test/CodeGen/PowerPC/build-vector-tests.ll causes an assertion failure during the binary encoding.
The failure occurs when a D-form load instruction takes two register operands instead of a register + an immediate.

This patch fixes the problem and also adds an assertion to catch this failure earlier before the binary encoding (i.e. during lit test).
The fix is from Nemanja Ivanovic @nemanjai.

Differential Revision: https://reviews.llvm.org/D33482

llvm-svn: 304133
2017-05-29 07:12:39 +00:00
Diana Picus 8cca8cb0ce [ARM] GlobalISel: Support array parameters/arguments
Clang coerces structs into arrays, so it's a good idea to support them.
Most of the support boils down to getting the splitToValueTypes helper
to actually split types. We then use G_INSERT/G_EXTRACT to deal with the
parts.

llvm-svn: 304132
2017-05-29 07:01:52 +00:00
Eric Fiselier bae0a1d43c Fix coroutine test failures caused by API misusages.
More tests to come. I think that from_address overload should be deleted
or ill-formed, except for the 'void*' one; The user cannot possibly
have a typed pointer to the coroutine state.

llvm-svn: 304131
2017-05-29 06:42:01 +00:00
Mehdi Amini 96ab48f9da DebugInfo: Include .dwo file name when hashing multiple CUs in a single file
This is really a workaround for ThinLTO in particular - since it can
import partial CUs that may end up looking very similar/the same as
the same partial import in another ThinLTO compile.

An alternative fix would be to change the DICompileUnit metadata to
include a "primary file" or the like - and when importing for ThinLTO
set the primary file to the name of the DICompileUnit that is being
imported into. This involves changing the schema and would reduce the
excessive uniqueness in the hash that this change creates - allowing
diagnosing of more duplicate CUs than will be caught with this change.

But duplicate CUs can still be caught in non-ThinLTO builds & are mostly
a nuisance rather than a particularly deliberate/effective tool for
finding broken code. (arguably the hash could always include the dwo
file and nothing in fission would break, I think..)

Reapply of r304119 after adding a triple to the test and moving it
to the X86 directory.

llvm-svn: 304130
2017-05-29 06:32:34 +00:00
Mehdi Amini 4181205563 DebugInfo: Omit an empty CU when a subprogram was moved into its use
When the only use of a CU is for a subprogram that's only emitted into
the using CU (to avoid cross-CU references in DWO files), avoid creating
that CU at all.

Reapply of r304111 after adding a triple to the test and moving it
to the X86 directory.

llvm-svn: 304129
2017-05-29 06:25:30 +00:00
Tobias Grosser 8cf785f6b1 Revert "[IfConversion] Keep the CFG updated incrementally in IfConvertTriangle"
The reverted change introdued assertions ala:

"MachineBasicBlock::succ_iterator
llvm::MachineBasicBlock::removeSuccessor(succ_iterator, bool): Assertion
`I != Successors.end() && "Not a current successor!"'

Mikael, the original committer, wrote me that he is working on a fix, but that
it likely will take some time to get this resolved. As this bug is one of the
last two issues that keep the AOSP buildbot from turning green, I revert the
original commit r302876.

I am looking forward to see this recommitted after the assertion has been
resolved.

llvm-svn: 304128
2017-05-29 06:12:18 +00:00
Mehdi Amini 6aa9e9b41a IRGen: Add optnone attribute on function during O0
Amongst other, this will help LTO to correctly handle/honor files
compiled with O0, helping debugging failures.
It also seems in line with how we handle other options, like how
-fnoinline adds the appropriate attribute as well.

Differential Revision: https://reviews.llvm.org/D28404

llvm-svn: 304127
2017-05-29 05:38:20 +00:00
Mehdi Amini e161ced16a Revert "DebugInfo: Omit an empty CU when a subprogram was moved into its use"
This reverts commit r304111.
GreenDragon is broken.

llvm-svn: 304126
2017-05-29 05:17:57 +00:00
Mehdi Amini d8056bb7d8 Revert "DebugInfo: Include .dwo file name when hashing multiple CUs in a single file"
This reverts commit r304119 and r304118. GreenDragon is broken.

llvm-svn: 304125
2017-05-29 05:17:54 +00:00
Eric Fiselier 207d13cf84 Fix multiple bugs in coroutine tests.
llvm-svn: 304124
2017-05-29 05:00:24 +00:00
Zachary Turner eaacd07079 Don't capture a temporary std::string in a StringRef.
This fixes the breakages in llvm-tblgen.

llvm-svn: 304123
2017-05-29 02:20:12 +00:00
Zachary Turner df1832cf86 Resubmit "[X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables."
This was reverted due to buildbot breakages and I was not familiar
with this code to investigate it.  But while trying to get a
useful backtrace for the author, it turns out the fix was very
obvious.  Resubmitting this patch as is, and will submit the
fix in a followup so that the fix is not hidden in the larger
CL.

llvm-svn: 304122
2017-05-29 02:19:37 +00:00
Zachary Turner 5b199be769 Revert "[X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables."
This reverts commit 28cb1003507f287726f43c771024a1dc102c45fe as well
as all subsequent followups.  llvm-tblgen currently segfaults with
this change, and it seems it has been broken on the bots all
day with no fixes in preparation.  See, for example:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/

llvm-svn: 304121
2017-05-29 01:48:53 +00:00
Galina Kistanova 229c9c1159 Disabled implicit-fallthrough warnings for ConvertUTF.cpp.
ConvertUTF.cpp has a little dependency on LLVM, and since the code extensively uses fall-through switches,
I prefer disabling the warning for the whole file, rather than adding attributes for each case.

llvm-svn: 304120
2017-05-29 01:34:26 +00:00
David Blaikie ce0c205813 DebugInfo: Include .dwo file name when hashing multiple CUs in a single file
This is really a workaround for ThinLTO in particular - since it can
import partial CUs that may end up looking very similar/the same as
the same partial import in another ThinLTO compile.

An alternative fix would be to change the DICompileUnit metadata to
include a "primary file" or the like - and when importing for ThinLTO
set the primary file to the name of the DICompileUnit that is being
imported into. This involves changing the schema and would reduce the
excessive uniqueness in the hash that this change creates - allowing
diagnosing of more duplicate CUs than will be caught with this change.

But duplicate CUs can still be caught in non-ThinLTO builds & are mostly
a nuisance rather than a particularly deliberate/effective tool for
finding broken code. (arguably the hash could always include the dwo
file and nothing in fission would break, I think..)

llvm-svn: 304119
2017-05-29 00:48:45 +00:00
David Blaikie 02f8a07689 Attempt to fix buildbots...
llvm-svn: 304118
2017-05-29 00:24:01 +00:00
Saleem Abdulrasool f122423ace Support: adjust the default obj format for wasm
WebAssemly uses a custom object file format.  For the wasm targets,
default to the `Wasm` object file format.

llvm-svn: 304117
2017-05-29 00:14:57 +00:00
Dylan McKay 74fc1ce0c2 [AVR] Remove SREG from CPI's Uses; authored by Florian Zeitz
Summary: CPI does not read the status register, but only writes it.

Reviewers: dylanmckay

Reviewed By: dylanmckay

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33223

llvm-svn: 304116
2017-05-29 00:10:14 +00:00
Craig Topper 251cdbef1d [TableGen][X86] Fix formatting I accidentally messed up in r304099. NFC
llvm-svn: 304115
2017-05-28 23:47:17 +00:00
Erik Pilkington de83eea576 [ItaniumDemangle] Fix a exponential string copying bug
This is a port of libcxxabi's r304113.

llvm-svn: 304114
2017-05-28 23:24:52 +00:00
Erik Pilkington a34ea7583f [demangler] Fix a exponential string copying bug
The problem was that if base_name() was called from a context without
an actual base name, it could gulp up the entire string, which can
result in recursive duplications. The fix is to be more strict as to
what qualifies as a base name.

Differential revision: https://reviews.llvm.org/D33637

llvm-svn: 304113
2017-05-28 23:15:50 +00:00
NAKAMURA Takumi a288ec412f Prune trailing whitespace. (To regenerate makefiles)
llvm-svn: 304112
2017-05-28 22:54:25 +00:00
David Blaikie f2f898a044 DebugInfo: Omit an empty CU when a subprogram was moved into its use
When the only use of a CU is for a subprogram that's only emitted into
the using CU (to avoid cross-CU references in DWO files), avoid creating
that CU at all.

llvm-svn: 304111
2017-05-28 22:51:37 +00:00
Martell Malone 41119cd07b [libcxxabi] Disable DLL annotations on static
rL288692 renames
_LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT to
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS

llvm-svn: 304110
2017-05-28 22:46:50 +00:00
Geoff Berry 2739ebafb6 [AArch64][Falkor] Combine sched details files into one. NFC.
llvm-svn: 304109
2017-05-28 22:20:44 +00:00
Geoff Berry b542fb3817 [AArch64][Falkor] Fix some sched details.
- Remove all uses of base sched model entries and set them all to
  Unsupported so all the opcodes are described in
  AArch64SchedFalkorDetails.td.
- Remove entries for unsupported half-float opcodes.
- Remove entries for unsupported LSE extension opcodes.
- Add entry for MOVbaseTLS (and set Sched in base td file entry to
  WriteSys) and a few other pseudo ops.
- Fix a few FP load/store with reg offset entries to use the LSLfast
  predicates.
- Add Q size BIF/BIT/BSL entries.
- Fix swapped Q/D sized CLS/CLZ/CNT/RBIT entires.
- Fix pre/post increment address register latency (this operand is
  always dest 0).
- Fix swapped FCVTHD/FCVTHS/FCVTDH/FCVTDS entries.
- Fix XYZ resource over usage on LD[1-4] opcodes.

llvm-svn: 304108
2017-05-28 21:48:31 +00:00
Eric Fiselier e38cea026b [coroutines] Support "coroutines" feature in module map requires clause
Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. 

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33538

llvm-svn: 304107
2017-05-28 21:07:22 +00:00
Eric Fiselier 09fcc2ce9b Correct XFAIL's in coroutine tests to only list ubsan
llvm-svn: 304106
2017-05-28 20:56:16 +00:00
Eric Fiselier 15ee787ac2 Fix use of uninitialized memory
llvm-svn: 304105
2017-05-28 20:49:13 +00:00
Eric Fiselier f8b10f99c9 XFAIL tests which trigger coroutine debug info crash in Clang
llvm-svn: 304104
2017-05-28 20:49:11 +00:00
Eric Fiselier 8f7952c190 Add hack to allow test to run w/o C++17 copy elision
llvm-svn: 304103
2017-05-28 20:30:18 +00:00
Eric Fiselier 4aaf69749b Remove XFAIL's for recently fixed bug
llvm-svn: 304102
2017-05-28 20:25:41 +00:00
Eric Fiselier c34a497b40 [coroutines] Add end-to-end tests within libc++
This patch adds end-to-end/breathing tests for coroutines
into libc++. The tests aren't specifically to test libc++ requirements
but instead are intented to ensure coroutines are working fine in general.

Although libc++ isn't exactly the most correct place for these tests
to live, there is one major advantage. The libc++ test suite is also
used by MSVC and by adding the tests here it ensures they will be
run against all currently available coroutine implementations.

llvm-svn: 304101
2017-05-28 19:38:21 +00:00
Craig Topper cf09175de8 [TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC
llvm-svn: 304100
2017-05-28 18:24:43 +00:00
Craig Topper 8351075181 [TableGen][X86] Mark a couple global tables as const. NFC
llvm-svn: 304099
2017-05-28 18:24:41 +00:00
Craig Topper a38a80108b [TableGen][X86] Improve formatting of the fold table output by indenting the body of the table and adding blank lines between tables. NFC
llvm-svn: 304098
2017-05-28 18:24:39 +00:00
Craig Topper 2bf3152325 [TableGen][X86] Add an llvm_unreachable to a switch so we get an error if we need expansion in the future.
llvm-svn: 304097
2017-05-28 18:24:37 +00:00
Craig Topper 8eaf0edb41 [TableGen][X86] Remove unnecessary std::string creations. NFC
llvm-svn: 304096
2017-05-28 18:24:35 +00:00
Craig Topper f62d4e240d [TableGen][X86] Replace a global std::vector with a regular array. llvm::find works on arrays, just need to use std::end to check the result.
llvm-svn: 304095
2017-05-28 18:24:32 +00:00
Eric Fiselier d978e53c6d [coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing conversions.
Summary:
The expression `await_ready` is required to be contextually convertible to bool and `await_suspend` must be a prvalue of either `void` or `bool`.
This patch adds diagnostics for when those requirements are violated.

It also correctly performs the contextual conversion to bool on the result of `await_ready`



Reviewers: GorNishanov, rsmith

Reviewed By: GorNishanov

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33625

llvm-svn: 304094
2017-05-28 18:21:12 +00:00
Craig Topper 5a4ec21461 [TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it that way to avoid a StringRef to a temporary.
llvm-svn: 304093
2017-05-28 17:48:41 +00:00
Gor Nishanov b87931e983 [coroutines] www/cxx_status.html: add non-breaking hyphen
Reviewers: GorNishanov

Reviewed By: GorNishanov

Subscribers: EricWF, rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D33632

llvm-svn: 304092
2017-05-28 17:35:23 +00:00
Gor Nishanov 6ecbe540c6 [coroutines] www/cxx_status.html: add non-breaking hyphen
Reviewers: GorNishanov

Reviewed By: GorNishanov

Subscribers: EricWF, rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D33632

llvm-svn: 304091
2017-05-28 16:25:31 +00:00
Sanjay Patel bb9fe3b409 [x86] auto-generate better checks; NFC
llvm-svn: 304090
2017-05-28 13:57:59 +00:00
Benjamin Kramer 9d8ed2653f [InstrProf] Use more ArrayRef/StringRef.
No functional change intended.

llvm-svn: 304089
2017-05-28 13:23:02 +00:00
Ayman Musa d9f1fe43a8 [X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables.
X86 backend holds huge tables in order to map between the register and memory forms of each instruction.
This TableGen Backend automatically generated all these tables with the appropriate flags for each entry.

Differential Revision: https://reviews.llvm.org/D32684

llvm-svn: 304088
2017-05-28 12:55:36 +00:00