platform/upstream/llvm.git
9 years ago[asan] Add a comment explaining why non-instrumented allocas are moved.
Kuba Brecka [Fri, 17 Jul 2015 19:20:21 +0000 (19:20 +0000)]
[asan] Add a comment explaining why non-instrumented allocas are moved.

Addition to r242510.

llvm-svn: 242561

9 years agofreeaddrinfo(NULL) segfaults on Android.
Chaoren Lin [Fri, 17 Jul 2015 19:12:33 +0000 (19:12 +0000)]
freeaddrinfo(NULL) segfaults on Android.

Reviewers: tberghammer

Subscribers: tberghammer, danalbert, lldb-commits

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

llvm-svn: 242560

9 years agoTeach the NSString data formatter to handle embedded NULs in short ASCII strings
Enrico Granata [Fri, 17 Jul 2015 19:06:39 +0000 (19:06 +0000)]
Teach the NSString data formatter to handle embedded NULs in short ASCII strings

llvm-svn: 242559

9 years agoMergeFuncs: Transfer the function parameter attributes to the call site
Arnold Schwaighofer [Fri, 17 Jul 2015 18:59:08 +0000 (18:59 +0000)]
MergeFuncs: Transfer the function parameter attributes to the call site

rdar://21516488

llvm-svn: 242558

9 years agoStart adding documentation for llvm-lib.
Rafael Espindola [Fri, 17 Jul 2015 18:49:26 +0000 (18:49 +0000)]
Start adding documentation for llvm-lib.

llvm-svn: 242557

9 years agoImprove the NSString data formatter so that explicitly-lengthed Unicode strings print...
Enrico Granata [Fri, 17 Jul 2015 18:22:51 +0000 (18:22 +0000)]
Improve the NSString data formatter so that explicitly-lengthed Unicode strings print embedded NULs correctly

llvm-svn: 242555

9 years agoFix alignment issues in Clang.
James Y Knight [Fri, 17 Jul 2015 18:21:37 +0000 (18:21 +0000)]
Fix alignment issues in Clang.

Some const-correctness changes snuck in here too, since they were in the
area of code I was modifying.

This seems to make Clang actually work without Bus Error on
32bit-sparc.

Follow-up patches will factor out a trailing-object helper class, to
make classes using the idiom of appending objects to other objects
easier to understand, and to ensure (with static_assert) that required
alignment guarantees continue to hold.

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

llvm-svn: 242554

9 years agoRevert "ARM: Enable MachineScheduler and disable PostRAScheduler for swift."
Adam Nemet [Fri, 17 Jul 2015 18:14:19 +0000 (18:14 +0000)]
Revert "ARM: Enable MachineScheduler and disable PostRAScheduler for swift."

This reverts commit r242500.

It broke some internal tests and Matthias asked me to revert it while he
is investigating.

llvm-svn: 242553

9 years agoSplit the portion of the data-formatter-objc test case that deals with NSString into...
Enrico Granata [Fri, 17 Jul 2015 17:54:39 +0000 (17:54 +0000)]
Split the portion of the data-formatter-objc test case that deals with NSString into its own separate test case

llvm-svn: 242552

9 years agoUse llvm_unreachable() instead of report_fatal_error() if the machine model is incomplete
Matthias Braun [Fri, 17 Jul 2015 17:50:11 +0000 (17:50 +0000)]
Use llvm_unreachable() instead of report_fatal_error() if the machine model is incomplete

This error is for developers only so it makes sense to abort and get a
backtrace.

llvm-svn: 242551

9 years ago[OCaml] Do not use -warn-error in tests.
Peter Zotov [Fri, 17 Jul 2015 17:33:23 +0000 (17:33 +0000)]
[OCaml] Do not use -warn-error in tests.

This -warn-error flag invariably gets into release tarballs
and breaks builds on distributions that run tests as a part
of release process. The OCaml binding tests are especially
critical, since they often expose lingering toolchain bugs,
and so it is replaced with -w +A (equivalent to -Wall).

llvm-svn: 242550

9 years ago[ARM] Use [SU]ABSDIFF nodes instead of intrinsics for VABD/VABA
James Molloy [Fri, 17 Jul 2015 17:10:55 +0000 (17:10 +0000)]
[ARM] Use [SU]ABSDIFF nodes instead of intrinsics for VABD/VABA

No functional change, but it preps codegen for the future when SABSDIFF
will start getting generated in anger.

llvm-svn: 242546

9 years ago[AArch64] Use [SU]ABSDIFF nodes instead of intrinsics for ABD/ABA
James Molloy [Fri, 17 Jul 2015 17:10:45 +0000 (17:10 +0000)]
[AArch64] Use [SU]ABSDIFF nodes instead of intrinsics for ABD/ABA

No functional change, but it preps codegen for the future when SABSDIFF
will start getting generated in anger.

llvm-svn: 242545

9 years agoAdd libunwind to the release scripts
Hans Wennborg [Fri, 17 Jul 2015 16:49:59 +0000 (16:49 +0000)]
Add libunwind to the release scripts

llvm-svn: 242543

9 years agoUse inbounds GEPs for memcpy and memset lowering
Eli Bendersky [Fri, 17 Jul 2015 16:42:33 +0000 (16:42 +0000)]
Use inbounds GEPs for memcpy and memset lowering

Follow-up on discussion in http://reviews.llvm.org/D11220

llvm-svn: 242542

9 years agoBump libc++ version # to 3.8
Marshall Clow [Fri, 17 Jul 2015 16:36:44 +0000 (16:36 +0000)]
Bump libc++ version # to 3.8

llvm-svn: 242541

9 years agoAdd missing chkstk.S files from r242539
Reid Kleckner [Fri, 17 Jul 2015 16:31:59 +0000 (16:31 +0000)]
Add missing chkstk.S files from r242539

llvm-svn: 242540

9 years agocompiler-rt: add support for mingw-w64 in builtins
Reid Kleckner [Fri, 17 Jul 2015 16:23:05 +0000 (16:23 +0000)]
compiler-rt: add support for mingw-w64 in builtins

The is so that we can avoid using libgcc and use compiler-rt with
mingw-w64.

Related driver patch
http://reviews.llvm.org/D11077

I have tested this with mingw-w64 and everything seems to be in order.
I also sent this patch to the mingw-w64 mailing list for them to look at.

Patch by Martell Malone.

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

llvm-svn: 242539

9 years ago[msan] Fix open_memstream handling.
Evgeniy Stepanov [Fri, 17 Jul 2015 16:10:37 +0000 (16:10 +0000)]
[msan] Fix open_memstream handling.

For open_memstream() files, buffer pointer is only valid immediately after
fflush() or fclose(). Fix the fclose() interceptor to unpoison after the
REAL(fclose) call, not before it.

llvm-svn: 242535

9 years ago[ASTMatchers] Use provided target NodeKind instead of inferring it from the matchers.
Samuel Benzaquen [Fri, 17 Jul 2015 16:05:27 +0000 (16:05 +0000)]
[ASTMatchers] Use provided target NodeKind instead of inferring it from the matchers.

Individual matchers might not be convertible to each other's kind, but
they might still all be convertible to the target kind.
All the callers already know the target kind, so just pass it down.

llvm-svn: 242534

9 years agoAdd support for producing thin archives in llvm-lib.
Rafael Espindola [Fri, 17 Jul 2015 16:01:11 +0000 (16:01 +0000)]
Add support for producing thin archives in llvm-lib.

I will send an entry in docs/CommandGuide for review today.

llvm-svn: 242533

9 years agoStandalone cmake build improvements (bug #23889)
Pavel Labath [Fri, 17 Jul 2015 15:50:48 +0000 (15:50 +0000)]
Standalone cmake build improvements (bug #23889)

patch by Eugene Zelenko.

llvm-svn: 242529

9 years agoEdited the CPUNames table of TargetParser
Alexandros Lamprineas [Fri, 17 Jul 2015 15:49:32 +0000 (15:49 +0000)]
Edited the CPUNames table of TargetParser
- Changed the default FPU of cortex-m4.
- Removed "cortex-m4f" entry. Currently not supported.

Change-Id: I73121e358aa9e7ba68eb001c2143df390ff2352a
Phabricator: http://reviews.llvm.org/D11100
llvm-svn: 242528

9 years agoFix liblldb linking on RHEL 6 (bug #24140)
Pavel Labath [Fri, 17 Jul 2015 15:26:27 +0000 (15:26 +0000)]
Fix liblldb linking on RHEL 6 (bug #24140)

Patch by Eugene Zelenko.

llvm-svn: 242525

9 years agoGPURuntimeDebugPrinter: Printer pointer values (except if they are strings)
Tobias Grosser [Fri, 17 Jul 2015 13:57:57 +0000 (13:57 +0000)]
GPURuntimeDebugPrinter: Printer pointer values (except if they are strings)

Only pointer values in constant address space are assumed to be strings. For
all other pointers their address is printed.

llvm-svn: 242524

9 years agoR600: Add macro defs for all supported OpenCL extensions
Tom Stellard [Fri, 17 Jul 2015 13:16:52 +0000 (13:16 +0000)]
R600: Add macro defs for all supported OpenCL extensions

llvm-svn: 242523

9 years ago[Mips] Set mips64r6 as default CPU for MIPS64 Android
Petar Jovanovic [Fri, 17 Jul 2015 12:57:30 +0000 (12:57 +0000)]
[Mips] Set mips64r6 as default CPU for MIPS64 Android

Change default CPU for MIPS64 Android. Now it is mips64r6.

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

llvm-svn: 242522

9 years agoChanged "pragma" -> "#pragma" in a comment, NFC.
Andrey Bokhanko [Fri, 17 Jul 2015 12:25:21 +0000 (12:25 +0000)]
Changed "pragma" -> "#pragma" in a comment, NFC.

llvm-svn: 242521

9 years agoMake global aliases have symbol size equal to their type
John Brawn [Fri, 17 Jul 2015 12:12:03 +0000 (12:12 +0000)]
Make global aliases have symbol size equal to their type

This is mainly for the benefit of GlobalMerge, so that an alias into a
MergedGlobals variable has the same size as the original non-merged
variable.

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

llvm-svn: 242520

9 years agoImprove conditional opcode handling in emulation based unwinding
Tamas Berghammer [Fri, 17 Jul 2015 11:44:14 +0000 (11:44 +0000)]
Improve conditional opcode handling in emulation based unwinding

Don't chane the CFI information when a conditional instruction
is emulated (eg.: popeq {r0, pc}) because the CFI for the next
instruction should be the same as the CFI for the current instruction.

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

llvm-svn: 242519

9 years agotest-release.sh: Add ability to do a test build using the trunk or branches.
Daniel Sanders [Fri, 17 Jul 2015 10:40:40 +0000 (10:40 +0000)]
test-release.sh: Add ability to do a test build using the trunk or branches.

Summary:
Adds '--svn-path BRANCH' that causes the script to export the specified path
from each project. Otherwise the tag specified by -release, -rc, etc. will be
used. The version portion of the package name will be 'test-$path' (any forward
slashes in the branch name are replaced with underscores), for example:
  -svn-path trunk => clang+llvm-test-trunk-mips-linux-gnu.tar.xz
  -svn-path branches/release_35 => clang+llvm-test-branches_release_35-mips-linux-gnu.tar.xz

This is primarily useful for bringing new release packages up to standard
without needing to create and maintain a tag for the purpose.

Reviewers: tstellarAMD, hans

Subscribers: llvm-commits

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

llvm-svn: 242518

9 years ago[LLGS] Limit jThreadsInfo to only the most important registers for now
Pavel Labath [Fri, 17 Jul 2015 10:27:42 +0000 (10:27 +0000)]
[LLGS] Limit jThreadsInfo to only the most important registers for now

Summary:
It seems that reading of register data is the biggest bottleneck in LLGS at the moment. Sending
four registers instead of the full GPR set increases the jThreadsInfo processing time about
6-fold. Until we figure out where is this time going, this commit limits the amount of data we
send to provide a more fluid debugging experience.

Reviewers: tberghammer, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 242517

9 years agoFix android build after r242514
Tamas Berghammer [Fri, 17 Jul 2015 10:16:11 +0000 (10:16 +0000)]
Fix android build after r242514

On android std::to_string isn't supported. Replace it with
llvm::utostr.

llvm-svn: 242516

9 years ago[MainLoop] Fix assertion failure
Pavel Labath [Fri, 17 Jul 2015 10:08:38 +0000 (10:08 +0000)]
[MainLoop] Fix assertion failure

Upon connection termination the waitable handle of an IOObject gets reset to an invalid handle.
This caused a problem since we used the object->GetWaitableHandle as a key to the set of
registered events. The fix is to use something more immutable as a key: we make a copy of the
original waitable handle, instead of holding onto the IOObject.

llvm-svn: 242515

9 years ago-Refactored ARMTargetInfo in order to use the API of TargetParser
Alexandros Lamprineas [Fri, 17 Jul 2015 09:08:37 +0000 (09:08 +0000)]
-Refactored ARMTargetInfo in order to use the API of TargetParser
 for extracting target specific information.
-Patches commit r241343: case 'armv7l' was unhandled in
 ARMTargetInfo::getCPUAttr(), and thus it was returning invalid
 characters for macro definition.

Change-Id: I1a0972e5ff5529cd17376c6562047bab8b4da32c
Phabricator: http://reviews.llvm.org/D10839
llvm-svn: 242514

9 years ago[llgo] cmd/gllgo: handle/ignore more flags
Andrew Wilkins [Fri, 17 Jul 2015 08:15:01 +0000 (08:15 +0000)]
[llgo] cmd/gllgo: handle/ignore more flags

Summary:
This diff is to support Debian packaging,
which sets various hardening-rleated flags
in CFLAGS. They don't make sense for Go,
so we just ignore them.

Reviewers: pcc

Subscribers: llvm-commits, axw

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

llvm-svn: 242513

9 years ago[PM/AA] Disable the core unsafe aspect of GlobalsModRef in the face of
Chandler Carruth [Fri, 17 Jul 2015 06:58:24 +0000 (06:58 +0000)]
[PM/AA] Disable the core unsafe aspect of GlobalsModRef in the face of
basic changes to the IR such as folding pointers through PHIs, Selects,
integer casts, store/load pairs, or outlining.

This leaves the feature available behind a flag. This flag's default
could be flipped if necessary, but the real-world performance impact of
this particular feature of GMR may not be sufficiently significant for
many folks to want to run the risk.

Currently, the risk here is somewhat mitigated by half-hearted attempts
to update GlobalsModRef when the rest of the optimizer changes
something. However, I am currently trying to remove that update
mechanism as it makes migrating the AA infrastructure to a form that can
be readily shared between new and old pass managers very challenging.
Without this update mechanism, it is possible that this still unlikely
failure mode will start to trip people, and so I wanted to try to
proactively avoid that.

There is a lengthy discussion on the mailing list about why the core
approach here is flawed, and likely would need to look totally different
to be both reasonably effective and resilient to basic IR changes
occuring. This patch is essentially the first of two which will enact
the result of that discussion. The next patch will remove the current
update mechanism.

Thanks to lots of folks that helped look at this from different angles.
Especial thanks to Michael Zolotukhin for doing some very prelimanary
benchmarking of LTO without GlobalsModRef to get a rough idea of the
impact we could be facing here. So far, it looks very small, but there
are some concerns lingering from other benchmarking. The default here
may get flipped if performance results end up pointing at this as a more
significant issue.

Also thanks to Pete and Gerolf for reviewing!

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

llvm-svn: 242512

9 years ago[OCaml] Use a nicer style for documentation than OCaml default.
Peter Zotov [Fri, 17 Jul 2015 06:37:59 +0000 (06:37 +0000)]
[OCaml] Use a nicer style for documentation than OCaml default.

In particular, it's much easier to read, as it doesn't expand all
the way on wide-screen displays.

CSS committed under LLVM license with explicit permission from
Daniel Bünzli <daniel.buenzli@erratique.ch>.

llvm-svn: 242511

9 years ago[asan] Fix invalid debug info for promotable allocas
Kuba Brecka [Fri, 17 Jul 2015 06:29:57 +0000 (06:29 +0000)]
[asan] Fix invalid debug info for promotable allocas

Since r230724 ("Skip promotable allocas to improve performance at -O0"), there is a regression in the generated debug info for those non-instrumented variables. When inspecting such a variable's value in LLDB, you often get garbage instead of the actual value. ASan instrumentation is inserted before the creation of the non-instrumented alloca. The only allocas that are considered standard stack variables are the ones declared in the first basic-block, but the initial instrumentation setup in the function breaks that invariant.

This patch makes sure uninstrumented allocas stay in the first BB.

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

llvm-svn: 242510

9 years ago[llvm-cxxdump] Don't rely on global state
Davide Italiano [Fri, 17 Jul 2015 06:18:36 +0000 (06:18 +0000)]
[llvm-cxxdump] Don't rely on global state

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

llvm-svn: 242509

9 years ago[CodeGen, X86] Classify vectors <= 32 bits as INTEGER
David Majnemer [Fri, 17 Jul 2015 05:49:13 +0000 (05:49 +0000)]
[CodeGen, X86] Classify vectors <= 32 bits as INTEGER

We shouldn't crash despite the AMD64 ABI not giving clear guidance as to
how to pass around vector types <= 32 bits.  Instead, classify such
vectors as INTEGER to be compatible with GCC.

This fixes PR24162.

llvm-svn: 242508

9 years agoTests for "Disabling of "redefine_extname" pragma for C++ code"
Alexey Bataev [Fri, 17 Jul 2015 04:21:51 +0000 (04:21 +0000)]
Tests for "Disabling of "redefine_extname" pragma for C++ code"

In response to Richard Smith's comment (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150622/131782.html), this patch disables "redefine_extname" pragma for C++ code. Also, I added a test that this pragma doesn't apply to static declarations.
Differential Revision: http://reviews.llvm.org/D10805

llvm-svn: 242507

9 years agoclang: s/PCHContainerOps/PCHContainerRdr/ in \param(s), introduced in r242499. [...
NAKAMURA Takumi [Fri, 17 Jul 2015 04:16:02 +0000 (04:16 +0000)]
clang: s/PCHContainerOps/PCHContainerRdr/ in \param(s), introduced in r242499. [-Wdocumentation]

llvm-svn: 242506

9 years agoFix clang-fuzzer build after r242499.
Adrian Prantl [Fri, 17 Jul 2015 04:07:47 +0000 (04:07 +0000)]
Fix clang-fuzzer build after r242499.

llvm-svn: 242505

9 years agoDriver: Determine file names for crash reports more reliably
Justin Bogner [Fri, 17 Jul 2015 03:35:54 +0000 (03:35 +0000)]
Driver: Determine file names for crash reports more reliably

Guessing which file name to replace based on the -main-file-name
argument to -cc1 is flawed. Instead, keep track of which arguments are
inputs to each command.

llvm-svn: 242504

9 years agoAArch64: add comment missed out from earlier patch.
Tim Northover [Fri, 17 Jul 2015 03:31:50 +0000 (03:31 +0000)]
AArch64: add comment missed out from earlier patch.

Helps explain some of the background behind this bit of code.

llvm-svn: 242503

9 years agoTeach the std::wstring data formatter how to properly display strings with embedded...
Enrico Granata [Fri, 17 Jul 2015 01:56:25 +0000 (01:56 +0000)]
Teach the std::wstring data formatter how to properly display strings with embedded NUL bytes

llvm-svn: 242501

9 years agoARM: Enable MachineScheduler and disable PostRAScheduler for swift.
Matthias Braun [Fri, 17 Jul 2015 01:44:31 +0000 (01:44 +0000)]
ARM: Enable MachineScheduler and disable PostRAScheduler for swift.

This is mostly done to disable the PostRAScheduler which optimizes for
instruction latencies which isn't a good fit for out-of-order
architectures. This also allows to leave out the itinerary table in
swift in favor of the SchedModel ones.

This change leads to performance improvements/regressions by as much as
10% in some benchmarks, in fact we loose 0.4% performance over the
llvm-testsuite for reasons that appear to be unknown or out of the
compilers control. rdar://20803802 documents the investigation of
these effects.

While it is probably a good idea to perform the same switch for the
other ARM out-of-order CPUs, I limited this change to swift as I cannot
perform the benchmark verification on the other CPUs.

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

llvm-svn: 242500

9 years agoMake the clang module container format selectable from the command line.
Adrian Prantl [Fri, 17 Jul 2015 01:19:54 +0000 (01:19 +0000)]
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj]
  with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
  a PCHContainerReader.

Thanks to Richard Smith for reviewing this patch!

llvm-svn: 242499

9 years agoOnly do fmul (fadd x, x), c combine if the fadd only has one use
Matt Arsenault [Fri, 17 Jul 2015 01:14:35 +0000 (01:14 +0000)]
Only do fmul (fadd x, x), c combine if the fadd only has one use

This was increasing the instruction count if the fadd has multiple uses.

llvm-svn: 242498

9 years agoAdd StringPrinter support for printing a std::string with embedded NUL bytes
Enrico Granata [Fri, 17 Jul 2015 01:03:59 +0000 (01:03 +0000)]
Add StringPrinter support for printing a std::string with embedded NUL bytes

llvm-svn: 242496

9 years agoUse small encodings for constants when possible.
Rafael Espindola [Fri, 17 Jul 2015 00:57:52 +0000 (00:57 +0000)]
Use small encodings for constants when possible.

llvm-svn: 242493

9 years ago__builtin_setjmp/__builtin_longjmp is support on ARM now
Matthias Braun [Fri, 17 Jul 2015 00:46:27 +0000 (00:46 +0000)]
__builtin_setjmp/__builtin_longjmp is support on ARM now

llvm-svn: 242492

9 years agoMIR Serialization: Serialize the frame setup machine instruction flag.
Alex Lorenz [Fri, 17 Jul 2015 00:24:15 +0000 (00:24 +0000)]
MIR Serialization: Serialize the frame setup machine instruction flag.

llvm-svn: 242491

9 years agoAllow gdbremote.py to take input from STDIN and handle "c" and "s" packets.
Greg Clayton [Fri, 17 Jul 2015 00:19:31 +0000 (00:19 +0000)]
Allow gdbremote.py to take input from STDIN and handle "c" and "s" packets.

llvm-svn: 242490

9 years agoAllow __builtin_setjmp/__builtin_longjmp on ARM
Matthias Braun [Fri, 17 Jul 2015 00:15:22 +0000 (00:15 +0000)]
Allow __builtin_setjmp/__builtin_longjmp on ARM

The problems in the llvm target got fixed in r242481 and r242482.

Related to rdar://20544153, rdar://20660786

llvm-svn: 242489

9 years agoRe-landing r242318 after buildbot update.
Chaoren Lin [Thu, 16 Jul 2015 23:45:08 +0000 (23:45 +0000)]
Re-landing r242318 after buildbot update.

llvm-svn: 242488

9 years agoMIR Serialization: Serialize the frame index machine operands.
Alex Lorenz [Thu, 16 Jul 2015 23:37:45 +0000 (23:37 +0000)]
MIR Serialization: Serialize the frame index machine operands.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242487

9 years agoAdd new constructors for LoopInfo/DominatorTree/BFI/BPI
Cong Hou [Thu, 16 Jul 2015 23:23:35 +0000 (23:23 +0000)]
Add new constructors for LoopInfo/DominatorTree/BFI/BPI

Those new constructors make it more natural to construct an object for a function. For example, previously to build a LoopInfo for a function, we need four statements:

DominatorTree DT;
LoopInfo LI;
DT.recalculate(F);
LI.analyze(DT);

Now we only need one statement:

LoopInfo LI(DominatorTree(F));

http://reviews.llvm.org/D11274

llvm-svn: 242486

9 years agoDoxygen: Enable autobrief feature, matching llvm config/coding standards.
James Dennett [Thu, 16 Jul 2015 23:17:43 +0000 (23:17 +0000)]
Doxygen: Enable autobrief feature, matching llvm config/coding standards.

Summary: This corresponds to the change made in r237417 - "Doxygen: Enable autobrief feature and update coding standards."

Reviewers: eliben

Subscribers: eliben, cfe-commits

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

llvm-svn: 242485

9 years agoclang-format: Respect IndentWrappedFunctionNames when aligning colons
Daniel Jasper [Thu, 16 Jul 2015 22:58:24 +0000 (22:58 +0000)]
clang-format: Respect IndentWrappedFunctionNames when aligning colons

Before:
  - (void)shortf:(GTMFoo *)theFoo
  dontAlignNamef:(NSRect)theRect {
  }

After:
  - (void)shortf:(GTMFoo *)theFoo
      dontAlignNamef:(NSRect)theRect {
  }

Patch by Kwasi Mensah, thank you!

llvm-svn: 242484

9 years ago[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl
Davide Italiano [Thu, 16 Jul 2015 22:37:54 +0000 (22:37 +0000)]
[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl

This (hopefully) brings more clarity. No functional changes (intended).

llvm-svn: 242483

9 years agoArm: Don't define a label twice with two setjmps in a function.
Matthias Braun [Thu, 16 Jul 2015 22:34:20 +0000 (22:34 +0000)]
Arm: Don't define a label twice with two setjmps in a function.

Constructing a name based on the function name didn't give us a unique
symbol if we had more than one setjmp in a function. Using
MCContext::createTempSymbol() always gives us a unique name.

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

llvm-svn: 242482

9 years agoFix __builtin_setjmp in combination with sjlj exception handling.
Matthias Braun [Thu, 16 Jul 2015 22:34:16 +0000 (22:34 +0000)]
Fix __builtin_setjmp in combination with sjlj exception handling.

llvm.eh.sjlj.setjmp was used as part of the SjLj exception handling
style but is also used in clang to implement __builtin_setjmp.  The ARM
backend needs to output additional dispatch tables for the SjLj
exception handling style, these tables however can't be emitted if
llvm.eh.sjlj.setjmp is simply used for __builtin_setjmp and no actual
landing pad blocks exist.

To solve this issue a new llvm.eh.sjlj.setup_dispatch intrinsic is
introduced which is used instead of llvm.eh.sjlj.setjmp in the SjLj
exception handling lowering, so we can differentiate between the case
where we actually need to setup a dispatch table and the case where we
just need the __builtin_setjmp semantic.

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

llvm-svn: 242481

9 years agoAdd __has_feature(attribute_availability_with_version_underscores).
Jordan Rose [Thu, 16 Jul 2015 22:30:10 +0000 (22:30 +0000)]
Add __has_feature(attribute_availability_with_version_underscores).

This goes with r218884 from, um, last autumn.

rdar://problem/21754114

llvm-svn: 242480

9 years agoXfail pexpect tests for Windows hosts.
Chaoren Lin [Thu, 16 Jul 2015 22:24:16 +0000 (22:24 +0000)]
Xfail pexpect tests for Windows hosts.

llvm-svn: 242457

9 years agoFix ffiInvoke() use of DataLayout, broken in 242414
Mehdi Amini [Thu, 16 Jul 2015 22:23:09 +0000 (22:23 +0000)]
Fix ffiInvoke() use of DataLayout, broken in 242414

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242456

9 years agoInclude what we use, instead of letting them get pulled in implictly. This makes...
Marshall Clow [Thu, 16 Jul 2015 22:13:26 +0000 (22:13 +0000)]
Include what we use, instead of letting them get pulled in implictly. This makes the tests work on VS. Thanks to STL for the report

llvm-svn: 242454

9 years agoAdd missing REQUIRES to this test.
Sean Silva [Thu, 16 Jul 2015 22:12:44 +0000 (22:12 +0000)]
Add missing REQUIRES to this test.

An internal builder was failing.

llvm-svn: 242452

9 years ago[SCEV][NFC] Use triple-slash (///) for comment.
Sanjoy Das [Thu, 16 Jul 2015 22:08:37 +0000 (22:08 +0000)]
[SCEV][NFC] Use triple-slash (///) for comment.

Makes the comments for proveNoWrapByVaryingStart consistent with the
rest of ScalarEvolution.h

llvm-svn: 242451

9 years agoDocumentation cleanup. No functional change intended.
James Dennett [Thu, 16 Jul 2015 22:06:34 +0000 (22:06 +0000)]
Documentation cleanup.  No functional change intended.

llvm-svn: 242450

9 years ago[ASan] PR24150: restrict test case to i386.
Alexey Samsonov [Thu, 16 Jul 2015 21:46:58 +0000 (21:46 +0000)]
[ASan] PR24150: restrict test case to i386.

llvm-svn: 242449

9 years agoFix spelling. NFCI.
Simon Pilgrim [Thu, 16 Jul 2015 21:44:53 +0000 (21:44 +0000)]
Fix spelling. NFCI.

llvm-svn: 242448

9 years agoAArch64: make inexact signalling on round Darwin-specific
Tim Northover [Thu, 16 Jul 2015 21:30:21 +0000 (21:30 +0000)]
AArch64: make inexact signalling on round Darwin-specific

C11 leaves the choice on whether round-to-integer operations set the inexact
flag implementation-defined. Darwin does expect it to be set, but this seems to
be against the intent of the IEEE document and slower to implement anyway. So
it should be opt-in.

llvm-svn: 242446

9 years ago[CMake] One more attempt to fix PR24144.
Alexey Samsonov [Thu, 16 Jul 2015 21:20:05 +0000 (21:20 +0000)]
[CMake] One more attempt to fix PR24144.

This time, exclude ExternalProject from build using set_target_properties.

llvm-svn: 242444

9 years ago[X86][SSE] Added nounwind attribute to vector shift tests.
Simon Pilgrim [Thu, 16 Jul 2015 21:14:26 +0000 (21:14 +0000)]
[X86][SSE] Added nounwind attribute to vector shift tests.

Stop i686 codegen from generating cfi directives.

llvm-svn: 242443

9 years ago[PowerPC] v4i32 is a VSRCRegClass
Bill Schmidt [Thu, 16 Jul 2015 21:14:07 +0000 (21:14 +0000)]
[PowerPC] v4i32 is a VSRCRegClass

I was looking at some vector code generation and kept seeing
unnecessary vector copies into the Altivec half of the VSX registers.
I discovered that we overlooked v4i32 when adding the register classes
for VSX; we only added v4f32 and v2f64.  This means that anything that
canonicalizes into v4i32 (which is a LOT of stuff) ends up being
forced into VRRC on its way to VSRC.

The fix is one line.  The rest of the patch is fixing up some test
cases whose code generation has changed as a result.

This seems like it would be a good candidate for backport to 3.7.

llvm-svn: 242442

9 years agoList supported architectures for StackMap section and related intrinsics
Philip Reames [Thu, 16 Jul 2015 21:10:46 +0000 (21:10 +0000)]
List supported architectures for StackMap section and related intrinsics

Not having this documented led to some confusion in a recent review thread.

llvm-svn: 242441

9 years ago[X86][SSE] Updated vector conversion test names.
Simon Pilgrim [Thu, 16 Jul 2015 21:00:57 +0000 (21:00 +0000)]
[X86][SSE] Updated vector conversion test names.

I'll be adding further tests shortly so need a more thorough naming convention.

llvm-svn: 242440

9 years agoStreamline the coding style in NVPTXLowerAggrCopies
Eli Bendersky [Thu, 16 Jul 2015 20:42:38 +0000 (20:42 +0000)]
Streamline the coding style in NVPTXLowerAggrCopies

Make the style consistent with LLVM style throughout and clang-format.

llvm-svn: 242439

9 years agoMachineInstr: Explain the subtle semantics of uses()/defs()
Matthias Braun [Thu, 16 Jul 2015 20:27:01 +0000 (20:27 +0000)]
MachineInstr: Explain the subtle semantics of uses()/defs()

llvm-svn: 242438

9 years ago[NVPTX] enable SpeculativeExecution in NVPTX
Jingyue Wu [Thu, 16 Jul 2015 20:13:48 +0000 (20:13 +0000)]
[NVPTX] enable SpeculativeExecution in NVPTX

Summary:
SpeculativeExecution enables a series straight line optimizations (such
as SLSR and NaryReassociate) on conditional code. For example,

  if (...)
    ... b * s ...
  if (...)
    ... (b + 1) * s ...

speculative execution can hoist b * s and (b + 1) * s from then-blocks,
so that we have

  ... b * s ...
  if (...)
    ...
  ... (b + 1) * s ...
  if (...)
    ...

Then, SLSR can rewrite (b + 1) * s to (b * s + s) because after
speculative execution b * s dominates (b + 1) * s.

The performance impact of this change is significant. It speeds up the
benchmarks running EigenFloatContractionKernelInternal16x16
(https://bitbucket.org/eigen/eigen/src/ba68f42fa69e4f43417fe1e52669d4dd5d2b3bee/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h?at=default#cl-526)
by roughly 2%. Some internal benchmarks that have the above code pattern
are improved by up to 40%. No significant slowdowns are observed on
Eigen CUDA microbenchmarks.

Reviewers: jholewinski, broune, eliben

Subscribers: llvm-commits, jholewinski

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

llvm-svn: 242437

9 years agoAArch64: Implement conditional compare sequence matching.
Matthias Braun [Thu, 16 Jul 2015 20:02:37 +0000 (20:02 +0000)]
AArch64: Implement conditional compare sequence matching.

This is a new iteration of the reverted r238793 /
http://reviews.llvm.org/D8232 which wrongly assumed that any and/or
trees can be represented by conditional compare sequences, however there
are some restrictions to that. This version fixes this and adds comments
that explain exactly what types of and/or trees can actually be
implemented as conditional compare sequences.

Related to http://llvm.org/PR20927, rdar://18326194

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

llvm-svn: 242436

9 years agoMake sure we calculate resolver symbol addresses correctly for ARM. The trie entries...
Greg Clayton [Thu, 16 Jul 2015 19:50:57 +0000 (19:50 +0000)]
Make sure we calculate resolver symbol addresses correctly for ARM. The trie entries have bit 0 set for Thumb functions and we need to remove that so we can correctly determine which symbols are resolvers.

<rdar://problem/21396553>

llvm-svn: 242435

9 years agoAMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand
Tom Stellard [Thu, 16 Jul 2015 19:40:09 +0000 (19:40 +0000)]
AMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 242434

9 years agoAMDPGU/SI: Use AssertZext node to mask high bit for scratch offsets
Tom Stellard [Thu, 16 Jul 2015 19:40:07 +0000 (19:40 +0000)]
AMDPGU/SI: Use AssertZext node to mask high bit for scratch offsets

Summary:
We can safely assume that the high bit of scratch offsets will never
be set, because this would require at least 128 GB of GPU memory.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 242433

9 years ago[SemaType] Use a range loop.
Davide Italiano [Thu, 16 Jul 2015 19:31:40 +0000 (19:31 +0000)]
[SemaType] Use a range loop.

llvm-svn: 242432

9 years agoLiveInterval: Document and enforce rules about empty subranges.
Matthias Braun [Thu, 16 Jul 2015 18:55:35 +0000 (18:55 +0000)]
LiveInterval: Document and enforce rules about empty subranges.

Empty subranges are not allowed in a LiveInterval and must be removed
instead: Check this in the verifiers, put a reminder for this in the
comment of the shrinkToUses variant for a single lane and make it
automatic for the shrinkToUses variant for a LiveInterval.

llvm-svn: 242431

9 years agoDo not duplicate method name in comment, remove duplicate comment
Matthias Braun [Thu, 16 Jul 2015 18:55:32 +0000 (18:55 +0000)]
Do not duplicate method name in comment, remove duplicate comment

llvm-svn: 242430

9 years agoDelete an unused function.
Rafael Espindola [Thu, 16 Jul 2015 18:41:41 +0000 (18:41 +0000)]
Delete an unused function.

Patch by Xan López!

llvm-svn: 242429

9 years agoRevert "Add missing load/store flags to thumb2 instructions."
Pete Cooper [Thu, 16 Jul 2015 18:38:13 +0000 (18:38 +0000)]
Revert "Add missing load/store flags to thumb2 instructions."

This reverts commit r242300.

This is causing buildbot failures which we are investigating.
I'll reapply once we know whats going on, but for now want to
get the bots green.

llvm-svn: 242428

9 years agoCOFF: Set Load Configuration entry in Data Directory.
Rui Ueyama [Thu, 16 Jul 2015 18:30:35 +0000 (18:30 +0000)]
COFF: Set Load Configuration entry in Data Directory.

Load Configuration field points to a structure containing information
for SEH. That data strucutre is not created by the linker but provided
by an external file. What we have to do is just to set __load_config_used
address to the header.

llvm-svn: 242427

9 years agoRename LoopInfo::Analyze() to LoopInfo::analyze() and turn its parameter type to...
Cong Hou [Thu, 16 Jul 2015 18:23:57 +0000 (18:23 +0000)]
Rename LoopInfo::Analyze() to LoopInfo::analyze() and turn its parameter type to const&.

The benefit of turning the parameter of LoopInfo::analyze() to const& is that it now can accept a rvalue.

http://reviews.llvm.org/D11250

llvm-svn: 242426

9 years ago[CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan by defau...
Alexey Samsonov [Thu, 16 Jul 2015 17:53:01 +0000 (17:53 +0000)]
[CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan by default "ninja install" command.

Summary:
Exclude external libc++ builds from "all" target, so that they are only
build on demand, and are not installed together with LLVM/Clang.

Reviewers: hans

Subscribers: llvm-commits

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

llvm-svn: 242424

9 years agoInternalize: internalize comdat members as a group, and drop comdat on such members.
Peter Collingbourne [Thu, 16 Jul 2015 17:42:21 +0000 (17:42 +0000)]
Internalize: internalize comdat members as a group, and drop comdat on such members.

Internalizing an individual comdat group member without also internalizing
the other members of the comdat can break comdat semantics. For example,
if a module contains a reference to an internalized comdat member, and the
linker chooses a comdat group from a different object file, this will break
the reference to the internalized member.

This change causes the internalizer to only internalize comdat members if all
other members of the comdat are not externally visible. Once a comdat group
has been fully internalized, there is no need to apply comdat rules to its
members; later optimization passes (e.g. globaldce) can legally drop individual
members of the comdat. So we drop the comdat attribute from all comdat members.

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

llvm-svn: 242423

9 years agoFixed an error in cuda-options.cu test:
Artem Belevich [Thu, 16 Jul 2015 17:24:18 +0000 (17:24 +0000)]
Fixed an error in cuda-options.cu test:
  -target option must be used without '='.

llvm-svn: 242422

9 years agoSet the libc++ version # to 3.7. Will bump to 3.8 soon
Marshall Clow [Thu, 16 Jul 2015 17:22:24 +0000 (17:22 +0000)]
Set the libc++ version # to 3.7.   Will bump to 3.8 soon

llvm-svn: 242421

9 years agoDisable #pragma redefine_extname for C++ code as it does not make sense in such a...
Aaron Ballman [Thu, 16 Jul 2015 17:06:53 +0000 (17:06 +0000)]
Disable #pragma redefine_extname for C++ code as it does not make sense in such a context.

Patch by Andrey Bokhanko!

llvm-svn: 242420

9 years ago[NVPTX] Don't leak dead instructions after unlinking them from the BasicBlock
Benjamin Kramer [Thu, 16 Jul 2015 16:51:48 +0000 (16:51 +0000)]
[NVPTX] Don't leak dead instructions after unlinking them from the BasicBlock

llvm-svn: 242417

9 years agoFix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref
Mehdi Amini [Thu, 16 Jul 2015 16:47:18 +0000 (16:47 +0000)]
Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242416