Chandler Carruth [Mon, 19 Jan 2015 01:03:05 +0000 (01:03 +0000)]
[multilib] Teach Polly's CMake to use the libdir suffix variable. This
lets 'ninja check-polly' pass for me with a lib64 build of LLVM.
I've not updated the standalone side as I don't use it and don't have an
easy way to test any changes I've made there. I mostly wanted to be able
to actually run Polly's tests when I update its use of LLVM's APIs
during my refactorings on the (very unlikely) off chance that I make
a change which compiles but does the wrong thing.
llvm-svn: 226420
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:33 +0000 (00:35 +0000)]
Reorder.
llvm-svn: 226419
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:25 +0000 (00:35 +0000)]
[CMake] examples/Kaleidoscope: Prune redundant libdeps.
llvm-svn: 226418
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:18 +0000 (00:35 +0000)]
[CMake] Update libdeps in examples/Kaleidoscope/Chapter4.
llvm-svn: 226417
David Blaikie [Sun, 18 Jan 2015 20:45:48 +0000 (20:45 +0000)]
unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizer
llvm-svn: 226416
David Blaikie [Sun, 18 Jan 2015 20:43:57 +0000 (20:43 +0000)]
Attempt to fix the MSVC build by working around a layering issue
Since MCStreamer isn't part of Support, the dtor can't be called from
here - so just pass by reference instead. This is rather imperfect, but
will hopefully suffice.
llvm-svn: 226415
David Blaikie [Sun, 18 Jan 2015 20:29:04 +0000 (20:29 +0000)]
std::unique_ptrify the MCStreamer argument to createAsmPrinter
llvm-svn: 226414
Serge Pavlov [Sun, 18 Jan 2015 20:04:35 +0000 (20:04 +0000)]
Handle unscoped enumeration in nested name specifier.
If an unscoped enum is used as a nested name specifier and the language dialect
is not C++ 11, issue an extension warning.
This fixes PR16951.
Differential Revision: http://reviews.llvm.org/D6389
llvm-svn: 226413
Matt Arsenault [Sun, 18 Jan 2015 19:30:32 +0000 (19:30 +0000)]
R600: Remove redundant test
This is already covered in ftrunc.ll
llvm-svn: 226412
Marshall Clow [Sun, 18 Jan 2015 19:05:51 +0000 (19:05 +0000)]
Cleaning up the test suite; remove some includes of non-standard file <__config>
llvm-svn: 226411
Serge Pavlov [Sun, 18 Jan 2015 19:05:48 +0000 (19:05 +0000)]
Update error message text.
Previously if an enumeration was used in a nested name specifier in pre-C++11
language dialect, error message was 'XXX is not a class, namespace, or scoped
enumeration'. This patch removes the word 'scoped' as in C++11 any enumeration
may be used in this context.
llvm-svn: 226410
Daniel Sanders [Sun, 18 Jan 2015 18:43:10 +0000 (18:43 +0000)]
[mips] 'CHECK :' is not a valid check directive. Fixed.
llvm-svn: 226409
Daniel Sanders [Sun, 18 Jan 2015 18:38:36 +0000 (18:38 +0000)]
[mips] Make whitespace in disassembler tests more consistent. NFC.
The tests for the ISA's should now be approximately diffable. That is, the
output of 'diff valid-mips1.txt valid-mips2.txt' should be emit the lines
for instructions that were added/removed to/from MIPS-I by MIPS-II. This
doesn't work perfectly at the moment due to ordering differences but it
should be close.
llvm-svn: 226408
Daniel Sanders [Sun, 18 Jan 2015 18:21:19 +0000 (18:21 +0000)]
[mips] Make whitespace of disassembler tests more consistent by removing blank lines. NFC.
llvm-svn: 226407
Simon Pilgrim [Sun, 18 Jan 2015 18:06:23 +0000 (18:06 +0000)]
[X86][SSE] Added scalar min/max folding tests. NFC.
llvm-svn: 226406
Simon Pilgrim [Sun, 18 Jan 2015 17:04:32 +0000 (17:04 +0000)]
[X86][SSE] Added float extract and xmm extract/insert stack folding tests. NFC.
llvm-svn: 226405
Simon Pilgrim [Sun, 18 Jan 2015 16:22:15 +0000 (16:22 +0000)]
[X86][SSE] Added scalar conversion stack folding tests. NFC.
llvm-svn: 226404
Hal Finkel [Sun, 18 Jan 2015 15:59:44 +0000 (15:59 +0000)]
[PowerPC] Don't hard-code R2 as register when processing TOC relocations
Instructions that have high-order TOC relocations always carry R2 as their base
register, so it does not matter whether we take the register from the
instruction or just hard-code it in PPCAsmPrinter. In the future, however, we
might want to apply these relocations to instructions using a different
register, so taking the register from the instruction is a better thing to do.
No change in functionality here, however.
llvm-svn: 226403
Tobias Grosser [Sun, 18 Jan 2015 15:59:16 +0000 (15:59 +0000)]
Remove redundant semicolon clang-format complained about
llvm-svn: 226402
Hal Finkel [Sun, 18 Jan 2015 14:31:10 +0000 (14:31 +0000)]
[PowerPC] Add some FIXMEs for fastcc and FPR <-> GPR moves
So we don't forget, once we support FPR <-> GPR moves on the P8, we'll likely
want to re-visit this part of the calling convention.
llvm-svn: 226401
Simon Pilgrim [Sun, 18 Jan 2015 12:56:39 +0000 (12:56 +0000)]
AVX1 stack folding tests. NFC.
Begun adding more exhaustive tests - all floating point instructions should now be either tested or have placeholders. We do seem to have a number of missing instructions, I will add a patch for review once the remaining working instructions are added.
I'll then move on to SSE tests and then the integer instructions.
llvm-svn: 226400
Hal Finkel [Sun, 18 Jan 2015 12:08:47 +0000 (12:08 +0000)]
[PowerPC] Initial PPC64 calling-convention changes for fastcc
The default calling convention specified by the PPC64 ELF (V1 and V2) ABI is
designed to work with both prototyped and non-prototyped/varargs functions. As
a result, GPRs and stack space are allocated for every argument, even those
that are passed in floating-point or vector registers.
GlobalOpt::OptimizeFunctions will transform local non-varargs functions (that
do not have their address taken) to use the 'fast' calling convention.
When functions are using the 'fast' calling convention, don't allocate GPRs for
arguments passed in other types of registers, and don't allocate stack space for
arguments passed in registers. Other changes for the fast calling convention
may be added in the future.
llvm-svn: 226399
Chandler Carruth [Sun, 18 Jan 2015 10:52:23 +0000 (10:52 +0000)]
[PM] Update Polly for LLVM r226394 and r226396 which changed some of the
block splitting interfaces to accept specific analyses rather than
a pass.
llvm-svn: 226398
Chandler Carruth [Sun, 18 Jan 2015 09:21:15 +0000 (09:21 +0000)]
[PM] Pull the analyses used for another utility routine into its API
rather than relying on the pass object.
This one is a bit annoying, but will pay off. First, supporting this one
will make the next one much easier, and for utilities like LoopSimplify,
this is moving them (slowly) closer to not having to pass the pass
object around throughout their APIs.
llvm-svn: 226396
David Blaikie [Sun, 18 Jan 2015 02:48:07 +0000 (02:48 +0000)]
Add comment after API changes in r225090
Code review suggestion by Eric Christopher.
llvm-svn: 226395
Chandler Carruth [Sun, 18 Jan 2015 02:39:37 +0000 (02:39 +0000)]
[PM] Sink the specific analyses preserved by SplitBlock into its
interface, removing Pass from its interface.
This also makes those analyses optional so that passes which don't even
preserve these (or use them) can skip the logic entirely.
llvm-svn: 226394
David Blaikie [Sun, 18 Jan 2015 02:17:55 +0000 (02:17 +0000)]
Update for tests failing due to improvements in clang's column information for aggregate expressions
llvm-svn: 226393
Chandler Carruth [Sun, 18 Jan 2015 02:11:23 +0000 (02:11 +0000)]
[PM] Replace another Pass argument with specific analyses that are
optionally updated by MergeBlockIntoPredecessors.
No functionality changed, just refactoring to clear the way for the new
pass manager.
llvm-svn: 226392
Chandler Carruth [Sun, 18 Jan 2015 02:08:05 +0000 (02:08 +0000)]
[PM] Refactor how the LoopRotation pass access the DominatorTree.
Instead of querying the pass every where we need to, do that once and
cache a pointer in the pass object. This is both simpler and I'm about
to add yet another place where we need to dig out that pointer.
llvm-svn: 226391
David Blaikie [Sun, 18 Jan 2015 01:57:54 +0000 (01:57 +0000)]
DebugInfo: Attribute complex expressions to the source location of the expression
Just as r225956 did for scalar expressions (CGExprScalar::Visit), do the
same for complex expressions.
llvm-svn: 226390
Nico Weber [Sun, 18 Jan 2015 01:50:35 +0000 (01:50 +0000)]
Address review feedback from r215780: Use a flag insteda of the heap. No behavior change.
llvm-svn: 226389
David Blaikie [Sun, 18 Jan 2015 01:48:19 +0000 (01:48 +0000)]
DebugInfo: Attribute aggregate expressions to the source location of the expression
Just as r225956 did for scalar expressions (CGExprScalar::Visit), do the
same for aggregate expressions.
llvm-svn: 226388
Chandler Carruth [Sun, 18 Jan 2015 01:47:30 +0000 (01:47 +0000)]
[PM] Update Polly for LLVM r226385 which made LoopInfo actually derive
from LoopInfoBase<...>, removing the need for the awkward getBase()
dance.
llvm-svn: 226387
Chandler Carruth [Sun, 18 Jan 2015 01:45:07 +0000 (01:45 +0000)]
[PM] Lift the actual analyses used into the inferface rather than
accepting a Pass and querying it for analyses.
This is necessary to allow the utilities to work both with the old and
new pass managers, and I also think this makes the interface much more
clear and helps the reader know what analyses the utility can actually
handle. I plan to repeat this process iteratively to clean up all the
pass utilities.
llvm-svn: 226386
Chandler Carruth [Sun, 18 Jan 2015 01:25:51 +0000 (01:25 +0000)]
[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
cleaner to derive from the generic base.
Thise removes a ton of boiler plate code and somewhat strange and
pointless indirections. It also remove a bunch of the previously needed
friend declarations. To fully remove these, I also lifted the verify
logic into the generic LoopInfoBase, which seems good anyways -- it is
generic and useful logic even for the machine side.
llvm-svn: 226385
David Blaikie [Sun, 18 Jan 2015 00:37:04 +0000 (00:37 +0000)]
Refactor test so it's not lazily emitted on a global, simplifying ordering when more test cases are added
llvm-svn: 226384
David Blaikie [Sun, 18 Jan 2015 00:14:21 +0000 (00:14 +0000)]
Recommit r225083 (reverted in r225361) now that calls to aggregate initializers from in class non-static data members are explicitly attributed to the desired line.
The code setting the debug location being removed here was accidentally
leaking a location into the call to the non-static data member's ctor
call. Without it the call had no location and could cause assertion
failures if it was inlined. Now that it has a location (and a correct
one at that) this code should hopefully be no longer needed.
It's possible of course that other parts of the debug info are also
relying on the debug locations being set here to leak to where they're
needed - so we might see the same assertions again & will have to
investigate what the dependence was/is. But the chances are good that
any of those are debug info line table quality bugs we've just not found
yet anyway - so it'll be good to flush them out.
llvm-svn: 226383
David Blaikie [Sun, 18 Jan 2015 00:12:58 +0000 (00:12 +0000)]
DebugInfo: Correct the debug location of non-static data member initializers
This was causing some trouble for otherwise dead code removed in r225085
(reverted in r225361). The location being set for function arguments was
leaking out to the call which wasn't setting its own location (so a
quality bug turned into a crasher with r225085). Fix this so r225085 can
be recommitted.
llvm-svn: 226382
Rui Ueyama [Sat, 17 Jan 2015 23:27:37 +0000 (23:27 +0000)]
Remove dead code.
llvm-svn: 226381
Rui Ueyama [Sat, 17 Jan 2015 22:38:09 +0000 (22:38 +0000)]
Update comments.
llvm-svn: 226380
Chandler Carruth [Sat, 17 Jan 2015 14:49:23 +0000 (14:49 +0000)]
[PM] Cleanup more warnings my refactoring exposed where now we have
unused variables in a no-asserts build.
I've fixed this by putting the entire loop behind an #ifndef as it
contains nothing other than asserts.
llvm-svn: 226377
Chandler Carruth [Sat, 17 Jan 2015 14:31:35 +0000 (14:31 +0000)]
[PM] Remove a dead field.
This was dead even before I refactored how we initialized it, but my
refactoring made it trivially dead and it is now caught by a Clang
warning. This fixes the warning and should clean up the -Werror bot
failures (sorry!).
llvm-svn: 226376
Chandler Carruth [Sat, 17 Jan 2015 14:20:14 +0000 (14:20 +0000)]
[msan] Fix a uninitialized-use bug in the template argument diffing
logic.
In one place we would try to check for the difference between integers
even if we were missing one of the integers. This would eventually end
up reading uninitialized data out of the APSInt objects. The fix is to
short circuit the sameness test when we don't have integers on both
sides.
This fixes a test failure I was seeing with MSan. Not sure whether other
bots were seeing it or not, but yay MSan. In particular the feature to
very carefully track origins back through stores throughout the program
was invaluable.
llvm-svn: 226375
Chandler Carruth [Sat, 17 Jan 2015 14:16:56 +0000 (14:16 +0000)]
[PM] Update Polly following LLVM r226373 which refactors LoopInfo in
preparation for the new pass manager.
llvm-svn: 226374
Chandler Carruth [Sat, 17 Jan 2015 14:16:18 +0000 (14:16 +0000)]
[PM] Split the LoopInfo object apart from the legacy pass, creating
a LoopInfoWrapperPass to wire the object up to the legacy pass manager.
This switches all the clients of LoopInfo over and paves the way to port
LoopInfo to the new pass manager. No functionality change is intended
with this iteration.
llvm-svn: 226373
Nico Weber [Sat, 17 Jan 2015 06:32:54 +0000 (06:32 +0000)]
Try to fix the Windows build after r226362.
llvm-svn: 226372
Nico Weber [Sat, 17 Jan 2015 04:27:09 +0000 (04:27 +0000)]
Add tests for two more asserts that r226365 fixed according to SLi's bot.
llvm-svn: 226371
Nico Weber [Sat, 17 Jan 2015 04:14:31 +0000 (04:14 +0000)]
Add a test for something that used to crash before r226365.
llvm-svn: 226370
Hal Finkel [Sat, 17 Jan 2015 03:57:34 +0000 (03:57 +0000)]
[PowerPC] Don't list R11 as a patchpoint scratch register
R11's status is the same under both the PPC64 ELF V1 and V2 ABIs: it is
reserved for use as an "environment pointer" for compilation models that
require such a thing. We don't, we also don't need a second scratch register,
and because we support only "local" patchpoint call targets, we might as well
let R11 be used for anyregcc patchpoints.
llvm-svn: 226369
Hal Finkel [Sat, 17 Jan 2015 03:31:43 +0000 (03:31 +0000)]
[sanitizer] Adjust max read size in FlagHandlerInclude
Setting the maximum read size in FlagHandlerInclude to 2^15 might be a good
default, but causes the read to fail on systems with a page size larger than
that (ReadFileToBuffer(...) will fail if the maximum allowed size is less than
the value returned by GetPageSizeCached()). For example, on my PPC64/Linux
system, GetPageSizeCached() returns 2^16. In case the page size is larger, use
that instead.
llvm-svn: 226368
Hans Wennborg [Sat, 17 Jan 2015 03:19:21 +0000 (03:19 +0000)]
ProgrammersManual.rst: fix a typo
llvm-svn: 226367
Enrico Granata [Sat, 17 Jan 2015 02:46:20 +0000 (02:46 +0000)]
Commit fix for a static analyzer issue where a string pointer could theoretically be NULL..
llvm-svn: 226366
Nico Weber [Sat, 17 Jan 2015 02:33:17 +0000 (02:33 +0000)]
If a function decl cannot be merged, mark it as invalid.
Clang currently crashes on
class C {
C() = default;
C() = delete;
};
My cunning plan for fixing this was to change the `if (!FnD)` in
Parser::ParseCXXInlineMethodDef() to `if (!FnD || FnD->isInvalidDecl)` – but
alas, the second constructor decl wasn't marked as invalid. This lets
Sema::MergeFunctionDecl() return true on function redeclarations, which leads
to them being marked invalid.
This also improves error messages when functions are redeclared.
llvm-svn: 226365
Nico Weber [Sat, 17 Jan 2015 02:27:54 +0000 (02:27 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 226364
Nico Weber [Sat, 17 Jan 2015 02:26:40 +0000 (02:26 +0000)]
Address review feedback from r226306. No intended behavior change.
llvm-svn: 226363
Vince Harron [Sat, 17 Jan 2015 02:20:29 +0000 (02:20 +0000)]
Added Connection::GetURI()
This function returns a URI of the resource that the connection is connected to. This is especially important for connections established by accepting a connection from a remote host.
Also added implementations for ConnectionMachPort, ConnectionSharedMemory,
Also fixed up some documentation in Connection::Write
Renamed ConnectionFileDescriptorPosix::SocketListen to ConnectionFileDescriptorPosix::SocketListenAndAccept
Fixed a log message in Socket.cpp
Differential Review: http://reviews.llvm.org/D7026
llvm-svn: 226362
Rafael Espindola [Sat, 17 Jan 2015 01:47:39 +0000 (01:47 +0000)]
Make sure all weak destructors go in a comdat in the ms abi.
Destructors have a special treatment in getFunctionLinkage. Instead of
duplicating the logic, check the resulting linkage.
llvm-svn: 226361
Mehdi Amini [Sat, 17 Jan 2015 01:35:56 +0000 (01:35 +0000)]
Improve DAG combine pass on certain IR vector patterns
Loading 2 2x32-bit float vectors into the bottom half of a 256-bit vector
produced suboptimal code in AVX2 mode with certain IR combinations.
In particular, the IR optimizer folded 2f32 + 2f32 -> 4f32, 4f32 + 4f32
(undef) -> 8f32 into a 2f32 + 2f32 -> 8f32, which seems more canonical,
but then mysteriously generated rather bad code; the movq/movhpd combination
didn't match.
The problem lay in the BUILD_VECTOR optimization path. The 2f32 inputs
would get promoted to 4f32 by the type legalizer, eventually resulting
in a BUILD_VECTOR on two 4f32 into an 8f32. The BUILD_VECTOR then, recognizing
these were both half the output size, concatted them and then produced
a shuffle. However, the resulting concat + shuffle was more complex than
it should be; in the case where the upper half of the output is undef, we
probably want to generate shuffle + concat instead.
This enhancement causes the vector_shuffle combine step to recognize this
suboptimal pattern and correct it. I included it there instead of in BUILD_VECTOR
in case the same suboptimal pattern occurs for other reasons.
This results in the optimizer correctly producing the optimal movq + movhpd
sequence for all three variations on this IR, even with AVX2.
I've included a test case.
Radar link: rdar://problem/
19287012
Fix for PR 21943.
From: Fiona Glaser <fglaser@apple.com>
llvm-svn: 226360
Richard Trieu [Sat, 17 Jan 2015 00:56:10 +0000 (00:56 +0000)]
Clean up a string comparison with StringRef. Suggestion by David Majnemer.
llvm-svn: 226359
Lang Hames [Sat, 17 Jan 2015 00:55:05 +0000 (00:55 +0000)]
[RuntimeDyld] Tidy up emitCommonSymbols a little. NFC.
llvm-svn: 226358
Richard Trieu [Sat, 17 Jan 2015 00:46:55 +0000 (00:46 +0000)]
Remove std::move that was preventing return value optimization.
llvm-svn: 226357
Richard Trieu [Sat, 17 Jan 2015 00:46:44 +0000 (00:46 +0000)]
Remove std::move that was preventing return value optimization.
llvm-svn: 226356
Matthias Braun [Sat, 17 Jan 2015 00:33:13 +0000 (00:33 +0000)]
RegisterCoalescer: Cleanup and improved comment for a subtle detail.
llvm-svn: 226353
Matthias Braun [Sat, 17 Jan 2015 00:33:11 +0000 (00:33 +0000)]
RegisterCoalescer: Cleanup by factoring out a common expression
llvm-svn: 226352
Matthias Braun [Sat, 17 Jan 2015 00:33:09 +0000 (00:33 +0000)]
RegisterCoalescer: Cleanup comment style
- Consistenly put comments above the function declaration, not the
definition. To achieve this some duplicate comments got merged and
some comment parts describing implementation details got moved into their
functions.
- Consistently use doxygen comments above functions.
- Do not use doxygen comments inside functions.
llvm-svn: 226351
Matthias Braun [Sat, 17 Jan 2015 00:33:06 +0000 (00:33 +0000)]
RegisterCoalescer: Drive-by typo + whitespace fix
llvm-svn: 226350
Lang Hames [Sat, 17 Jan 2015 00:32:56 +0000 (00:32 +0000)]
[RuntimeDyld] Remove the brace initialization that was introduced in r226341.
Evidently MSVC doesn't like it.
llvm-svn: 226349
Jason Molenda [Fri, 16 Jan 2015 23:54:15 +0000 (23:54 +0000)]
Add comments explaining the unwind setup in
ABIMacOSX_i386::CreateFunctionEntryUnwindPlan,
ABIMacOSX_i386::CreateDefaultUnwindPlan,
ABISysV_x86_64::CreateFunctionEntryUnwindPlan,
ABISysV_x86_64::CreateDefaultUnwindPlan
llvm-svn: 226347
Greg Fitzgerald [Fri, 16 Jan 2015 23:34:41 +0000 (23:34 +0000)]
Add LLVM_LINK_COMPONENTS for the shared object build
Differential Revision: http://reviews.llvm.org/D7023
From: Greg Fitzgerald <garious@gmail.com>
llvm-svn: 226346
Kevin Enderby [Fri, 16 Jan 2015 23:29:07 +0000 (23:29 +0000)]
Change the test case for llvm-objdump’s -archive-headers option to not check the size
while I once again try to figure out why only the clang-cmake-armv7-a15-full bot
is getting that value wrong.
llvm-svn: 226345
Philip Reames [Fri, 16 Jan 2015 23:21:07 +0000 (23:21 +0000)]
Update a comment
Be a bit more explicit about the fact that addrspace(1) is not reserved.
llvm-svn: 226344
Enrico Granata [Fri, 16 Jan 2015 23:16:22 +0000 (23:16 +0000)]
Several improvements to the shush script
llvm-svn: 226343
Philip Reames [Fri, 16 Jan 2015 23:16:12 +0000 (23:16 +0000)]
clang-format all the GC related files (NFC)
Nothing interesting here...
llvm-svn: 226342
Lang Hames [Fri, 16 Jan 2015 23:13:56 +0000 (23:13 +0000)]
[RuntimeDyld] Track symbol visibility in RuntimeDyld.
RuntimeDyld symbol info previously consisted of just a Section/Offset pair. This
patch replaces that pair type with a SymbolInfo class that also tracks symbol
visibility. A new method, RuntimeDyld::getExportedSymbolLoadAddress, is
introduced which only returns a non-zero result for exported symbols. For
non-exported or non-existant symbols this method will return zero. The
RuntimeDyld::getSymbolAddress method retains its current behavior, returning
non-zero results for all symbols regardless of visibility.
No in-tree clients of RuntimeDyld are changed. The newly introduced
functionality will be used by the Orc APIs.
No test case: Since this patch doesn't modify the behavior for any in-tree
clients we don't have a good tool to test this with yet. Once Orc is in we can
use it to write regression tests that test these changes.
llvm-svn: 226341
Steven Wu [Fri, 16 Jan 2015 23:05:28 +0000 (23:05 +0000)]
Adding option -fno-inline-asm to disallow inline asm
Summary:
This patch add a new option to dis-allow all inline asm.
Any GCC style inline asm will be reported as an error.
Reviewers: rnk, echristo
Reviewed By: rnk, echristo
Subscribers: bob.wilson, rnk, echristo, rsmith, cfe-commits
Differential Revision: http://reviews.llvm.org/D6870
llvm-svn: 226340
Jordan Rose [Fri, 16 Jan 2015 23:04:31 +0000 (23:04 +0000)]
Suggest objc_method_family(none) for a property named -newFoo or similar.
As mentioned in the previous commit, if a property (declared with @property)
has a name that matches a special Objective-C method family, the getter picks
up that family despite being declared by the property. The most correct way
to solve this problem is to add the 'objc_method_family' attribute to the
getter with an argument of 'none', which unfortunately requires an explicit
declaration of the getter.
This commit adds a note to the existing error (ARC) or warning (MRR) for
such a poorly-named property that suggests the solution; if there's already
a declaration of the getter, it even includes a fix-it.
llvm-svn: 226339
Jordan Rose [Fri, 16 Jan 2015 23:04:26 +0000 (23:04 +0000)]
ObjC getters with names like "newItem" should still be linked to the @property.
Two years ago I added a compile-time "optimization" to
ObjCMethodDecl::findPropertyDecl: exit early if the current method is part
of a special Objective-C method family (like 'new' or 'init'). However, if a
property (declared with @property) has a name that matches a method family,
the getter picks up that family despite being declared by the property. The
early exit then made ObjCMethodDecl::findPropertyDecl decide that there
was no associated property, despite the method itself being marked as an
accessor. This corrects that by removing the early exit.
This does /not/ change the fact that such a getter is considered to return a
value with a +1 retain count. The best way to eliminate this is by adding the
objc_method_family(none) attribute to the getter, but unlike the existing
ns_returns_not_retained that can't be applied directly to the property -- you
have to redeclare the getter instead.
(It'd be nice if @property just implied objc_method_family(none) for its
getter, but that would be a backwards-incompatible change.)
rdar://problem/
19038838
llvm-svn: 226338
David Blaikie [Fri, 16 Jan 2015 22:55:09 +0000 (22:55 +0000)]
Isolate test for PR22096 to clang.
Emitting inlinable calls without debug locations (in functions with
debug info, to functions with debug info) is problematic for debug info
when inlining occurs. Test specifically that we don't do that in this
case - thus the test isn't simply "don't crash", it's "include debug
location for this call" (granted it's the wrong location - fix for that
is coming)
llvm-svn: 226337
Rui Ueyama [Fri, 16 Jan 2015 22:44:50 +0000 (22:44 +0000)]
[PATCH] Speculatively instantiate archive members
LLD parses archive file index table only at first. When it finds a symbol
it is looking for is defined in a member file in an archive file, it actually
reads the member from the archive file. That's done in the core linker.
That's a single-thread process since the core linker is single threaded.
If your command line contains a few object files and a lot of archive files
(which is quite often the case), LLD hardly utilizes hardware parallelism.
This patch improves parallelism by speculatively instantiating archive
file members. At the beginning of the core linking, we first create a map
containing all symbols defined in all members, and each time we find a
new undefined symbol, we instantiate a member file containing the
symbol (if such file exists). File instantiation is side effect free, so this
should not affect correctness.
This is a quick benchmark result. Time to link self-link LLD executable:
Linux 9.78s -> 8.50s (0.86x)
Windows 6.18s -> 4.51s (0.73x)
http://reviews.llvm.org/D7015
llvm-svn: 226336
Saleem Abdulrasool [Fri, 16 Jan 2015 22:34:10 +0000 (22:34 +0000)]
PE/COFF: rework how we handle base relocations
Generalise the base relocation handling slightly to support multiple base
relocation types in PE/COFF. This is necessary to generate proper executables
for WoA.
Track the base relocation type from the decision that we need a base relocation
to the point where we emit the base relocation into base relocation directory.
Remove an outdated TODO item while in the area.
llvm-svn: 226335
Kaelyn Takata [Fri, 16 Jan 2015 22:11:04 +0000 (22:11 +0000)]
Fix a case where delayed typo correction should have resolved an
ambiguity but wasn't.
In the new test case, "click" wasn't being corrected properly because
Sema::ClassifyName would call CorrectTypo for "click" then later
Sema::DiagnoseEmptyLookup would call CorrectTypoDelayed for the same use
of "click" (the former by the parser needing to determine what the
identifier is so it knows how to parse the statement, i.e. is it the
beginning of a declaration or an expression). CorrectTypo would record
that typo correction for "click" failed and CorrectTypoDelayed would see
that and not even try to correct the typo, even though in this case
CorrectTypo failed due to an ambiguity (both "Click" and "clock" having
an edit distance of one from "click") that could be resolved with more
information. The fix is two-fold:
1) Have CorrectTypo not record failed corrections if the reason for
the failure was two or more corrections with the same edit
distance, and
2) Make the CorrectionCandidateCallback used by
Parser::ParseCastExpression reject FunctionDecl candidates when the
next token after the identifier is a ".", "=", or "->" since
functions cannot be assigned to and do not have members that can be
referenced.
The reason for two correction spots is that from r222549 until r224375
landed, the first correction attempt would fail completely but the
second would suggest "clock" while having the note point to the
declaration of "Click".
llvm-svn: 226334
Matt Arsenault [Fri, 16 Jan 2015 22:11:00 +0000 (22:11 +0000)]
R600: Clean up floor tests
These were using different naming schemes,
not using multiple check prefixes and not using
-LABEL.
llvm-svn: 226333
Kevin Enderby [Fri, 16 Jan 2015 22:10:36 +0000 (22:10 +0000)]
Fix the Archive::Child::getRawSize() method used by llvm-objdump’s -archive-headers option
and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option.
llvm-svn: 226332
Eric Christopher [Fri, 16 Jan 2015 22:03:52 +0000 (22:03 +0000)]
Remove pathname dependence. Also rewrite test to use FileCheck
at the same time.
Patch by David Callahan.
llvm-svn: 226331
Eric Fiselier [Fri, 16 Jan 2015 21:59:07 +0000 (21:59 +0000)]
A couple small changes to get LIT working with python3
llvm-svn: 226330
Rui Ueyama [Fri, 16 Jan 2015 21:58:20 +0000 (21:58 +0000)]
Move common code to base class.
llvm-svn: 226329
Sean Silva [Fri, 16 Jan 2015 21:44:26 +0000 (21:44 +0000)]
Fix some copypasta typos in asserts.
Fixes PR22236
Patch by Nicolas Brunie! <nicolas.brunie@kalray.eu>
llvm-svn: 226328
Lang Hames [Fri, 16 Jan 2015 21:42:07 +0000 (21:42 +0000)]
[Kaleidoscope] Run clang-format over chapter 4 of kaleidoscope.
I forgot to do this for r226308. Thanks to Eric Christopher for the reminder.
llvm-svn: 226327
Colin LeMahieu [Fri, 16 Jan 2015 21:41:57 +0000 (21:41 +0000)]
[Hexagon] Converting halfword to doubleword multiply intrinsics.
llvm-svn: 226326
Rafael Espindola [Fri, 16 Jan 2015 21:41:44 +0000 (21:41 +0000)]
Also put vtables in a comdat when rtti is disabled.
llvm-svn: 226325
Colin LeMahieu [Fri, 16 Jan 2015 21:36:34 +0000 (21:36 +0000)]
[Hexagon] Converting accumulating halfword multiply intrinsics to patterns.
llvm-svn: 226324
Eric Fiselier [Fri, 16 Jan 2015 21:35:08 +0000 (21:35 +0000)]
[libcxx] Add compiler utility class for LIT tests
Summary:
This adds a compiler utility class that handles generating compile commands and running them. Instead of having to pass the compiler path and 3 groups of flags between the configuration and the test format this allows us to just pass the compiler object.
Reviewers: danalbert, jroelofs
Reviewed By: jroelofs
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7019
llvm-svn: 226323
Eric Fiselier [Fri, 16 Jan 2015 21:22:08 +0000 (21:22 +0000)]
Add 'no_default_flags' option for turning off all default test compile and link flags.
When 'no_default_flags' is true only flags passed using '--param=compile_flags'
and '--param=link_flags' will be used when compiling the tests. This option
can be used to run the test suite against libstdc++ and helps with all
unusual test suite configurations.
NOTE: sanitizer flags are still added when '--param=use_sanitizer' is used even
if '--param=no_default_flags' is given.
llvm-svn: 226322
Rui Ueyama [Fri, 16 Jan 2015 21:11:00 +0000 (21:11 +0000)]
Remove duplication code.
llvm-svn: 226321
Nico Weber [Fri, 16 Jan 2015 21:09:43 +0000 (21:09 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 226320
Rui Ueyama [Fri, 16 Jan 2015 20:48:46 +0000 (20:48 +0000)]
[PECOFF] Remove ResolvableSymbols to simplify.
We had such class there because of InputGraph abstraction.
Previously, no one except InputGraph itself has complete picture of
input file list. In order to create a set of all defined symbols,
we had to use some indirections there to workaround InputGraph.
It can now be rewritten as simple code. No change in functionality.
llvm-svn: 226319
Colin LeMahieu [Fri, 16 Jan 2015 20:38:54 +0000 (20:38 +0000)]
[Hexagon] Beginning converting intrinsics to patterns instead of duplicated definitions. Converting halfword multiply intrinsics.
llvm-svn: 226318
Rafael Espindola [Fri, 16 Jan 2015 20:32:35 +0000 (20:32 +0000)]
Add comdat to string literal variables on COFF.
llvm-svn: 226317
Lang Hames [Fri, 16 Jan 2015 20:31:38 +0000 (20:31 +0000)]
[RuntimeDyld] Add 'stub_addr' to comment describing RuntimeDyldChecker's syntax.
llvm-svn: 226316
Colin LeMahieu [Fri, 16 Jan 2015 20:16:14 +0000 (20:16 +0000)]
[Hexagon] Fix 226309, replacement atomic store patterns didn't actually exist, added new versions.
llvm-svn: 226315