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
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
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
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
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
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
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
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
Hans Wennborg [Fri, 17 Jul 2015 16:49:59 +0000 (16:49 +0000)]
Add libunwind to the release scripts
llvm-svn: 242543
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
Marshall Clow [Fri, 17 Jul 2015 16:36:44 +0000 (16:36 +0000)]
Bump libc++ version # to 3.8
llvm-svn: 242541
Reid Kleckner [Fri, 17 Jul 2015 16:31:59 +0000 (16:31 +0000)]
Add missing chkstk.S files from r242539
llvm-svn: 242540
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
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
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
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
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
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
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
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
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
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
Andrey Bokhanko [Fri, 17 Jul 2015 12:25:21 +0000 (12:25 +0000)]
Changed "pragma" -> "#pragma" in a comment, NFC.
llvm-svn: 242521
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Adrian Prantl [Fri, 17 Jul 2015 04:07:47 +0000 (04:07 +0000)]
Fix clang-fuzzer build after r242499.
llvm-svn: 242505
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
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
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
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
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
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
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
Rafael Espindola [Fri, 17 Jul 2015 00:57:52 +0000 (00:57 +0000)]
Use small encodings for constants when possible.
llvm-svn: 242493
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
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
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
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
Chaoren Lin [Thu, 16 Jul 2015 23:45:08 +0000 (23:45 +0000)]
Re-landing r242318 after buildbot update.
llvm-svn: 242488
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
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
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
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
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
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
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
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
Chaoren Lin [Thu, 16 Jul 2015 22:24:16 +0000 (22:24 +0000)]
Xfail pexpect tests for Windows hosts.
llvm-svn: 242457
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
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
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
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
James Dennett [Thu, 16 Jul 2015 22:06:34 +0000 (22:06 +0000)]
Documentation cleanup. No functional change intended.
llvm-svn: 242450
Alexey Samsonov [Thu, 16 Jul 2015 21:46:58 +0000 (21:46 +0000)]
[ASan] PR24150: restrict test case to i386.
llvm-svn: 242449
Simon Pilgrim [Thu, 16 Jul 2015 21:44:53 +0000 (21:44 +0000)]
Fix spelling. NFCI.
llvm-svn: 242448
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
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
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
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
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
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
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
Matthias Braun [Thu, 16 Jul 2015 20:27:01 +0000 (20:27 +0000)]
MachineInstr: Explain the subtle semantics of uses()/defs()
llvm-svn: 242438
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
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
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
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
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
Davide Italiano [Thu, 16 Jul 2015 19:31:40 +0000 (19:31 +0000)]
[SemaType] Use a range loop.
llvm-svn: 242432
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
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
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
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
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
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
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
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
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
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
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
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
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
Nico Weber [Thu, 16 Jul 2015 16:45:01 +0000 (16:45 +0000)]
Fix test/COFF/dll.test after r242342.
r242342 removed the RUN line that wrote t2.obj, but another RUN line further
down still reads t2.obj, so add it back.
llvm-svn: 242415
Mehdi Amini [Thu, 16 Jul 2015 16:34:23 +0000 (16:34 +0000)]
Make ExecutionEngine owning a DataLayout
Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.
The ExecutionEngine will act as an exception and will be unsafe to
be reused across context. We don't enforce this rule but undefined
behavior can occurs if the user tries to do it.
Reviewers: lhames
Subscribers: echristo, llvm-commits, rafael, yaron.keren
Differential Revision: http://reviews.llvm.org/D11110
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242414
Eli Bendersky [Thu, 16 Jul 2015 16:27:19 +0000 (16:27 +0000)]
Correct lowering of memmove in NVPTX
This fixes https://llvm.org/bugs/show_bug.cgi?id=24056
Also a bit of refactoring along the way.
Differential Revision: http://reviews.llvm.org/D11220
llvm-svn: 242413
Tom Stellard [Thu, 16 Jul 2015 16:13:34 +0000 (16:13 +0000)]
AMDGPU/R600: Remove unused variable
This fixes a warning introduced by r242410.
llvm-svn: 242412
Tom Stellard [Thu, 16 Jul 2015 15:38:29 +0000 (15:38 +0000)]
AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()
Summary:
This fixes an issue on MIPS where the infinite-loop-evergreen.ll test
was failing to terminate.
Fixes PR24147.
Reviewers: arsenm, dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11260
llvm-svn: 242410