Commit Graph

235316 Commits

Author SHA1 Message Date
Adam Nemet 9c12639370 [Diag] Fix file comment
llvm-svn: 274078
2016-06-28 23:06:39 +00:00
Erik Pilkington 6a16ac0ed7 [Sema] Disallow ambigious base classes in template argument deduction
Fixes PR28195.

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

llvm-svn: 274077
2016-06-28 23:05:09 +00:00
Manman Ren 2b2b1a9200 ObjC Class Property: diagnostics when accessing a class property using instance.
When a class property is accessed with an object instance, before this commit,
we try to apply a typo correction of the same property:
property 'c' not found on object of type 'A *'; did you mean 'c'?

With this commit, we correctly emit a diagnostics:
property 'c' is a class property; did you mean to access it with class 'A'?

rdar://26866973

llvm-svn: 274076
2016-06-28 23:01:49 +00:00
Kyle Butt 82c2290e0f Codegen: [MBP] Add messages to asserts. NFC
llvm-svn: 274075
2016-06-28 22:50:54 +00:00
Evgeniy Stepanov 465651fe3d [msan] Fix handling of padding in sendmsg control data.
llvm-svn: 274074
2016-06-28 22:42:31 +00:00
Weiming Zhao 5410edddb1 [ARM] Fix 28282: cost computation for constant hoisting
Summary:
This fixes bug: https://llvm.org/bugs/show_bug.cgi?id=28282

Currently the cost model of constant hoisting checks the bit width of the data type of the constants.
However, the actual immediate value is small enough and not need to be hoisted.
This patch checks for the actual bit width needed for the constant.

Reviewers: t.p.northover, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

llvm-svn: 274073
2016-06-28 22:30:45 +00:00
Manman Ren d16490dfd1 Revert r274054 to try to appease the bot
llvm-svn: 274072
2016-06-28 22:20:17 +00:00
Rafael Espindola 857d7c5dd0 Handle empty versions.
They are significant now that we support @ in symbol names.

llvm-svn: 274071
2016-06-28 21:48:33 +00:00
Rafael Espindola 2100aa08b7 Don't check the section index, it is not relevant for this test.
llvm-svn: 274070
2016-06-28 21:47:17 +00:00
Dehao Chen 8cd84aaa6f Relax the clearance calculating for breaking partial register dependency.
Summary: LLVM assumes that large clearance will hide the partial register spill penalty. But in our experiment, 16 clearance is too small. As the inserted XOR is normally fairly cheap, we should have a higher clearance threshold to aggressively insert XORs that is necessary to break partial register dependency.

Reviewers: wmi, davidxl, stoklund, zansari, myatsina, RKSimon, DavidKreitzer, mkuper, joerg, spatel

Subscribers: davidxl, llvm-commits

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

llvm-svn: 274068
2016-06-28 21:19:34 +00:00
Chris Bieneman 92b2e8a295 [YAML] Fix YAML tags appearing before the start of sequence elements
Our existing yaml::Output code writes tags immediately when mapTag is called, without any state handling. This results in tags on sequence elements being written before the element itself. For example, we see this:

SomeArray:     !elem_type
  - key1:         1
    key2:         2 !elem_type2
  - key3:         3
    key4:         4

We should instead see:

SomeArray:
  - !elem_type
    key1:         1
    key2:         2
  - !elem_type2
    key3:         3
    key4:         4

Our reader handles reading properly, so this bug only impacts writing yaml sequences with tagged elements.

As a test for this I've modified the Mach-O yaml encoding to allways apply the !mach-o tag when encoding MachOYAML::Object entries. This results in the !mach-o tag appearing as expected in dumped fat files.

llvm-svn: 274067
2016-06-28 21:10:26 +00:00
Zhan Jun Liau 347db3e18e [SystemZ] Use NILL instruction instead of NILF where possible
Summary: SystemZ shift instructions only use the last 6 bits of the shift
amount. When the result of an AND operation is used as a shift amount, this
means that we can use the NILL instruction (which operates on the last 16 bits)
rather than NILF (which operates on the last 32 bits) for a 16-bit savings in
instruction size.

Reviewers: uweigand

Subscribers: llvm-commits

Author: colpell
Committing on behalf of Elliot.

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

llvm-svn: 274066
2016-06-28 21:03:19 +00:00
Simon Pilgrim 0fecee9cd8 Fix "not all control paths return a value" warning on MSVC
llvm-svn: 274065
2016-06-28 21:02:41 +00:00
Manman Ren ccf25bbf3f AvailabilityAttr: we accept "macos" as the platform name.
We continue accepting "macosx" but canonicalize it to "macos", When emitting
diagnostics, we use "macOS" instead of "OS X".

The PlatformName in TargetInfo is changed from "macosx" to "macos" so we can
directly compare the Platform in AvailabilityAttr with the PlatformName
in TargetInfo.

rdar://26795172
rdar://26800775

llvm-svn: 274064
2016-06-28 20:55:30 +00:00
Richard Smith 4a93c59e7f cxx_status: make c++17 footnote list formatting consistent with other footnote lists.
llvm-svn: 274060
2016-06-28 20:37:43 +00:00
Richard Smith 1aad29dfd2 cxx_status: fix footnote for p0136.
llvm-svn: 274059
2016-06-28 20:37:00 +00:00
Richard Smith 168c0e2789 Update cxx_dr_status from test/CXX/drs.
llvm-svn: 274058
2016-06-28 20:35:53 +00:00
Matthias Braun 0b9a07883d X86FrameLowering: Check subregs when deciding prolog kill flags
llvm-svn: 274057
2016-06-28 20:31:56 +00:00
Chris Bieneman 91c66275e9 [CMake] Adding USES_TERMINAL to a few additional custom targets
These are all long-running commands that should be in the ninja console job pool.

llvm-svn: 274056
2016-06-28 20:30:52 +00:00
Rafael Espindola b1556c42ce Use isPositionIndependent in a few more places.
I think this converts all the simple cases that really just care about
the generated code being position independent or not. The remaining
uses are a bit more complicated and are checking things like "is this
a library or executable" or "can this symbol be preempted".

llvm-svn: 274055
2016-06-28 20:13:36 +00:00
Zachary Turner 2012d744f4 Update llvm command line parser to support subcommands.
This allows command line tools to use syntaxes like the following:

  llvm-foo.exe command1 -o1 -o2
  llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options.  This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

  llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified.  So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

  llvm-foo.exe --help
  llvm-foo.exe command1 --help
  llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz
Differential Revision: http://reviews.llvm.org/D21485

llvm-svn: 274054
2016-06-28 20:09:47 +00:00
Jonathan Peyton ac7ba406ed Fix bugs in TAS and futex lock
* Incorrect lock value written in __kmp_test_futex_lock
* Incorrect lock value check in tas/futex lock with USE_LOCK_PROFILE on

Patch by Hansang Bae

llvm-svn: 274053
2016-06-28 19:37:24 +00:00
Jonathan Peyton cceebeef17 Revert r273898's UNICODE quick fix in favor of CMake's remove_definitions()
UNICODE and _UNICODE defintions were added in the LLVM CMake build system.
While on Unices, the UNICODE/_UNICODE macros don't cause problems, on Windows
only ittnotify_static.c should be compiled using -DUNICODE.  We are still
looking at a proper fix, but this change sets the build back to exactly what it
was doing before.  Also, a comment and TODO were added in the src/CMakeLists.txt
file to help explain.

llvm-svn: 274052
2016-06-28 19:25:13 +00:00
Krzysztof Parzyszek 5db97acfa2 Fix typo
llvm-svn: 274051
2016-06-28 19:12:28 +00:00
Richard Smith 183b3014a4 Fix unreasonably-precise CHECK.
llvm-svn: 274050
2016-06-28 19:09:30 +00:00
Richard Smith 5179eb7821 P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:
Replace inheriting constructors implementation with new approach, voted into
C++ last year as a DR against C++11.

Instead of synthesizing a set of derived class constructors for each inherited
base class constructor, we make the constructors of the base class visible to
constructor lookup in the derived class, using the normal rules for
using-declarations.

For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived
class that tracks the requisite additional information. We create shadow
constructors (not found by name lookup) in the derived class to model the
actual initialization, and have a new expression node,
CXXInheritedCtorInitExpr, to model the initialization of a base class from such
a constructor. (This initialization is special because it performs real perfect
forwarding of arguments.)

In cases where argument forwarding is not possible (for inalloca calls,
variadic calls, and calls with callee parameter cleanup), the shadow inheriting
constructor is not emitted and instead we directly emit the initialization code
into the caller of the inherited constructor.

Note that this new model is not perfectly compatible with the old model in some
corner cases. In particular:
 * if B inherits a private constructor from A, and C uses that constructor to
   construct a B, then we previously required that A befriends B and B
   befriends C, but the new rules require A to befriend C directly, and
 * if a derived class has its own constructors (and so its implicit default
   constructor is suppressed), it may still inherit a default constructor from
   a base class

llvm-svn: 274049
2016-06-28 19:03:57 +00:00
Lang Hames a5c7adcb38 [lld][MachO] Remove SimpleFile::definedAtoms().
This method just duplicates the functionality of SimpleFile::defined().

llvm-svn: 274048
2016-06-28 18:42:33 +00:00
Sanjay Patel 3a0f2606ec minimize regression tests and update checks
llvm-svn: 274047
2016-06-28 18:40:08 +00:00
Sanjay Patel 8ce43c098b minimize regression tests and update checks
llvm-svn: 274046
2016-06-28 18:33:10 +00:00
Chris Bieneman ce45e39c24 [CMake] Connect check-compiler-rt to check-all
When using the LLVM_BUILD_EXTERNAL_COMPILER_RT option with
LLVM_ENABLE_TESTS we should also bind check-compiler-rt to check-all so
that the compiler-rt tests run too.

llvm-svn: 274045
2016-06-28 18:32:22 +00:00
Artur Pilipenko 70d4bb566c Update the expected masked load/store intrinsics names in tests
The mangling of their names was changed in order to support arbitrary addrspace pointers as arguments in rL274043.

llvm-svn: 274044
2016-06-28 18:28:45 +00:00
Artur Pilipenko 7ad95ec22d Support arbitrary addrspace pointers in masked load/store intrinsics
This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).

This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

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

llvm-svn: 274043
2016-06-28 18:27:25 +00:00
Jacques Pienaar f43266b868 [lanai] Update ELF number to correspond to the assigned number.
Change EM_LANAI to correspond to machine number assigned by Xinuos.

llvm-svn: 274042
2016-06-28 18:22:22 +00:00
Artur Pilipenko 16eb3a800a NFC. Test commit, remove a redundant empty line in Tooling.cpp
llvm-svn: 274041
2016-06-28 17:56:29 +00:00
Michael Kuperstein a118acb82f [X86] Update a test with more explicit checks. NFC.
llvm-svn: 274040
2016-06-28 17:42:13 +00:00
Matt Arsenault eb9025d698 AMDGPU: Fix global isel crashes
llvm-svn: 274039
2016-06-28 17:42:09 +00:00
Chad Rosier 02e831cf2f Typos. NFC.
llvm-svn: 274038
2016-06-28 17:19:10 +00:00
Greg Clayton d781d2c9b7 64-bit LEB values are not always correctly decoded due to a casting issue, now they are.
<rdar://problem/27002247> 

llvm-svn: 274037
2016-06-28 17:14:18 +00:00
Michael Kuperstein 85de98fd24 [X86] Reorder source list alphabetically. NFC.
llvm-svn: 274036
2016-06-28 17:11:15 +00:00
Chris Bieneman dd0f09b31d [CMake] Pass LLVM_LIT_ARGS into compiler-rt build.
If top-level lit args are specified, you probably want that in the sub-project too.

llvm-svn: 274035
2016-06-28 17:00:49 +00:00
Matt Arsenault 254a6450dd AMDGPU: Fix typo
llvm-svn: 274034
2016-06-28 16:59:53 +00:00
Matt Arsenault 3d846501fb AMDGPU: Remove unused function
llvm-svn: 274033
2016-06-28 16:59:49 +00:00
Jim Ingham 1d107725a3 Process::StopForDetachOrDestroy should actually return an error if it can't stop the
process.

<rdar://problem/26990309>

llvm-svn: 274032
2016-06-28 16:35:58 +00:00
Chris Bieneman e55838d596 [CMake] [Apple Clang] Enable Compiler-RT tests on stage2 builds
We want to be able to run the compiler-rt tests on stage2 build configurations in CI. This should enable that.

llvm-svn: 274031
2016-06-28 16:32:48 +00:00
Chris Bieneman 42e22dcbb5 [CMake] In r273957, I deleted a line that shouldn't have been removed.
llvm-svn: 274030
2016-06-28 16:30:23 +00:00
Vedant Kumar 9cbad2c2b8 [llvm-cov] Create an index of reports in -output-dir mode
This index lists the reports available in the 'coverage' sub-directory.
This will help navigate coverage output from large projects.

This commit factors the file creation code out of SourceCoverageView and
into CoveragePrinter.

llvm-svn: 274029
2016-06-28 16:12:24 +00:00
Vedant Kumar 64d8a029e9 [llvm-cov] Minor cleanups (NFC)
- Test the '-o' alias for -output-dir.
- Use a helper method in a conditional.
- Add a period.

llvm-svn: 274028
2016-06-28 16:12:20 +00:00
Vedant Kumar cef440f7a7 [llvm-cov] Avoid copying file paths multiple times (NFC)
llvm-svn: 274027
2016-06-28 16:12:18 +00:00
Vedant Kumar ebe8401638 [llvm-cov] Rename ShowFormat to Format (NFC)
This makes it a bit more generic, in case we want to emit summary
reports in different formats in the future.

llvm-svn: 274026
2016-06-28 16:12:15 +00:00
Vedant Kumar de717e655b [llvm-cov] Move a check into a helper method (NFC)
llvm-svn: 274025
2016-06-28 16:12:12 +00:00