Michael Zolotukhin [Wed, 29 Jul 2015 18:10:29 +0000 (18:10 +0000)]
[Unroll] Don't crash when simplified branch condition is undef.
llvm-svn: 243544
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:23 +0000 (18:10 +0000)]
Rename test full-unroll-bad-geps.ll to full-unroll-crashers.ll.
No reason to limit it only to GEP-related crashes. More tests are to
come here.
llvm-svn: 243543
Lang Hames [Wed, 29 Jul 2015 18:07:48 +0000 (18:07 +0000)]
Fix typos in comments. NFC.
llvm-svn: 243542
Jim Ingham [Wed, 29 Jul 2015 17:51:36 +0000 (17:51 +0000)]
Add a function to make a mutex-protected copy of a breakpoint site's
owners list, so the StopInfo machinery can get the list of owners without
some other thread being able to mess up the list by deleting/disabline one of its
locations in the process of doing so.
<rdar://problem/
18685197>
llvm-svn: 243541
Bruno Cardoso Lopes [Wed, 29 Jul 2015 17:46:47 +0000 (17:46 +0000)]
Revert "[PeepholeOptimizer] Look through PHIs to find additional register sources"
Reported to Broke some internal tests: PR24303
This reverts commit r243486.
llvm-svn: 243540
Douglas Katzman [Wed, 29 Jul 2015 17:34:41 +0000 (17:34 +0000)]
Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier.
This lifts the somewhat arbitrary restriction on 3 OptSpecifiers.
Differential Revision: http://reviews.llvm.org/D11597
llvm-svn: 243539
Richard Trieu [Wed, 29 Jul 2015 17:03:34 +0000 (17:03 +0000)]
Disable -Wpessimizing-move and -Wredundant-move in template instantiations.
Dependent types can throw off the analysis for these warnings, possibly giving
conflicting warnings and fix-its. Disabling the warning in template
instantiations will prevent this problem, and will still catch the
non-dependent cases in templates.
llvm-svn: 243538
Tim Northover [Wed, 29 Jul 2015 16:39:56 +0000 (16:39 +0000)]
AArch64: use AddressingModes.h accessors for compare shifts
No functional change because "lsl #12" is actually encoded as 12, but one less
bug if someone ever decides to change that for the giggles.
llvm-svn: 243536
Rui Ueyama [Wed, 29 Jul 2015 16:30:45 +0000 (16:30 +0000)]
COFF: Fix SECREL and SECTION relocations.
SECREL should sets the 32-bit offset of the target from the beginning
of *target's* output section. Previously, the offset from the beginning
of source's output section was used instead.
SECTION means the target section's index, and not the source section's
index. This patch fixes that issue too.
llvm-svn: 243535
Rui Ueyama [Wed, 29 Jul 2015 16:30:40 +0000 (16:30 +0000)]
ELF2: Use DenseMap instead of std::map for a symbol table.
We use DenseMap for COFF too.
llvm-svn: 243534
Rui Ueyama [Wed, 29 Jul 2015 16:30:34 +0000 (16:30 +0000)]
COFF: Remove unused command line option.
llvm-svn: 243533
Rui Ueyama [Wed, 29 Jul 2015 16:30:31 +0000 (16:30 +0000)]
COFF: Set load config table entry on non-x86.
llvm-svn: 243532
Hans Wennborg [Wed, 29 Jul 2015 16:29:06 +0000 (16:29 +0000)]
test-release.sh: Add option for building the OpenMP run-time
This isn't part of the official release process, but provides a convenient way
to build binaries for those who want to experiment with it. Hopefully the run-
time can be part of the regular build and release process for 3.8.
Differential Revision: http://reviews.llvm.org/D11494
llvm-svn: 243531
Marshall Clow [Wed, 29 Jul 2015 16:25:45 +0000 (16:25 +0000)]
Fix a self-move bug in inplace_merge. Thanks to Ted and Dexon for the report and the suggested fix.
llvm-svn: 243530
Reid Kleckner [Wed, 29 Jul 2015 16:19:40 +0000 (16:19 +0000)]
Delete unused <dbghelp.h> include
llvm-svn: 243529
Aaron Ballman [Wed, 29 Jul 2015 15:57:49 +0000 (15:57 +0000)]
Reverting r243386 because it has serious post-commit concerns that have not been addressed. Also reverts r243389, which relied on this commit.
llvm-svn: 243527
Colin LeMahieu [Wed, 29 Jul 2015 15:45:39 +0000 (15:45 +0000)]
[llvm-objdump] Added -j flag to filter sections that are operated on.
llvm-svn: 243526
Yaron Keren [Wed, 29 Jul 2015 15:42:28 +0000 (15:42 +0000)]
In case of an existing GlobalVariable, the comdat is created using the name of the
new GV (usually NAME.1) instead of the correct NAME of the old GV. Moving comdat
creation after GV replacement solves this. Patch + testcase.
Reviewed by Reid Kleckner.
http://reviews.llvm.org/D11594
llvm-svn: 243525
Yaron Keren [Wed, 29 Jul 2015 15:28:02 +0000 (15:28 +0000)]
Make this test target x86_64-pc-windows-gnu as well.
llvm-svn: 243523
Jingyue Wu [Wed, 29 Jul 2015 15:26:11 +0000 (15:26 +0000)]
Temporarily revert r242871
PR24299
llvm-svn: 243522
Tamas Berghammer [Wed, 29 Jul 2015 15:15:42 +0000 (15:15 +0000)]
Fix read/write context in EmulateInstructionARM strd/ldrd
llvm-svn: 243521
Tamas Berghammer [Wed, 29 Jul 2015 15:14:37 +0000 (15:14 +0000)]
Remove non-utf-8 characters from EmulateInstructionARM
llvm-svn: 243520
Bill Schmidt [Wed, 29 Jul 2015 14:31:57 +0000 (14:31 +0000)]
[PPC] Fix PR24216: Don't generate splat for misaligned shuffle mask
Given certain shuffle-vector masks, LLVM emits splat instructions
which splat the wrong bytes from the source register. The issue is
that the function PPC::isSplatShuffleMask() in PPCISelLowering.cpp
does not ensure that the splat pattern found is requesting bytes that
are aligned on an EltSize boundary. This patch detects this situation
as not a valid splat mask, resulting in a permute being generated
instead of a splat.
Patch and test case by Tyler Kenney, cleaned up a bit by me.
This is a simple bug fix that would be good to incorporate into 3.7.
llvm-svn: 243519
Akira Hatanaka [Wed, 29 Jul 2015 14:25:58 +0000 (14:25 +0000)]
[AArch64] Pass subtarget feature "+strict-align".
This commit changes the driver to save subtarget feature "+strict-align"
to the IR instead of using backend option "aarch64-strict-align". This is
needed for LTO.
rdar://problem/
21529937
llvm-svn: 243518
Yaron Keren [Wed, 29 Jul 2015 14:21:47 +0000 (14:21 +0000)]
Remove unnecessary variable.
llvm-svn: 243517
Akira Hatanaka [Wed, 29 Jul 2015 14:17:26 +0000 (14:17 +0000)]
[AArch64] Define subtarget feature strict-align.
This commit defines subtarget feature strict-align and uses it instead of
cl::opt -aarch64-strict-align to decide whether strict alignment should be
forced.
rdar://problem/
21529937
llvm-svn: 243516
Tobias Grosser [Wed, 29 Jul 2015 13:52:05 +0000 (13:52 +0000)]
Do not detect scops that are delinearized to arrays with "undef" size
Such codes are not interesting to optimize and most likely never appear in the
normal compilation flow. However, they show up during test case reduction with
bugpoint and trigger -- without this change -- an assert in
polly::MemoryAccess::foldAccess(). It is better to detect them in
ScopDetection itself and just bail out.
Contributed-by: Utpal Bora <cs14mtech11017@iith.ac.in>
Reviewers: grosser
Subscribers: pollydev, llvm-commits
Differential Revision: http://reviews.llvm.org/D11425
llvm-svn: 243515
Asaf Badouh [Wed, 29 Jul 2015 12:34:20 +0000 (12:34 +0000)]
[X86][AVX512BW] add convert i16 to i8 and unpack intrinsics
Differential Revision: http://reviews.llvm.org/D11564
llvm-svn: 243514
Pavel Labath [Wed, 29 Jul 2015 12:33:31 +0000 (12:33 +0000)]
[LLGS] Spawned process handling cleanup
Summary:
This commit moves the m_spawned_pids member from the common LLGS/Platform class to the plaform
specific part. This enables us to remove LLGS code, which was attempting to manage the
m_spawned_pids contents, but at the same time making sure, there is only one debugged process. If
we ever want to do multi-process debugging, we will probably want to replace this with a set of
NativeProcessProtocolSP anyway. The only functional change is that support for
qKillSpawnedProcess packet is removed from LLGS, but this was not used there anyway (we have the
k packet for that).
Reviewers: ovyalov, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11557
llvm-svn: 243513
Asaf Badouh [Wed, 29 Jul 2015 12:22:19 +0000 (12:22 +0000)]
[X86][AVX512BW] Replace attributes with __DEFAULT_FN_ATTRS
llvm-svn: 243512
Jason Molenda [Wed, 29 Jul 2015 01:42:16 +0000 (01:42 +0000)]
When debugserver fails to attach to a process on a Darwin
system, make a couple of additional checks to see if the
attach was denied via the System Integrity Protection that
is new in Mac OS X 10.11. If so, return a special E87
error code to indicate this to lldb.
Up in lldb, if we receive the E87 error code, be specific
about why the attach failed.
Also detect the more common case of general attach failure
and print a better error message than "lost connection".
I believe this code will all build on Mac OS X 10.10 systems.
It may not compile or run on earlier versions of the OS.
None of this should build on other non-darwin systems.
llvm-svn: 243511
Dawn Perchik [Wed, 29 Jul 2015 01:01:14 +0000 (01:01 +0000)]
[lldb-mi] Fix tests added in r243484 for breakpoints using file:func syntax.
llvm-svn: 243510
Michael J. Spencer [Wed, 29 Jul 2015 00:52:17 +0000 (00:52 +0000)]
[ELF2] Emit correct section types.
llvm-svn: 243509
Jason Molenda [Wed, 29 Jul 2015 00:42:47 +0000 (00:42 +0000)]
First part of an attempt to indicate to the user when they are
debugging optimized code. Adds new methods on Function/SBFunction
to query whether a given function is optimized. Adds a new
function.is-optimized format entity and changes the default
frame-format to append "[opt]" if the function was built with
optimization.
The only indication that a binary was built with optimization
that we have right now is the presence of the DW_AT_APPLE_optimized
attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit.
The absence of this flag may mean that the compile_unit was not
compiled with optimization, or it may mean that the producer
does not generate this attribute.
Currently this only works for dSYM debugging. When we create
the CompileUnit with dwarf-in-.o-file debugging we don't have
the attribute value yet so it's not set. I need to find the
flag value when we do start to read the .o file DWARF and
set the CompileUnit's status at that point - but haven't
done it yet.
I'm also going to add a mechanism for issuing warnings to users
such that they're only issued once in a debug session and
there is away for users to suppress these warnings altogether
via .lldbinit file settings. But I want to get this changeset
committed now that it's at a useful state.
<rdar://problem/
19281172>
llvm-svn: 243508
Jim Ingham [Wed, 29 Jul 2015 00:40:36 +0000 (00:40 +0000)]
Lock the owners mutex in the BreakpointSite before updating the hit
counts. If you delete a breakpoint belonging to a site just as you are
processing a hit on that site, you could cause the BreakpointSite loop to
access a now deleted location.
<rdar://problem/
19310323>
llvm-svn: 243507
Michael J. Spencer [Wed, 29 Jul 2015 00:30:10 +0000 (00:30 +0000)]
[ELF2] Emit section table.
llvm-svn: 243506
Bjarke Hammersholt Roune [Wed, 29 Jul 2015 00:29:08 +0000 (00:29 +0000)]
Make function comments consistently imperative.
(tiny edit, mostly a test that my new commit access works)
llvm-svn: 243505
Dawn Perchik [Wed, 29 Jul 2015 00:22:53 +0000 (00:22 +0000)]
[lldb-mi] XFAIL new test added in r243484.
llvm-svn: 243504
Eric Fiselier [Wed, 29 Jul 2015 00:03:51 +0000 (00:03 +0000)]
[libcxx] Cleanup CMake configuration and integrate with LLVM
Summary:
This patch contains the following changes:
1. Require that libc++ can find a LLVM source directory. This is done the same way as `libc++abi` currently does.
2. Cleanup ugly configuration code in CMakeLists.txt by using `add_flags`, `add_flags_if`, and `add_flags_if_supported` macros.
The goals for this patch are:
1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671).
2. Make it easier to use sanitizers using the `LLVM_USE_SANITIZER` option.
3. Make libc++'s CMakeLists.txt file easier to understand and change.
4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs).
5. Move towards allowing libc++ to use other LLVM utilities such as `not` and `FileCheck`.
Reviewers: mclow.lists, jroelofs, danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11308
llvm-svn: 243503
Sanjoy Das [Tue, 28 Jul 2015 23:50:30 +0000 (23:50 +0000)]
[Statepoints] Let patchable statepoints have a symbolic call target.
Summary:
As added initially, statepoints required their call targets to be a
constant pointer null if ``numPatchBytes`` was non-zero. This turns out
to be a problem ergonomically, since there is no way to mark patchable
statepoints as calling a (readable) symbolic value.
This change remove the restriction of requiring ``null`` call targets
for patchable statepoints, and changes PlaceSafepoints to maintain the
symbolic call target through its transformation.
Reviewers: reames, swaroop.sridhar
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11550
llvm-svn: 243502
Alex Lorenz [Tue, 28 Jul 2015 23:34:27 +0000 (23:34 +0000)]
Fix broken ArrayRef conversion from r243497.
llvm-svn: 243501
Sanjay Patel [Tue, 28 Jul 2015 23:28:22 +0000 (23:28 +0000)]
ignore duplicate divisor uses when transforming into reciprocal multiplies (PR24141)
PR24141: https://llvm.org/bugs/show_bug.cgi?id=24141
contains a test case where we have duplicate entries in a node's uses() list.
After r241826, we use CombineTo() to delete dead nodes when combining the uses into
reciprocal multiplies, but this fails if we encounter the just-deleted node again in
the list.
The solution in this patch is to not add duplicate entries to the list of users that
we will subsequently iterate over. For the test case, this avoids triggering the
combine divisors logic entirely because there really is only one user of the divisor.
Differential Revision: http://reviews.llvm.org/D11345
llvm-svn: 243500
Eric Fiselier [Tue, 28 Jul 2015 23:27:03 +0000 (23:27 +0000)]
Remove sanitizer XFAILs on a test.
llvm-svn: 243499
Sanjay Patel [Tue, 28 Jul 2015 23:05:48 +0000 (23:05 +0000)]
fix TLI's combineRepeatedFPDivisors interface to return the minimum user threshold
This fix was suggested as part of D11345 and is part of fixing PR24141.
With this change, we can avoid walking the uses of a divisor node if the target
doesn't want the combineRepeatedFPDivisors transform in the first place.
There is no NFC-intended other than that.
Differential Revision: http://reviews.llvm.org/D11531
llvm-svn: 243498
Alex Lorenz [Tue, 28 Jul 2015 23:02:45 +0000 (23:02 +0000)]
MIR Serialization: Serialize the target index machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243497
Michael J. Spencer [Tue, 28 Jul 2015 22:58:25 +0000 (22:58 +0000)]
[ELF2] Devirtualize SymbolBody.
llvm-svn: 243496
Rui Ueyama [Tue, 28 Jul 2015 22:56:02 +0000 (22:56 +0000)]
COFF: _tls_used is __tls_used on x86.
llvm-svn: 243495
Evgeniy Stepanov [Tue, 28 Jul 2015 22:45:24 +0000 (22:45 +0000)]
[asan] Support per-application flags in the Android setup script.
llvm-svn: 243494
Akira Hatanaka [Tue, 28 Jul 2015 22:44:28 +0000 (22:44 +0000)]
[ARM] Define subtarget feature strict-align.
This commit defines subtarget feature strict-align and uses it instead of
cl::opt -arm-strict-align to decide whether strict alignment should be
forced. Also, remove the logic that was checking the OS and architecture
as clang is now responsible for setting strict-align based on the command
line options specified and the target architecute and OS.
rdar://problem/
21529937
http://reviews.llvm.org/D11470
llvm-svn: 243493
Tim Northover [Tue, 28 Jul 2015 22:42:32 +0000 (22:42 +0000)]
AArch64: be careful of large immediates when optimising cmps.
llvm-svn: 243492
NAKAMURA Takumi [Tue, 28 Jul 2015 22:41:04 +0000 (22:41 +0000)]
Move an extra switch to clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp from check_clang_tidy.sh.
It also rolls back r242984 and r242985.
llvm-svn: 243491
Rui Ueyama [Tue, 28 Jul 2015 22:34:24 +0000 (22:34 +0000)]
COFF: Fix export symbol names for x86.
I don't fully understand the rationale behind the name mangling
scheme used for the DLL export table and the import library.
Why only leading "_" is dropped for the import library while
both "_" and "@" are dropped from DLL symbol table? But this seems
to be what MSVC linker does.
llvm-svn: 243490
Akira Hatanaka [Tue, 28 Jul 2015 22:26:45 +0000 (22:26 +0000)]
[ARM] Pass subtarget feature "+strict-align".
This commit changes the driver to save subtarget feature "+strict-align" to the
IR instead of using backend option "arm-strict-align". This is needed for LTO.
Also, move the logic in ARM backend that was deciding whether strict alignment
should be forced to the front-end.
rdar://problem/
21529937
http://reviews.llvm.org/D11472
llvm-svn: 243489
Dawn Perchik [Tue, 28 Jul 2015 22:19:42 +0000 (22:19 +0000)]
Fix comment in TestExprOptions to match change of language from ObjC to ObjC++.
llvm-svn: 243488
Davide Italiano [Tue, 28 Jul 2015 21:58:08 +0000 (21:58 +0000)]
[tests] Use llvm-readobj instead of macho-dump.
llvm-svn: 243487
Bruno Cardoso Lopes [Tue, 28 Jul 2015 21:45:50 +0000 (21:45 +0000)]
[PeepholeOptimizer] Look through PHIs to find additional register sources
Reapply 243271 with more fixes; although we are not handling multiple
sources with coalescable copies, we were not properly skipping this
case.
- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.
With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:
A:
psllq %mm1, %mm0
movd %mm0, %r9
jmp C
B:
por %mm1, %mm0
movd %mm0, %r9
jmp C
C:
movd %r9, %mm0
pshufw $238, %mm0, %mm0
Becomes:
A:
psllq %mm1, %mm0
jmp C
B:
por %mm1, %mm0
jmp C
C:
pshufw $238, %mm0, %mm0
Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/
20404526
llvm-svn: 243486
Vasileios Kalintiris [Tue, 28 Jul 2015 21:43:31 +0000 (21:43 +0000)]
[mips][FastISel] Fix call lowering by bailing out on "fastcc" calls.
Summary:
Currently, we support only the MIPS O32 ABI calling convention for call
lowering. With this change we avoid using the O32 calling convetion for
lowering calls marked as using the fast calling convention.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11515
llvm-svn: 243485
Dawn Perchik [Tue, 28 Jul 2015 21:40:57 +0000 (21:40 +0000)]
[lldb-mi] Fix setting of breakpoints using file:func syntax.
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11499
llvm-svn: 243484
Enrico Granata [Tue, 28 Jul 2015 21:28:33 +0000 (21:28 +0000)]
Cleanup a few stale comments in FormattersContainer.h
llvm-svn: 243483
Enrico Granata [Tue, 28 Jul 2015 21:24:39 +0000 (21:24 +0000)]
Make ClangASTType::RemoveFastQualifiers() actually do something useful
llvm-svn: 243482
Evgeniy Stepanov [Tue, 28 Jul 2015 21:01:42 +0000 (21:01 +0000)]
[sanitizer] Fix Mac build.
llvm-svn: 243480
Artem Belevich [Tue, 28 Jul 2015 21:01:30 +0000 (21:01 +0000)]
Silence unused argument warning for --cuda-host-only.
Differential Revision: http://reviews.llvm.org/D11575
llvm-svn: 243479
Artem Belevich [Tue, 28 Jul 2015 21:01:21 +0000 (21:01 +0000)]
--cuda-host-only should not disable linking phase.
Host-only cuda compilation does produce valid host object
file and in some cases users do want to proceed on to the linking phase.
The change removes special case that stopped compilation pipeline at
the Assembly phase. Device-side compilation is still stopped early
by the types::getCompilationPhases().
Differential Revision: http://reviews.llvm.org/D11573
llvm-svn: 243478
Richard Trieu [Tue, 28 Jul 2015 20:53:46 +0000 (20:53 +0000)]
Use an iterative method instead of recursion for printing macro backtraces.
Store the locations for a macro expansion in a vector, then iterate over them
instead of using recursion. This simplifies the logic around the backtrace
limit and gives easier access to the source locations. No functionality change.
Patch by Zhengkai Wu.
Differential Revision: http://reviews.llvm.org/D11542
llvm-svn: 243477
Lang Hames [Tue, 28 Jul 2015 20:51:53 +0000 (20:51 +0000)]
[RuntimeDyld] Remove a memory-leak that was introduced in r243456. Thanks to Ben
Kramer for catching this.
llvm-svn: 243476
Chih-Hung Hsieh [Tue, 28 Jul 2015 20:38:29 +0000 (20:38 +0000)]
Fix typo.
llvm-svn: 243475
Chih-Hung Hsieh [Tue, 28 Jul 2015 20:31:10 +0000 (20:31 +0000)]
Limit this test only on linux.
Differential Revision: http://reviews.llvm.org/D10522
llvm-svn: 243474
Evgeniy Stepanov [Tue, 28 Jul 2015 20:27:51 +0000 (20:27 +0000)]
[asan] Read process name from /proc/self/cmdline on Linux.
Rename getBinaryBasename() to getProcessName() and, on Linux,
read it from /proc/self/cmdline instead of /proc/self/exe. The former
can be modified by the process. The main motivation is Android, where
application processes re-write cmdline to a package name. This lets
us setup per-application ASAN_OPTIONS through include=/some/path/%b.
llvm-svn: 243473
Enrico Granata [Tue, 28 Jul 2015 20:19:45 +0000 (20:19 +0000)]
Fix a bug where the std::list synthetic child provider would not clean its cache correctly on update, causing stale children to be returned in some circumstances
Fixes rdar://
20560680
llvm-svn: 243472
Michael Zolotukhin [Tue, 28 Jul 2015 20:07:29 +0000 (20:07 +0000)]
[Unroll] Add debug dumps to loop-unroll analyzer.
llvm-svn: 243471
Bill Schmidt [Tue, 28 Jul 2015 20:05:06 +0000 (20:05 +0000)]
Add commentary explaining PPC access to return address
llvm-svn: 243470
Vasileios Kalintiris [Tue, 28 Jul 2015 19:57:25 +0000 (19:57 +0000)]
[mips][FastISel] Fix generated code for IR's select instruction.
Summary:
Generate correct code for the select instruction by zero-extending
it's boolean/condition operand to GPR-width. This is necessary because
the conditional-move instructions operate on the whole register.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11506
llvm-svn: 243469
Ed Maste [Tue, 28 Jul 2015 19:47:00 +0000 (19:47 +0000)]
FreeBSDThread::GetRegisterContext is only for FreeBSD targets
The removal of in-process Linux debug support left a switch statement
with llvm::Triple::FreeBSD as the only case. Simplify by replacing it
with a now-equivalent assertion.
llvm-svn: 243468
Bill Schmidt [Tue, 28 Jul 2015 19:41:49 +0000 (19:41 +0000)]
PowerPC's ABIs differ from those of other architectures in that the
callee-saved return address is stored in the caller's stack frame, not
the callee's. This patch adjusts the logic to find the LR in the
correct place for PowerPC.
Patch joint with Bill Seurer.
llvm-svn: 243467
Michael Zolotukhin [Tue, 28 Jul 2015 19:21:21 +0000 (19:21 +0000)]
[Unroll] Don't analyze blocks outside the loop.
llvm-svn: 243466
Tobias Grosser [Tue, 28 Jul 2015 19:16:46 +0000 (19:16 +0000)]
Remove some dead code
llvm-svn: 243465
Tobias Grosser [Tue, 28 Jul 2015 19:16:42 +0000 (19:16 +0000)]
Do not end lines with '\'
This fixes 'warning: multi-line comment [-Wcomment]'
llvm-svn: 243464
Richard Trieu [Tue, 28 Jul 2015 19:06:16 +0000 (19:06 +0000)]
Do not give a -Wredundant-move warning when removing the move will result in an
error.
If the object being moved has a move constructor and a deleted copy constructor,
std::move is required, otherwise Clang will give a deleted constructor error.
llvm-svn: 243463
Matt Arsenault [Tue, 28 Jul 2015 18:47:00 +0000 (18:47 +0000)]
AMDGPU: Don't try to use LDS/vector for private if pointer value stored
If the pointer is the store's value operand, this would produce
a broken module. Make sure the use is actually for the pointer operand.
llvm-svn: 243462
Matt Arsenault [Tue, 28 Jul 2015 18:29:14 +0000 (18:29 +0000)]
AMDGPU: Fix crash if called function is a bitcast
getCalledFunction() is null, so this would crash. Replace
crash with an error on unsupported call.
llvm-svn: 243461
Jingyue Wu [Tue, 28 Jul 2015 18:22:40 +0000 (18:22 +0000)]
[SCEV] Apply NSW and NUW flags via poison value analysis
Summary:
Make Scalar Evolution able to propagate NSW and NUW flags from instructions to SCEVs in some cases. This is based on reasoning about when poison from instructions with these flags would trigger undefined behavior. This gives a 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.
There does not seem to be clear agreement about when poison should be considered to propagate through instructions. In this analysis, poison propagates only in cases where that should be uncontroversial.
This change makes LSR able to create induction variables for expressions like &ptr[i + offset] for loops like this:
for (int i = 0; i < limit; ++i) {
sum += ptr[i + offset];
}
Here ptr is a 64 bit pointer and offset is a 32 bit integer. For NVPTX, LSR currently creates an induction variable for i + offset instead, which is not as fast. Improving this situation is what brings the 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.
There are more details in this discussion on llvmdev.
June: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-June/thread.html#87234
July: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-July/thread.html#87392
Patch by Bjarke Roune
Reviewers: eliben, atrick, sanjoy
Subscribers: majnemer, hfinkel, jingyue, meheff, llvm-commits
Differential Revision: http://reviews.llvm.org/D11212
llvm-svn: 243460
Matt Arsenault [Tue, 28 Jul 2015 18:09:55 +0000 (18:09 +0000)]
AMDGPU: Fix return type of getImplicitParameterOffset.
Patch by Zoltan Gilian <zoltan.gilian@gmail.com>
llvm-svn: 243459
Tobias Grosser [Tue, 28 Jul 2015 18:03:36 +0000 (18:03 +0000)]
Rewrite getPrevectorMap using schedule trees operations
Schedule trees are a lot easier to work with, for both humans and machines. For
humans the more structured schedule representation is easier to reason about.
Together with the more abstract isl programming interface this can result in a
lot cleaner code (see this changeset). For machines, the structured schedule and
the fact that we now use explicit piecewise affine expressions instead of
integer maps makes it easier to generate code from this schedule tree. As a
result, we can already see a slight compile-time improvement -- for 3mm from
0m0.593s to 0m0.551s seconds (-7 %). More importantly, future optimizations such
as full-partial tile separation will most likely result in more streamlined code
to be generated.
Contributed-by: Roman Gareev <gareevroman@gmail.com>
llvm-svn: 243458
Alex Lorenz [Tue, 28 Jul 2015 17:52:59 +0000 (17:52 +0000)]
Add a test case for r242191 ([MMX] Use the appropriate instructions for
GR64 <-> VR64 copies).
This commit adds a MIR test case for the commit r242191, which was committed
without one. This test case verifies that the ExpandPostRA pass expands the
GR64 <-> VR64 copies into the appropriate MMX_MOV instructions.
llvm-svn: 243457
Lang Hames [Tue, 28 Jul 2015 17:52:11 +0000 (17:52 +0000)]
[RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef
rather than a string section name.
llvm-svn: 243456
Argyrios Kyrtzidis [Tue, 28 Jul 2015 17:38:51 +0000 (17:38 +0000)]
[test] Follow-up for r243119, also add a test case using property methods.
llvm-svn: 243455
Chih-Hung Hsieh [Tue, 28 Jul 2015 17:32:49 +0000 (17:32 +0000)]
Move unit tests to target specific directories.
Differential Revision: http://reviews.llvm.org/D10522
llvm-svn: 243454
Alex Lorenz [Tue, 28 Jul 2015 17:28:03 +0000 (17:28 +0000)]
MIR Serialization: Serialize the block address machine operands.
llvm-svn: 243453
JF Bastien [Tue, 28 Jul 2015 17:23:07 +0000 (17:23 +0000)]
WebAssembly: MCAsmInfo only has one syntax variant for now.
Summary: MCAsmInfo is set up with the default AssemblerDialect, which is zero.
Subscribers: llvm-commits, sunfish, jfb
Differential Revision: http://reviews.llvm.org/D11567
llvm-svn: 243452
Sanjay Patel [Tue, 28 Jul 2015 17:18:25 +0000 (17:18 +0000)]
add tests to show broken current behavior of minsize attribute
llvm-svn: 243451
Alex Lorenz [Tue, 28 Jul 2015 17:09:52 +0000 (17:09 +0000)]
MIR Parser: Extract the method 'parseGlobalValue'. NFC.
This commit extracts the code that parses a global value from the method
'parseGlobalAddressOperand' into a new method 'parseGlobalValue', so that this
code can be reused by the method which will parse the block address machine
operands.
llvm-svn: 243450
Alex Lorenz [Tue, 28 Jul 2015 17:03:40 +0000 (17:03 +0000)]
MIR Parser: Move the function 'lexName'. NFC.
This commit moves the function 'lexName' to the start of the file so it can
be reused by the function which will lex the named LLVM IR block references.
llvm-svn: 243449
Ed Maste [Tue, 28 Jul 2015 16:57:36 +0000 (16:57 +0000)]
Remove eNewThreadMessage from FreeBSD process monitor
FreeBSD thread information is updated after stop - we do not use a
message for thread creation.
llvm-svn: 243448
Alex Lorenz [Tue, 28 Jul 2015 16:56:45 +0000 (16:56 +0000)]
MIR Printer: Remove an outdated TODO comment and assertion. NFC.
This commit removes an outdated TODO comment and a corresponding assertion
which asserts that the mir printer can't the print machine basic blocks that
aren't sequentially numbered.
This comment and assertion were correct when I was working on the patch which
serialized the machine basic blocks, but then I decided to add an 'ID'
attribute to the machine basic block's YAML mapping based on the patch review.
This comment and assertion then became invalid as with the 'ID' attribute we
can serialize the non sequential machine basic blocks and their references
without any problems.
llvm-svn: 243447
Douglas Katzman [Tue, 28 Jul 2015 16:52:42 +0000 (16:52 +0000)]
Let cmake infer source file language by the file extension.
This applies default compiler flags to .S files, in particular removing
the "-pedantic" option, which is desirable because there is nothing to
reasonably warn about; and the only thing that gcc warns about is that
you allegedly can't correctly invoke GLUE2 in lib/builtins/assembly.h
on platforms for which USER_LABEL_PREFIX is the empty string.
In the gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33305 that
added the warning, a commenter notes that giving a macro of zero characters
to another macro is not precisely the same as failing to supply an argument,
and "there is a widespread belief in C++ community that such usage is valid".
Unfortunately the only way to silence the warning is to avoid -pedantic.
Differential Revision: http://reviews.llvm.org/D10713
llvm-svn: 243446
Alex Lorenz [Tue, 28 Jul 2015 16:48:37 +0000 (16:48 +0000)]
MIR Parser: Remove redundant parameters. NFC.
This commit removes the redundant parameters from the two methods
'initializeRegisterInfo' and 'initializeFrameInfo'. The removed parameters are
redundant as we are already passing in the 'MachineFunction' to those methods,
and those parameters can be derived from the machine function parameter.
llvm-svn: 243445
Nico Weber [Tue, 28 Jul 2015 16:48:12 +0000 (16:48 +0000)]
Rename -Wmsvc-include to -Wmicrosoft-include, now that -Wmicrosoft is split up.
(Keep -Wmsvc-include around as an alias.)
While here, also replace the one other mention of "MSVC" in diagnostics with
"Microsoft", for consistency.
llvm-svn: 243444
Chih-Hung Hsieh [Tue, 28 Jul 2015 16:27:56 +0000 (16:27 +0000)]
Add -femulated-tls flag to select the emulated TLS model.
This will be used for old targets like Android that do not
support ELF TLS models.
Differential Revision: http://reviews.llvm.org/D10524
llvm-svn: 243441
Benjamin Kramer [Tue, 28 Jul 2015 16:25:32 +0000 (16:25 +0000)]
[CodeGen] Simplify creation of shuffle masks.
No functional change intended.
llvm-svn: 243439
Chih-Hung Hsieh [Tue, 28 Jul 2015 16:24:05 +0000 (16:24 +0000)]
Implement target independent TLS compatible with glibc's emutls.c.
The 'common' section TLS is not implemented.
Current C/C++ TLS variables are not placed in common section.
DWARF debug info to get the address of TLS variables is not generated yet.
clang and driver changes in http://reviews.llvm.org/D10524
Added -femulated-tls flag to select the emulated TLS model,
which will be used for old targets like Android that do not
support ELF TLS models.
Added TargetLowering::LowerToTLSEmulatedModel as a target-independent
function to convert a SDNode of TLS variable address to a function call
to __emutls_get_address.
Added into lib/Target/*/*ISelLowering.cpp to call LowerToTLSEmulatedModel
for TLSModel::Emulated. Although all targets supporting ELF TLS models are
enhanced, emulated TLS model has been tested only for Android ELF targets.
Modified AsmPrinter.cpp to print the emutls_v.* and emutls_t.* variables for
emulated TLS variables.
Modified DwarfCompileUnit.cpp to skip some DIE for emulated TLS variabls.
TODO: Add proper DIE for emulated TLS variables.
Added new unit tests with emulated TLS.
Differential Revision: http://reviews.llvm.org/D10522
llvm-svn: 243438