platform/upstream/llvm.git
9 years agoAddress review feedback from r215780: Use a flag insteda of the heap. No behavior...
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

9 years agoDebugInfo: Attribute aggregate expressions to the source location of the expression
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

9 years ago[PM] Update Polly for LLVM r226385 which made LoopInfo actually derive
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

9 years ago[PM] Lift the actual analyses used into the inferface rather than
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

9 years ago[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
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

9 years agoRefactor test so it's not lazily emitted on a global, simplifying ordering when more...
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

9 years agoRecommit r225083 (reverted in r225361) now that calls to aggregate initializers from...
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

9 years agoDebugInfo: Correct the debug location of non-static data member initializers
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

9 years agoRemove dead code.
Rui Ueyama [Sat, 17 Jan 2015 23:27:37 +0000 (23:27 +0000)]
Remove dead code.

llvm-svn: 226381

9 years agoUpdate comments.
Rui Ueyama [Sat, 17 Jan 2015 22:38:09 +0000 (22:38 +0000)]
Update comments.

llvm-svn: 226380

9 years ago[PM] Cleanup more warnings my refactoring exposed where now we have
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

9 years ago[PM] Remove a dead field.
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

9 years ago[msan] Fix a uninitialized-use bug in the template argument diffing
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

9 years ago[PM] Update Polly following LLVM r226373 which refactors LoopInfo in
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

9 years ago[PM] Split the LoopInfo object apart from the legacy pass, creating
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

9 years agoTry to fix the Windows build after r226362.
Nico Weber [Sat, 17 Jan 2015 06:32:54 +0000 (06:32 +0000)]
Try to fix the Windows build after r226362.

llvm-svn: 226372

9 years agoAdd tests for two more asserts that r226365 fixed according to SLi's bot.
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

9 years agoAdd a test for something that used to crash before r226365.
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

9 years ago[PowerPC] Don't list R11 as a patchpoint scratch register
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

9 years ago[sanitizer] Adjust max read size in FlagHandlerInclude
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

9 years agoProgrammersManual.rst: fix a typo
Hans Wennborg [Sat, 17 Jan 2015 03:19:21 +0000 (03:19 +0000)]
ProgrammersManual.rst: fix a typo

llvm-svn: 226367

9 years agoCommit fix for a static analyzer issue where a string pointer could theoretically...
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

9 years agoIf a function decl cannot be merged, mark it as invalid.
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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sat, 17 Jan 2015 02:27:54 +0000 (02:27 +0000)]
Wrap to 80 columns. No behavior change.

llvm-svn: 226364

9 years agoAddress review feedback from r226306. No intended behavior change.
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

9 years agoAdded Connection::GetURI()
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

9 years agoMake sure all weak destructors go in a comdat in the ms abi.
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

9 years agoImprove DAG combine pass on certain IR vector patterns
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

9 years agoClean up a string comparison with StringRef. Suggestion by David Majnemer.
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

9 years ago[RuntimeDyld] Tidy up emitCommonSymbols a little. NFC.
Lang Hames [Sat, 17 Jan 2015 00:55:05 +0000 (00:55 +0000)]
[RuntimeDyld] Tidy up emitCommonSymbols a little. NFC.

llvm-svn: 226358

9 years agoRemove std::move that was preventing return value optimization.
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

9 years agoRemove std::move that was preventing return value optimization.
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

9 years agoRegisterCoalescer: Cleanup and improved comment for a subtle detail.
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

9 years agoRegisterCoalescer: Cleanup by factoring out a common expression
Matthias Braun [Sat, 17 Jan 2015 00:33:11 +0000 (00:33 +0000)]
RegisterCoalescer: Cleanup by factoring out a common expression

llvm-svn: 226352

9 years agoRegisterCoalescer: Cleanup comment style
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

9 years agoRegisterCoalescer: Drive-by typo + whitespace fix
Matthias Braun [Sat, 17 Jan 2015 00:33:06 +0000 (00:33 +0000)]
RegisterCoalescer: Drive-by typo + whitespace fix

llvm-svn: 226350

9 years ago[RuntimeDyld] Remove the brace initialization that was introduced in r226341.
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

9 years agoAdd comments explaining the unwind setup in
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

9 years agoAdd LLVM_LINK_COMPONENTS for the shared object build
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

9 years agoChange the test case for llvm-objdump’s -archive-headers option to not check the...
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

9 years agoUpdate a comment
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

9 years agoSeveral improvements to the shush script
Enrico Granata [Fri, 16 Jan 2015 23:16:22 +0000 (23:16 +0000)]
Several improvements to the shush script

llvm-svn: 226343

9 years agoclang-format all the GC related files (NFC)
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

9 years ago[RuntimeDyld] Track symbol visibility in RuntimeDyld.
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

9 years agoAdding option -fno-inline-asm to disallow inline asm
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

9 years agoSuggest objc_method_family(none) for a property named -newFoo or similar.
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

9 years agoObjC getters with names like "newItem" should still be linked to the @property.
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

9 years agoIsolate test for PR22096 to clang.
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

9 years ago[PATCH] Speculatively instantiate archive members
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

9 years agoPE/COFF: rework how we handle base relocations
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

9 years agoFix a case where delayed typo correction should have resolved an
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

9 years agoR600: Clean up floor tests
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

9 years agoFix the Archive::Child::getRawSize() method used by llvm-objdump’s -archive-headers...
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

9 years agoRemove pathname dependence. Also rewrite test to use FileCheck
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

9 years agoA couple small changes to get LIT working with python3
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

9 years agoMove common code to base class.
Rui Ueyama [Fri, 16 Jan 2015 21:58:20 +0000 (21:58 +0000)]
Move common code to base class.

llvm-svn: 226329

9 years agoFix some copypasta typos in asserts.
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

9 years ago[Kaleidoscope] Run clang-format over chapter 4 of kaleidoscope.
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

9 years ago[Hexagon] Converting halfword to doubleword multiply intrinsics.
Colin LeMahieu [Fri, 16 Jan 2015 21:41:57 +0000 (21:41 +0000)]
[Hexagon] Converting halfword to doubleword multiply intrinsics.

llvm-svn: 226326

9 years agoAlso put vtables in a comdat when rtti is disabled.
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

9 years ago[Hexagon] Converting accumulating halfword multiply intrinsics to patterns.
Colin LeMahieu [Fri, 16 Jan 2015 21:36:34 +0000 (21:36 +0000)]
[Hexagon] Converting accumulating halfword multiply intrinsics to patterns.

llvm-svn: 226324

9 years ago[libcxx] Add compiler utility class for LIT tests
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

9 years agoAdd 'no_default_flags' option for turning off all default test compile and link flags.
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

9 years agoRemove duplication code.
Rui Ueyama [Fri, 16 Jan 2015 21:11:00 +0000 (21:11 +0000)]
Remove duplication code.

llvm-svn: 226321

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Fri, 16 Jan 2015 21:09:43 +0000 (21:09 +0000)]
Wrap to 80 columns. No behavior change.

llvm-svn: 226320

9 years ago[PECOFF] Remove ResolvableSymbols to simplify.
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

9 years ago[Hexagon] Beginning converting intrinsics to patterns instead of duplicated definitio...
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

9 years agoAdd comdat to string literal variables on COFF.
Rafael Espindola [Fri, 16 Jan 2015 20:32:35 +0000 (20:32 +0000)]
Add comdat to string literal variables on COFF.

llvm-svn: 226317

9 years ago[RuntimeDyld] Add 'stub_addr' to comment describing RuntimeDyldChecker's syntax.
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

9 years ago[Hexagon] Fix 226309, replacement atomic store patterns didn't actually exist, added...
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

9 years agollvm-readobj: add IMAGE_REL_ARM_MOV32(T) to the enumeration
Saleem Abdulrasool [Fri, 16 Jan 2015 20:16:09 +0000 (20:16 +0000)]
llvm-readobj: add IMAGE_REL_ARM_MOV32(T) to the enumeration

Add an additional based relocation to the enumeration of based relocation names.
The lack of the enumerator value causes issues when inspecting WoA binaries.

llvm-svn: 226314

9 years agoX86: fix comment typo in AsmParser
Saleem Abdulrasool [Fri, 16 Jan 2015 20:16:06 +0000 (20:16 +0000)]
X86: fix comment typo in AsmParser

Fix a typo.  NFC.

llvm-svn: 226313

9 years agoInstrProf: Optionally print an error when emitting profile data fails
Justin Bogner [Fri, 16 Jan 2015 20:10:56 +0000 (20:10 +0000)]
InstrProf: Optionally print an error when emitting profile data fails

Debugging a missing profile is a bit painful right now. We can make
people's lives a bit easier by adding a knob to enable printing a
helpful error message for such failures.

llvm-svn: 226312

9 years agoMove ownership of GCStrategy objects to LLVMContext
Philip Reames [Fri, 16 Jan 2015 20:07:33 +0000 (20:07 +0000)]
Move ownership of GCStrategy objects to LLVMContext

Note: This change ended up being slightly more controversial than expected.  Chandler has tentatively okayed this for the moment, but I may be revisiting this in the near future after we settle some high level questions.

Rather than have the GCStrategy object owned by the GCModuleInfo - which is an immutable analysis pass used mainly by gc.root - have it be owned by the LLVMContext. This simplifies the ownership logic (i.e. can you have two instances of the same strategy at once?), but more importantly, allows us to access the GCStrategy in the middle end optimizer. To this end, I add an accessor through Function which becomes the canonical way to get at a GCStrategy instance.

In the near future, this will allows me to move some of the checks from http://reviews.llvm.org/D6808 into the Verifier itself, and to introduce optimization legality predicates for some of the recent additions to InstCombine. (These will follow as separate changes.)

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

llvm-svn: 226311

9 years agoFix abort_message.cpp for the NDK.
Dan Albert [Fri, 16 Jan 2015 20:00:49 +0000 (20:00 +0000)]
Fix abort_message.cpp for the NDK.

The NDK doesn't have access to `android/set_abort_message.h`, so use
an extern declaration instead for API 21. For older releases, just use
`__assert2`, which will report to logcat and/or the tombstone for some
older releases.

llvm-svn: 226310

9 years ago[Hexagon] Removing old duplicate atomic load/store patterns.
Colin LeMahieu [Fri, 16 Jan 2015 19:53:35 +0000 (19:53 +0000)]
[Hexagon] Removing old duplicate atomic load/store patterns.

llvm-svn: 226309

9 years ago[Kaleidoscope] Fix a bug in Chapter 4 of the Kaleidoscope tutorial where repeat
Lang Hames [Fri, 16 Jan 2015 19:44:46 +0000 (19:44 +0000)]
[Kaleidoscope] Fix a bug in Chapter 4 of the Kaleidoscope tutorial where repeat
calls to functions weren't evaluated correctly.

Patch by Charlie Turner. Thanks Charlie!

llvm-svn: 226308

9 years agoSpell 0 in an enum-appropriate way. No behavior change.
Nico Weber [Fri, 16 Jan 2015 19:35:01 +0000 (19:35 +0000)]
Spell 0 in an enum-appropriate way. No behavior change.

llvm-svn: 226307

9 years agoDon't crash if a declarator in a friend decl doesn't have a name.
Nico Weber [Fri, 16 Jan 2015 19:34:13 +0000 (19:34 +0000)]
Don't crash if a declarator in a friend decl doesn't have a name.

There was already an explicit check for that for the first decl.  Move that
to a different place so that it's called for the following decls too.  Also
don't randomly set the BitfieldSize ExprResult to true (this sets a pointer to
true internally).

Found by SLi's bot.

llvm-svn: 226306

9 years agoRemove gc.root's findCustomSafePoints mechanism
Philip Reames [Fri, 16 Jan 2015 19:33:28 +0000 (19:33 +0000)]
Remove gc.root's findCustomSafePoints mechanism

Searching all of the existing gc.root implementations I'm aware of (all three of them), there was exactly one use of this mechanism, and that was to implement a performance improvement that should have been applied to the default lowering.

Having this function is requiring a dependency on a CodeGen class (MachineFunction), in a class which is otherwise completely independent of CodeGen. I could solve this differently, but given that I see absolutely no value in preserving this mechanism, I going to just get rid of it.

Note: Tis is the first time I'm intentionally breaking previously supported gc.root functionality. Given 3.6 has branched, I believe this is a good time to do this.

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

llvm-svn: 226305

9 years ago[Hexagon] Converting old patterns to new versions using classes.
Colin LeMahieu [Fri, 16 Jan 2015 19:29:59 +0000 (19:29 +0000)]
[Hexagon] Converting old patterns to new versions using classes.

llvm-svn: 226304

9 years agoAdd comdats to the RTTI variables in the microsoft abi.
Rafael Espindola [Fri, 16 Jan 2015 19:23:42 +0000 (19:23 +0000)]
Add comdats to the RTTI variables in the microsoft abi.

llvm-svn: 226303

9 years agoCheck commit access
Sumanth Gundapaneni [Fri, 16 Jan 2015 19:23:34 +0000 (19:23 +0000)]
Check commit access

llvm-svn: 226302

9 years agoCompile fix for WIN32
Vince Harron [Fri, 16 Jan 2015 19:07:30 +0000 (19:07 +0000)]
Compile fix for WIN32

llvm-svn: 226301

9 years agoAdd a utility script that executes an inferior process tucking its output away somewh...
Enrico Granata [Fri, 16 Jan 2015 18:59:54 +0000 (18:59 +0000)]
Add a utility script that executes an inferior process tucking its output away somewhere safe, and not letting error messages escape
This has potential to be useful in build automation environments

llvm-svn: 226300

9 years agoTake extra care to ensure we don't deref a NULL pointer.
Greg Clayton [Fri, 16 Jan 2015 18:59:48 +0000 (18:59 +0000)]
Take extra care to ensure we don't deref a NULL pointer.

llvm-svn: 226299

9 years ago[AVX512] Add intrinsics for masked aligned FP loads and stores
Adam Nemet [Fri, 16 Jan 2015 18:51:50 +0000 (18:51 +0000)]
[AVX512] Add intrinsics for masked aligned FP loads and stores

Part of <rdar://problem/17688758>

llvm-svn: 226298

9 years agoFix typo in r225922.
Adam Nemet [Fri, 16 Jan 2015 18:51:46 +0000 (18:51 +0000)]
Fix typo in r225922.

llvm-svn: 226297

9 years ago[AVX512] Add intrinsics for masked aligned FP loads and stores
Adam Nemet [Fri, 16 Jan 2015 18:50:09 +0000 (18:50 +0000)]
[AVX512] Add intrinsics for masked aligned FP loads and stores

Similar to the unaligned cases.

Test was generated with update_llc_test_checks.py.

Part of <rdar://problem/17688758>

llvm-svn: 226296

9 years ago[AVX512] Remove trailing whitespaces in this test
Adam Nemet [Fri, 16 Jan 2015 18:50:07 +0000 (18:50 +0000)]
[AVX512] Remove trailing whitespaces in this test

llvm-svn: 226295

9 years agoAArch64: implement AAPCS layout rules for bit-fields.
Tim Northover [Fri, 16 Jan 2015 18:44:04 +0000 (18:44 +0000)]
AArch64: implement AAPCS layout rules for bit-fields.

llvm-svn: 226294

9 years agoSplit a function for readability.
Rui Ueyama [Fri, 16 Jan 2015 17:53:55 +0000 (17:53 +0000)]
Split a function for readability.

llvm-svn: 226292

9 years agoIR: Allow 16-bits for column info
Duncan P. N. Exon Smith [Fri, 16 Jan 2015 17:33:08 +0000 (17:33 +0000)]
IR: Allow 16-bits for column info

Raise the limit for column information from 8 bits to 16 bits.

llvm-svn: 226291

9 years agoIR: Cleanup dead code, NFC
Duncan P. N. Exon Smith [Fri, 16 Jan 2015 17:31:29 +0000 (17:31 +0000)]
IR: Cleanup dead code, NFC

Line/column fixups already exist in `MDLocation`.  Delete the duplicated
logic in `DebugLoc`.

llvm-svn: 226290

9 years ago[Hexagon] Updating call/jump instruction patterns.
Colin LeMahieu [Fri, 16 Jan 2015 17:05:27 +0000 (17:05 +0000)]
[Hexagon] Updating call/jump instruction patterns.

llvm-svn: 226288

9 years agoSimplify. No functionality change.
Rui Ueyama [Fri, 16 Jan 2015 16:58:58 +0000 (16:58 +0000)]
Simplify. No functionality change.

llvm-svn: 226287

9 years agoAdd comdats to dynamic init functions in the microsoft abi.
Rafael Espindola [Fri, 16 Jan 2015 16:04:45 +0000 (16:04 +0000)]
Add comdats to dynamic init functions in the microsoft abi.

llvm-svn: 226286

9 years agoMake this test a bit stricter. NFC.
Rafael Espindola [Fri, 16 Jan 2015 16:02:03 +0000 (16:02 +0000)]
Make this test a bit stricter. NFC.

llvm-svn: 226285

9 years ago[PECOFF] Improve parallelism.
Rui Ueyama [Fri, 16 Jan 2015 15:58:36 +0000 (15:58 +0000)]
[PECOFF] Improve parallelism.

llvm-svn: 226284

9 years agofew fixes for ittnotify iterface (used by Intel(R) VTune Amplifier)
Andrey Churbanov [Fri, 16 Jan 2015 15:58:03 +0000 (15:58 +0000)]
few fixes for ittnotify iterface (used by Intel(R) VTune Amplifier)

llvm-svn: 226283