Commit Graph

260033 Commits

Author SHA1 Message Date
Rui Ueyama 07c62c1174 Rename CompressedHeader ZDebugHeader.
`CompressedHeader` is a header for compressed data, and the header
itself is not compressed. So the previous name was confusing.

llvm-svn: 300675
2017-04-19 11:32:13 +00:00
Rui Ueyama 066c4ab9fe Simplify createHeader and inline it.
createHeader didn't use data members of Elf_Chdr type and write
directly to a given buffer. That is not a good practice because
the function had a knowledge of the struct layout.

llvm-svn: 300674
2017-04-19 11:31:58 +00:00
Rui Ueyama 4627873807 Fallthrough to reduce code a bit. NFC.
llvm-svn: 300673
2017-04-19 11:31:45 +00:00
Simon Pilgrim 94d5dba8ae [X86] Add D32039/PR31357 tests to show current BSWAP codegen
llvm-svn: 300672
2017-04-19 11:06:22 +00:00
Simon Pilgrim b13ab63503 [X86][SSE] Add scheduling latency/throughput tests for (most) SSE2 instructions
llvm-svn: 300671
2017-04-19 10:52:09 +00:00
Pavel Labath 7c437023ca Fix TestRegisterVariables for clang/arm
Clang rejects __attribute__((regparm)) when targetting arm. The default
calling convention passes arguments in registers anyway, so we can just
remove them in this case.

llvm-svn: 300670
2017-04-19 10:13:29 +00:00
Pavel Labath 107e694271 Revert yesterdays IPv6 patches
The break the linux bots (and probably any other machine which would
run the test suite in a massively parallel way). The problem is that it
can happen that we only successfully create an IPv6 listening socket
(because the relevant IPv4 port is used by another process) and then the
connecting side attempts to connect to the IPv4 port and fails.

It's not very obvious how to fix this problem, so I am reverting this
until we come up with a solution.

llvm-svn: 300669
2017-04-19 10:13:22 +00:00
Renato Golin 742aed8683 Revert "ARMFrameLowering: Reserve emergency spill slot for large arguments"
This reverts commit r300639, as it broke self-hosting on ARM. PR32709.

llvm-svn: 300668
2017-04-19 09:02:52 +00:00
Alex Lorenz 1be800c511 Add support for editor placeholders to Clang
This commit teaches Clang to recognize editor placeholders that are produced
when an IDE like Xcode inserts a code-completion result that includes a
placeholder. Now when the lexer sees a placeholder token, it emits an
'editor placeholder in source file' error and creates an identifier token
that represents the placeholder. The parser/sema can now recognize the
placeholders and can suppress the diagnostics related to the placeholders. This
ensures that live issues in an IDE like Xcode won't get spurious diagnostics
related to placeholders.

This commit also adds a new compiler option named '-fallow-editor-placeholders'
that silences the 'editor placeholder in source file' error. This is useful
for an IDE like Xcode as we don't want to display those errors in live issues.

rdar://31581400

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

llvm-svn: 300667
2017-04-19 08:58:56 +00:00
Igor Breger 746b3c336f [GlobalISel][X86] Split select tests. NFC.
llvm-svn: 300666
2017-04-19 08:40:44 +00:00
Diana Picus 49472ff1cf [ARM] GlobalISel: Add support for G_MUL
Support G_MUL, very similar to G_ADD and G_SUB. The only difference is
in the instruction selector, where we have to select either MUL or MULv5
depending on the target.

llvm-svn: 300665
2017-04-19 07:29:46 +00:00
Kristof Beyls 0f36e68f62 [GlobalISel] Support vector-of-pointers in LLT
This fixes PR32471.

As comment 10 on that bug report highlights
(https://bugs.llvm.org//show_bug.cgi?id=32471#c10), there are quite a
few different defendable design tradeoffs that could be made, including
not representing pointers at all in LLT.

I decided to go for representing vector-of-pointer as a concept in LLT,
while keeping the size of the LLT type 64 bits (this is an increase from
48 bits before). My rationale for keeping pointers explicit is that on
some targets probably it's very handy to have the distinction between
pointer and non-pointer (e.g. 68K has a different register bank for
pointers IIRC). If we keep a scalar pointer, it probably is easiest to
also have a vector-of-pointers to keep LLT relatively conceptually clean
and orthogonal, while we don't have a very strong reason to break that
orthogonality.  Once we gain more experience on the use of LLT, we can
of course reconsider this direction.

Rejecting vector-of-pointer types in the IRTranslator is also an option
to avoid the crash reported in PR32471, but that is only a very
short-term solution; also needs quite a bit of code tweaks in places,
and is probably fragile. Therefore I didn't consider this the best
option.

llvm-svn: 300664
2017-04-19 07:23:57 +00:00
Kristof Beyls 7a71350363 [GlobalISel] Remove non-determinism from IRTranslator.
This showed up in r300535/r300537, which were reverted in r300538 due to
some of the introduced tests in there failing on some bots, due to the
non-determinism fixed in this commit.

Re-committing r300535/r300537 will add 2 tests for the change in this
commit.

llvm-svn: 300663
2017-04-19 06:38:37 +00:00
Chandler Carruth ae3386aa74 Revert r300657 due to crashes in stage2 of bootstraps:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/2476/steps/build-stage2-LLVMgold.so/logs/stdio
http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/15036/steps/build_llvmclang/logs/stdio

I've updated the commit thread, reverting to get the bots back to green.

Original commit summary:
[JumpThread] We want to fold (not thread) when all predecessor go to single BB's successor.

llvm-svn: 300662
2017-04-19 06:23:20 +00:00
Daniel Jasper 47d58ea681 clang-format: Properly match parens of macro parameter lists.
No tests yet, but this will be tested by the upcoming:
https://reviews.llvm.org/D28462

llvm-svn: 300661
2017-04-19 06:06:38 +00:00
Dean Michael Berris 9404497acd [XRay][compiler-rt] Fix up CFI annotations and stack alignment
Summary:
Previously, we had been very undisciplined about CFI annotations with
the XRay trampolines. This leads to runtime crashes due to mis-alined
stack pointers that some function implementations may run into (i.e.
those using instructions that require properly aligned addresses coming
from the stack). This patch attempts to clean that up, as well as more
accurately use the correct amounts of space on the stack for stashing
and un-stashing registers.

Reviewers: eugenis, kcc

Subscribers: kpw, llvm-commits

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

llvm-svn: 300660
2017-04-19 05:37:14 +00:00
Chandler Carruth bd186c0787 Revert r300653 and r300650. The underlying commit fixes one issue with
modules but exposes much more widespread issues. Example and more
information is on the review thread for r300650.

Original commit summary:
[modules] Properly look up the owning module for an instantiation of a merged template.

llvm-svn: 300659
2017-04-19 05:25:13 +00:00
Craig Topper 73daaa8fb2 [CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC
llvm-svn: 300658
2017-04-19 05:17:33 +00:00
Xin Tong 636a332906 [JumpThread] We want to fold (not thread) when all predecessor go to single BB's successor. .
Summary: In case all predecessor go to a single successor of current BB. We want to fold (not thread).

Reviewers: efriedma, sanjoy

Reviewed By: sanjoy

Subscribers: dberlin, majnemer, llvm-commits

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

llvm-svn: 300657
2017-04-19 05:15:57 +00:00
Tim Shen 86652f262a Cleanup some GraphTraits iteration code
Use children<> and nodes<> in appropriate places to cleanup the code.

Also, as part of the cleanup,
change the signature of DominatorTreeBase's Split.
It is a protected non-virtual member function called only twice,
both from within the class,
and the removed passed argument in both cases is '*this'.
The reason for the existence of that argument seems to be that
back before r43115 Split was a free function,
so an argument to get '*this' was needed - but now that is no longer the
case.

Patch by Yoav Ben-Shalom!

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

llvm-svn: 300656
2017-04-19 03:22:50 +00:00
Serge Pavlov 5943a96d81 ARM: Use methods to access data stored with frame instructions
In r300196 several methods were added to TarfetInstrInfo to access
data stored with call frame setup/destroy instructions. This change
replaces calls to getOperand with calls to such special methods in
ARM target.

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

llvm-svn: 300655
2017-04-19 03:12:05 +00:00
Chris Bieneman 94c1708110 [CMake] Add configure check for sys/event.h
This enables the kqueue path in MainLoop for Darwin and BSD.

llvm-svn: 300654
2017-04-19 02:53:53 +00:00
Richard Smith eb86173f7b Fix member function call with null 'this' pointer.
llvm-svn: 300653
2017-04-19 02:19:21 +00:00
Eric Fiselier 2662e56d25 Fix tests for extended noexcept in the container adaptors tests
llvm-svn: 300652
2017-04-19 02:07:12 +00:00
Reid Kleckner 6190625381 Remove buggy 'addAttributes(unsigned, AttrBuilder)' overload
The 'addAttributes(unsigned, AttrBuilder)' overload delegated to 'get'
instead of 'addAttributes'.

Since we can implicitly construct an AttrBuilder from an AttributeSet,
just standardize on AttrBuilder.

llvm-svn: 300651
2017-04-19 01:51:13 +00:00
Richard Smith 5aacc4021b [modules] Properly look up the owning module for an instantiation of a merged template.
When looking for the template instantiation pattern of a templated entity,
consistently select the definition of the pattern if there is one. This means
we'll pick the same owning module when we start instantiating a template that
we'll later pick when determining which modules are visible during that
instantiation.

llvm-svn: 300650
2017-04-19 01:36:43 +00:00
Eric Fiselier 6ded58e279 Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <exception>
llvm-svn: 300649
2017-04-19 01:35:58 +00:00
Eric Fiselier 046492b932 Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <bitset>, <ios>, <locale>, and <iterator>
llvm-svn: 300648
2017-04-19 01:34:08 +00:00
Chris Bieneman c2a9e5b4ed One more attempt and Windows
This is the last Windows compile error, so... Hit me with your best shot.

llvm-svn: 300647
2017-04-19 01:32:08 +00:00
Eric Fiselier 7e23afcb60 Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in the functional library
llvm-svn: 300646
2017-04-19 01:28:47 +00:00
Eric Fiselier 2987087182 Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in tuple and utility
llvm-svn: 300644
2017-04-19 01:23:39 +00:00
Eric Fiselier afa7a957bd Cleanup remaining _LIBCPP_HAS_NO_<c++11-feature> usages in container headers
llvm-svn: 300643
2017-04-19 01:23:04 +00:00
Kostya Serebryany 1f231e7cc7 [libFuzzer] update -help: mention -exact_artifact_path in help for -minimize_crash and -cleanse_crash
llvm-svn: 300642
2017-04-19 01:22:04 +00:00
Leslie Zhai b86e9a1c14 [AVR] Migrate to new MCAsmInfo CodePointerSize
Reviewers: dylanmckay, rengolin, kzhuravl, jroelofs

Reviewed By: kzhuravl, jroelofs

Subscribers: kzhuravl, llvm-commits

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

llvm-svn: 300641
2017-04-19 01:20:43 +00:00
Chris Bieneman 9317c64768 Another netbsd build failure...
llvm-svn: 300640
2017-04-19 01:17:29 +00:00
Matthias Braun 661d3d4b00 ARMFrameLowering: Reserve emergency spill slot for large arguments
We need to reserve an emergency spill slot in cases with large argument
types that could overflow immediate offsets for FP relative address
calculations.

rdar://31317893

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

llvm-svn: 300639
2017-04-19 01:16:07 +00:00
Chris Bieneman 32ed478d40 Buildbot wack-a-mole!
This should fix the netbsd bot I just broke.

llvm-svn: 300638
2017-04-19 01:15:17 +00:00
Eric Fiselier 9adebede00 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in support headers and final tests
llvm-svn: 300637
2017-04-19 01:02:49 +00:00
Chris Bieneman dd94972890 ifdefing out the signal handling code on Windows
*fingers crossed*

This might fix the Window bots, but I really don't know...

llvm-svn: 300636
2017-04-19 01:00:16 +00:00
Eric Fiselier 95f8e6aa55 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the utilities library
llvm-svn: 300635
2017-04-19 00:56:32 +00:00
Craig Topper ff6922ad23 [DataLayout] Removed default value from a variable that isn't used without being overwritten. Make variable an enum instead of an int to avoid a cast later. NFC
llvm-svn: 300634
2017-04-19 00:31:38 +00:00
Eric Fiselier 414d17c67c Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the string library.
llvm-svn: 300633
2017-04-19 00:28:44 +00:00
Eric Fiselier 69154d6e07 Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers
llvm-svn: 300632
2017-04-19 00:23:45 +00:00
Dean Michael Berris 97923db891 [XRay][tools] Fix yaml matching to be more permissive
Account for a potentially empty function name.

Follow-up to D32153.

llvm-svn: 300631
2017-04-19 00:10:09 +00:00
Xin Tong 59cb7782cb Allow suppressing host and target info in VersionPrinter
Summary:
VersionPrinter by default outputs information about the Host CPU
and Default target. Printing this information requires linking in
a large amount of data, such as supported target triples as C
strings, which in turn bloats the binary size.

Enable a new CMake option LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO
which controls printing of the host and target info. This allows
the target triple names to be dead-code stripped. This is a nice
win for LLVM clients that wish to minimize their binary size, such
as graphics drivers.

By default this is ON, so there is no change in the default behavior.
Clients who wish to suppress this printing can do so by setting this
option to off via CMake.

A test app on Linux that uses ParseCommandLineOptions() shows a binary
size reduction of 23KB (from 149K to 126K) for a Release build, and 24KB
(from 135K to 111K) in a MinSizeRel build.

Reviewers: klimek, beanz, bogner, chandlerc, compnerd

Reviewed By: compnerd

Patch by pammon (Peter Ammon) !

Subscribers: llvm-commits

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

llvm-svn: 300630
2017-04-19 00:03:36 +00:00
Dylan McKay eb24b850c5 [AVR] Fix the build
'PointerSize' was renamed to 'CodePointerSize'.

llvm-svn: 300629
2017-04-18 23:53:10 +00:00
Reid Kleckner cdd26794a9 Use less temporary AttributeLists NFC
llvm-svn: 300628
2017-04-18 23:50:03 +00:00
Eric Fiselier 9f7cc58f81 Cleanup _LIBCPP_HAS_NO_<c++11-features> macro usage in regex
llvm-svn: 300627
2017-04-18 23:42:15 +00:00
Eric Fiselier f0aca21e09 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the input.output library
llvm-svn: 300626
2017-04-18 23:38:41 +00:00
Eric Fiselier ddda456a76 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in algorithm
llvm-svn: 300625
2017-04-18 23:26:47 +00:00