Benjamin Kramer [Tue, 14 Jul 2015 15:34:19 +0000 (15:34 +0000)]
Pull trivial SanitizerSet methods into the header.
Inlining them is always preferable to a call. NFC.
llvm-svn: 242154
Rafael Espindola [Tue, 14 Jul 2015 15:22:42 +0000 (15:22 +0000)]
Use a range loop. NFC.
llvm-svn: 242153
JF Bastien [Tue, 14 Jul 2015 15:10:34 +0000 (15:10 +0000)]
Revert "Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components."
This reverts commit
01446706b4c0a86bb64768f307079cab5c514aa3.
Causes breakage, seems to be related to 'svn' in the file's name:
CC=gcc CXX=g++ \
../llvm/configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-shared \
--enable-libffi \
--enable-targets=all \
--disable-assertions \
--with-python=/usr/bin/python2 \
--enable-optimized
make REQUIRES_RTTI=1 ENABLE_PIC=1
results:
llvm[2]: Linking Release unit test Support (without symbols)
llvm[2]: ======= Finished Linking Release Unit test Support (without symbols)
make[3]: Entering directory '/build/llvm-svn/src/build/bindings/ocaml/llvm'
make[3]: *** No rule to make target '/build/llvm-
svn/src/build/Release/lib/ocaml/libLLVM-3.7.0svn.so', needed by 'build-
deplibs'. Stop.
make[3]: *** Waiting for unfinished jobs....
llvm[3]: Compiling llvm_ocaml.c for Release build
make[3]: Leaving directory '/build/llvm-svn/src/build/bindings/ocaml/llvm'
/build/llvm-svn/src/llvm/Makefile.rules:880: recipe for target 'all' failed
/build/llvm-svn/src/llvm/Makefile.rules:965: recipe for target 'all' failed
Differential Revision: http://reviews.llvm.org/D10716
llvm-svn: 242152
Rafael Espindola [Tue, 14 Jul 2015 15:06:18 +0000 (15:06 +0000)]
Rename a test. NFC.
llvm-svn: 242151
Yaron Keren [Tue, 14 Jul 2015 15:02:09 +0000 (15:02 +0000)]
Support mingw-w64 toolchain on openSUSE and likely other Linuxes
Thanks to Ismail Donmez for testing and to Joerg SonnenbergerĂľ for his comments.
llvm-svn: 242150
Marshall Clow [Tue, 14 Jul 2015 14:46:32 +0000 (14:46 +0000)]
Move bits from N4258. Mark vector's move-constructor unconditionally noexcept in C++1z
llvm-svn: 242148
Alexandros Lamprineas [Tue, 14 Jul 2015 14:34:06 +0000 (14:34 +0000)]
Caused regressions: compile Release+Asserts failed on clang-native-arm-cortex-a9
Revert "-Added API for retrieving the default FPU of a CPU from TargetParser."
This reverts commit
01199ab0c6ff2d5c4f6b2c05a95ec011e41c4669.
llvm-svn: 242147
Tom Stellard [Tue, 14 Jul 2015 14:15:03 +0000 (14:15 +0000)]
AMDGPU/SI: Add support for shrinking v_cndmask_b32_e32 instructions
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11061
llvm-svn: 242146
Aaron Ballman [Tue, 14 Jul 2015 14:14:00 +0000 (14:14 +0000)]
Silencing two MSVC warnings; 'argument' : truncation from 'unsigned int' to 'int16_t' and truncation of constant value. NFC intended.
llvm-svn: 242145
Asaf Badouh [Tue, 14 Jul 2015 14:02:45 +0000 (14:02 +0000)]
[x86] add 2 bit to ObjCOrBuiltinID and new intrinsics
add 2 bit to ObjCOrBuiltinID (changed from 11bits to 13bits), see discussion in
Add new intrinsics support that already covered by the BE.
All the intrinsics are covered by tests
Differential Revision: http://reviews.llvm.org/D10893
llvm-svn: 242144
Ewan Crawford [Tue, 14 Jul 2015 13:29:03 +0000 (13:29 +0000)]
Fix LLDB Xcode build broken in r242137
llvm-svn: 242143
Adhemerval Zanella [Tue, 14 Jul 2015 13:25:32 +0000 (13:25 +0000)]
[ELF/AArch64] Fix export TLS dynamic symbol
This patch fixes the TLS dynamic variable exportation from .got.plt segments,
created by General-dynamic relocations (TLSDESC). Current code only export
symbols in dynamic table from .got sections.
llvm-svn: 242142
Alexandros Lamprineas [Tue, 14 Jul 2015 13:20:48 +0000 (13:20 +0000)]
-Added API for retrieving the default FPU of a CPU from TargetParser.
-Implemented as a table lookup.
Change-Id: Ibf7217f6bd2769e9c06835a5aede3d072dee6757
Phabricator: http://reviews.llvm.org/D11100
llvm-svn: 242141
Benjamin Kramer [Tue, 14 Jul 2015 12:37:59 +0000 (12:37 +0000)]
[Analyzer] Move FindSuperCallVisitor into an anonymous namespace.
No functionality change.
llvm-svn: 242140
Daniel Sanders [Tue, 14 Jul 2015 12:24:22 +0000 (12:24 +0000)]
[mips] Fix li/la differences between IAS and GAS.
Summary:
- Signed 16-bit should have priority over unsigned.
- For la, unsigned 16-bit must use ori+addu rather than directly use ori.
- Correct tests on 32-bit immediates with 64-bit predicates by
sign-extending the immediate beforehand. For example, isInt<16>(0xffff8000)
should be true and use addiu.
Also split li/la testing into separate files due to their size.
Reviewers: vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10967
llvm-svn: 242139
Daniel Jasper [Tue, 14 Jul 2015 11:26:14 +0000 (11:26 +0000)]
clang-format: Fix formatting of multiple lambdas in initializers.
Before:
SomeFunction({[&] {
// comment
},
[&] {
// comment
}});
After:
SomeFunction({[&] {
// comment
},
[&] {
// comment
}});
llvm-svn: 242138
Ewan Crawford [Tue, 14 Jul 2015 10:56:58 +0000 (10:56 +0000)]
Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a function call on target via register manipulation
For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support.
Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls.
In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation.
To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter.
The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values.
Reviewers: jingham, spyffe
Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427
Differential Revision: http://reviews.llvm.org/D9404
llvm-svn: 242137
Tobias Grosser [Tue, 14 Jul 2015 10:52:58 +0000 (10:52 +0000)]
Mark a couple of items as completed
llvm-svn: 242136
Tobias Grosser [Tue, 14 Jul 2015 10:45:03 +0000 (10:45 +0000)]
Drop outdated video
llvm-svn: 242135
Tobias Grosser [Tue, 14 Jul 2015 10:44:06 +0000 (10:44 +0000)]
www: Add link to llvm.org
llvm-svn: 242134
Alexey Bataev [Tue, 14 Jul 2015 10:32:29 +0000 (10:32 +0000)]
[OPENMP] Drop type qualifiers from private variables.
If the variable is marked as private in OpenMP construct, the reference to this variable should not keep type qualifiers for the original variable. Private copy is not volatile or constant, so we can use unqualified type for private copy.
llvm-svn: 242133
Serge Pavlov [Tue, 14 Jul 2015 10:02:10 +0000 (10:02 +0000)]
Classes inside lambdas are local not nested.
If a lambda used as default argument in a method declaration contained
a local class, that class was incorrectly recognized as nested class.
In this case compiler tried to postpone parsing of this class until
the enclosing class is finished, which caused crashes in some cases.
This change fixes PR13987.
Differential Revision: http://reviews.llvm.org/D11006
llvm-svn: 242132
NAKAMURA Takumi [Tue, 14 Jul 2015 09:45:28 +0000 (09:45 +0000)]
Tweak clang/test/PCH/chain-openmp-threadprivate.cpp to satisfy i686-win32.
llvm-svn: 242131
Tobias Grosser [Tue, 14 Jul 2015 09:33:13 +0000 (09:33 +0000)]
Use schedule trees to represent execution order of statements
Instead of flat schedules, we now use so-called schedule trees to represent the
execution order of the statements in a SCoP. Schedule trees make it a lot easier
to analyze, understand and modify properties of a schedule, as specific nodes
in the tree can be choosen and possibly replaced.
This patch does not yet fully move our DependenceInfo pass to schedule trees,
as some additional performance analysis is needed here. (In general schedule
trees should be faster in compile-time, as the more structured representation
is generally easier to analyze and work with). We also can not yet perform the
reduction analysis on schedule trees.
For more information regarding schedule trees, please see Section 6 of
https://lirias.kuleuven.be/handle/
123456789/497238
llvm-svn: 242130
Chandler Carruth [Tue, 14 Jul 2015 08:42:39 +0000 (08:42 +0000)]
[PM/AA] Reformat GlobalsModRef so that subsequent patches I make here
don't continually introduce formatting deltas. NFC
llvm-svn: 242129
Petr Pavlu [Tue, 14 Jul 2015 08:00:34 +0000 (08:00 +0000)]
Fix comment typo
Test commit access.
llvm-svn: 242128
Alexey Bataev [Tue, 14 Jul 2015 07:55:48 +0000 (07:55 +0000)]
Fix for clang memcpyizer bugs 23911 and 23924 (patch by Denis Zobnin)
The fix is to remove duplicate copy-initialization of the only memcpy-able struct member and to correct the address of aggregately initialized members in destructors' calls during stack unwinding (in order to obtain address of struct member by using GEP instead of 'bitcast').
Differential Revision: http://reviews.llvm.org/D10990
llvm-svn: 242127
David Majnemer [Tue, 14 Jul 2015 06:19:58 +0000 (06:19 +0000)]
[SROA] Don't de-atomic volatile loads and stores
Volatile loads and stores are made visible in global state regardless of
what memory is involved. It is not correct to disregard the ordering
and synchronization scope because it is possible to synchronize with
memory operations performed by hardware.
This partially addresses PR23737.
llvm-svn: 242126
Yaron Keren [Tue, 14 Jul 2015 06:01:14 +0000 (06:01 +0000)]
Fix test for Visual C++ link.exe.
llvm-svn: 242125
Yaron Keren [Tue, 14 Jul 2015 05:58:56 +0000 (05:58 +0000)]
Fix test for Visual C++.
llvm-svn: 242124
Yaron Keren [Tue, 14 Jul 2015 05:51:05 +0000 (05:51 +0000)]
Generate correct asm info for mingw and cygwin ARM targets.
http://reviews.llvm.org/D11075
Patch by Martell Malone
Reviewed by Reid Kleckner
llvm-svn: 242123
Kate Stone [Tue, 14 Jul 2015 05:48:36 +0000 (05:48 +0000)]
Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting.
Existing commands supplying this type of help content have been reworked to take advantage of the changes. In addition to formatting changes, content was changes for accuracy and clarity purposes.
<rdar://problem/
21269977>
llvm-svn: 242122
Yaron Keren [Tue, 14 Jul 2015 05:23:34 +0000 (05:23 +0000)]
Add support for -fuse-ld= in the mingw toolchain driver.
We will still default to ld until such a time lld become a
stable release. lld supports arm NT under the machine name "thumb2pe".
http://reviews.llvm.org/D11088
Patch by Martell Malone
Reviewed by Reid Kleckner
llvm-svn: 242121
NAKAMURA Takumi [Tue, 14 Jul 2015 05:12:53 +0000 (05:12 +0000)]
[CMake] Unbreak add_llvm_external_project when external projects are specified.
LLVM_EXTERNAL_*_SOURCE_DIR is reset as PATH with set(CACHE PATH).
Then the CACHE PATH variable, LLVM_EXTERNAL_*_SOURCE_DIR, is normalized as
${CMAKE_SOURCE_DIR}/${path_var} if ${path_var} is relative.
llvm-svn: 242120
Jason Molenda [Tue, 14 Jul 2015 04:51:05 +0000 (04:51 +0000)]
Fix off-by-one error in the packet decompression routine
that would not pass through empty ("unsupported packet") replies
correctly.
llvm-svn: 242119
Michael J. Spencer [Tue, 14 Jul 2015 04:49:48 +0000 (04:49 +0000)]
Revert ELF port. Posting to mailing list.
llvm-svn: 242118
NAKAMURA Takumi [Tue, 14 Jul 2015 04:03:49 +0000 (04:03 +0000)]
Prune trailing whitespaces and CRs.
llvm-svn: 242117
NAKAMURA Takumi [Tue, 14 Jul 2015 04:00:18 +0000 (04:00 +0000)]
Mark clang/test/PCH/chain-openmp-threadprivate.cpp as REQUIRES:tls.
llvm-svn: 242116
NAKAMURA Takumi [Tue, 14 Jul 2015 03:57:11 +0000 (03:57 +0000)]
clang/test/lit.cfg: Introduce the feature "tls", for targeting cygwin.
Thread local storage is not implemented for targeting cygwin.
llvm-svn: 242115
Dawn Perchik [Tue, 14 Jul 2015 03:50:10 +0000 (03:50 +0000)]
Fix debugserver build breakage on Mavericks after lldb commit svn 240728
vm_kernel_page_size appears to not be defined on OSX Mavericks, so the
build fails. This patch fixes the build by calculating the pagesize if
_VM_PAGE_SIZE_H_ is not defined.
llvm-svn: 242114
Chaoren Lin [Tue, 14 Jul 2015 03:18:23 +0000 (03:18 +0000)]
Fix FreeBSD build.
llvm-svn: 242113
Rui Ueyama [Tue, 14 Jul 2015 03:09:59 +0000 (03:09 +0000)]
Revert "Make COFF linker work when it's built by clang again."
This reverts commit r242006. The original issue in Clang was fixed in r242009,
so we can now safely use std::atomic_flag.
llvm-svn: 242112
NAKAMURA Takumi [Tue, 14 Jul 2015 03:07:06 +0000 (03:07 +0000)]
Give an explicit triple to llvm/test/CodeGen/X86/pr13577.ll.
llvm-svn: 242111
Rui Ueyama [Tue, 14 Jul 2015 02:58:13 +0000 (02:58 +0000)]
COFF: Fix entry name inference for x86.
Entry name selection rule is already complicated on x64, but it's more
complicated on x86 because of the underscore name mangling scheme.
If one of _main, _main@<number> (a C function) or ?main@@... (a C++ function)
is defined, entry name is _mainCRTStartup. If _wmain, _wmain@<number or
?wmain@@... is defined, entry name is _wmainCRTStartup. And so on.
llvm-svn: 242110
Richard Smith [Tue, 14 Jul 2015 02:40:33 +0000 (02:40 +0000)]
Add file missed from r242105.
llvm-svn: 242109
Matthias Braun [Tue, 14 Jul 2015 02:09:57 +0000 (02:09 +0000)]
Revert "LegalizeDAG: Fix and improve FCOPYSIGN/FABS legalization"
Accidental commit, needs review first.
This reverts commit r242107.
llvm-svn: 242108
Matthias Braun [Tue, 14 Jul 2015 02:08:26 +0000 (02:08 +0000)]
LegalizeDAG: Fix and improve FCOPYSIGN/FABS legalization
- Factor out code to query and modify the sign bit of a floatingpoint
value as an integer. This also works if none of the targets integer
types is big enough to hold all bits of the floatingpoint value.
- Legalize FABS(x) as FCOPYSIGN(x, 0.0) if FCOPYSIGN is available,
otherwise perform bit manipulation on the sign bit. The previous code
used "x >u 0 ? x : -x" which is incorrect for x being -0.0! It also
takes 34 instructions on ARM Cortex-M4. With this patch we only
require 5:
vldr d0, LCPI0_0
vmov r2, r3, d0
lsrs r2, r3, #31
bfi r1, r2, #31, #1
bx lr
(This could be further improved if the compiler would recognize that
r2, r3 is zero).
- Only lower FCOPYSIGN(x, y) = sign(x) ? -FABS(x) : FABS(x) if FABS is
available otherwise perform bit manipulation on the sign bit.
- Perform the sign(x) test by masking out the sign bit and comparing
with 0 rather than shifting the sign bit to the highest position and
testing for "<s 0". For x86 copysignl (on 80bit values) this gets us:
testl $32768, %eax
rather than:
shlq $48, %rax
sets %al
testb %al, %al
llvm-svn: 242107
Matthias Braun [Tue, 14 Jul 2015 02:08:23 +0000 (02:08 +0000)]
X86: Check output of x86 copysignl testcase.
This makes the changes in an upcoming patch visible.
llvm-svn: 242106
Richard Smith [Tue, 14 Jul 2015 02:06:01 +0000 (02:06 +0000)]
[modules] When diagnosing errors in module map files found by 'extern module' declarations, show how we got to that module map file.
llvm-svn: 242105
Andrew Wilkins [Tue, 14 Jul 2015 01:23:06 +0000 (01:23 +0000)]
Add capability to get and set the personalitty function from the C API
Summary:
The capability was lost with D10429 where the personality function was set at function level rather than landing pad level. Now there is no way to get/set the personality function from the C API. That is a problem.
Note that the whole thing could be avoided by improving the C API testing, as started by D10725
Reviewers: chandlerc, bogner, majnemer, andrew.w.kaylor, rafael, rnk, axw
Subscribers: rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D10946
llvm-svn: 242104
Chris Bieneman [Tue, 14 Jul 2015 01:19:07 +0000 (01:19 +0000)]
[CMake] Forgot to quote the first part of STREQUAL.
llvm-svn: 242103
Chris Bieneman [Tue, 14 Jul 2015 01:17:43 +0000 (01:17 +0000)]
[CMake] We shouldn't be storing values in the cache unless they actually need CMake cache behavior.
add_llvm_external_project puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache even if it is just the in-tree default path. This causes all sorts of oddness, and makes it so that I can't change the behavior of this variable.
This patch never puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache. It will only end up in the cache if it is specified on the command line, which is the correct behavior.
There is also a temporary change to remove non-default values from the cache if they are already present. This should have the impact of cleaning out unncecissary values from the caches on the buildbots and people's local build directories. This part of the change is marked with a TODO and can be removed in a few days.
llvm-svn: 242102
Chaoren Lin [Tue, 14 Jul 2015 01:09:28 +0000 (01:09 +0000)]
Refactor Unix signals.
Summary:
- Consolidate Unix signals selection in UnixSignals.
- Make Unix signals available from platform.
- Add jSignalsInfo packet to retrieve Unix signals from remote platform.
- Get a copy of the platform signal for each remote process.
- Update SB API for signals.
- Update signal utility in test suite.
Reviewers: ovyalov, clayborg
Subscribers: chaoren, jingham, labath, emaste, tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D11094
llvm-svn: 242101
Rafael Espindola [Tue, 14 Jul 2015 01:06:16 +0000 (01:06 +0000)]
Add a herper function. NFC.
llvm-svn: 242100
Adrian Prantl [Tue, 14 Jul 2015 01:04:40 +0000 (01:04 +0000)]
Remove a completely redundant initialization of llvm::TimePassesIsEnabled,
which is actually the variable backing up the llvm -time-passes command
line argument.
llvm::TimePassesIsEnabled is actually being initialized in CodeGenAction.
llvm-svn: 242099
Michael J. Spencer [Tue, 14 Jul 2015 01:02:37 +0000 (01:02 +0000)]
Fix warnings.
llvm-svn: 242098
Evgeniy Stepanov [Tue, 14 Jul 2015 00:34:50 +0000 (00:34 +0000)]
Basic code generation for MSan use-after-dtor.
Under the -fsanitize-memory-use-after-dtor (disabled by default) insert
an MSan runtime library call at the end of every destructor.
Patch by Naomi Musgrave.
llvm-svn: 242097
Rafael Auler [Tue, 14 Jul 2015 00:34:43 +0000 (00:34 +0000)]
[LinkerScript] Don't create unnecessarily large segments
When using a linker script expression to change the address of a section, even
if the new address is more than a page of distance from the old address, lld
may put everything in the same segment, forcing it to be unnecessarily large.
This patch changes the logic in Segment::assignVirtualAddress() and
Segment::assignFileOffsets() to allow the segment to be sliced into two or more
if it detects a linker script expression that changes a section address.
Differential Revision: http://reviews.llvm.org/D10952
llvm-svn: 242096
Alex Lorenz [Tue, 14 Jul 2015 00:26:26 +0000 (00:26 +0000)]
MIR Serialization: Serialize the variable sized stack objects.
llvm-svn: 242095
Richard Smith [Tue, 14 Jul 2015 00:26:00 +0000 (00:26 +0000)]
Extend -ftime-report to give more information about time spent reading module files.
llvm-svn: 242094
Michael J. Spencer [Tue, 14 Jul 2015 00:22:00 +0000 (00:22 +0000)]
Put explicit template instantiations in the correct namespace.
llvm-svn: 242093
Michael J. Spencer [Tue, 14 Jul 2015 00:11:38 +0000 (00:11 +0000)]
Remove commented out code.
llvm-svn: 242092
Reid Kleckner [Tue, 14 Jul 2015 00:11:08 +0000 (00:11 +0000)]
Update enforceKnownAlignment after the isWeakForLinker semantic change
Previously we would refrain from attempting to increase the linkage of
available_externally globals because they were considered weak for the
linker. Now they are treated more like a declaration instead of a weak
definition.
This was causing SSE alignment faults in Chromuim, when some code
assumed it could increase the alignment of a dllimported global that it
didn't control. http://crbug.com/509256
llvm-svn: 242091
Samuel Antao [Tue, 14 Jul 2015 00:09:50 +0000 (00:09 +0000)]
[OpenMP] Add REQUIRES pragma to threadprivate regression tests.
llvm-svn: 242090
Rafael Auler [Mon, 13 Jul 2015 23:52:58 +0000 (23:52 +0000)]
[LinkerScript] Fix bug in Segment::assignVirtualAddress()
When calculating the start address and size of a segment, lld mistakenly
attributed the start address of the last segment slice to the whole segment
when it should consider the start address of the first slice. In this case, in a
multi-slice segment, Segment::assignVirtualAddress() will return a wrong
segment start address to TargetLayout::assignVirtualAddress(). The effect of
this miscalculation is to allocate some program headers in unnecessarily far
away addresses. This commit fixes this.
Differential Revision: http://reviews.llvm.org/D10951
llvm-svn: 242089
Michael J. Spencer [Mon, 13 Jul 2015 23:48:06 +0000 (23:48 +0000)]
Initial ELF port.
This is a direct port of the new PE/COFF linker to ELF.
It can take a single object file and generate a valid executable that executes at the first byte in the text section.
llvm-svn: 242088
David Majnemer [Mon, 13 Jul 2015 23:39:37 +0000 (23:39 +0000)]
[Intrin.h] Use __ATOMIC_SEQ_CST instead of '5'
No functionality change is intended.
llvm-svn: 242087
David Majnemer [Mon, 13 Jul 2015 23:38:56 +0000 (23:38 +0000)]
[Intrin.h] Make the variable names more consistent
No functionality change intended.
llvm-svn: 242086
Artem Belevich [Mon, 13 Jul 2015 23:27:56 +0000 (23:27 +0000)]
[cuda] Driver changes to compile and stitch together host and device-side CUDA code.
NOTE: reverts r242077 to reinstate r242058, r242065, 242067
and includes fix for OS X test failures.
- Changed driver pipeline to compile host and device side of CUDA
files and incorporate results of device-side compilation into host
object file.
- Added a test for cuda pipeline creation in clang driver.
New clang options:
--cuda-host-only - Do host-side compilation only.
--cuda-device-only - Do device-side compilation only.
--cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side
compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more
than once in which case one device-compilation will be done per
unique specified GPU architecture.
Differential Revision: http://reviews.llvm.org/D9509
llvm-svn: 242085
Alex Lorenz [Mon, 13 Jul 2015 23:24:34 +0000 (23:24 +0000)]
MIR Serialization: Serialize the sub register indices.
This commit serializes the sub register indices from the register machine
operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242084
Rafael Espindola [Mon, 13 Jul 2015 23:14:26 +0000 (23:14 +0000)]
Add missing file.
Sorry about that.
llvm-svn: 242083
Rafael Espindola [Mon, 13 Jul 2015 23:07:05 +0000 (23:07 +0000)]
Fix reading archive members with / in the name.
This is important for thin archives.
llvm-svn: 242082
Bill Schmidt [Mon, 13 Jul 2015 22:58:19 +0000 (22:58 +0000)]
[PPC64LE] More improvements to VSX swap optimization
This patch allows VSX swap optimization to succeed more frequently.
Specifically, it is concerned with common code sequences that occur
when copying a scalar floating-point value to a vector register. This
patch currently handles cases where the floating-point value is
already in a register, but does not yet handle loads (such as via an
LXSDX scalar floating-point VSX load). That will be dealt with later.
A typical case is when a scalar value comes in as a floating-point
parameter. The value is copied into a virtual VSFRC register, and
then a sequence of SUBREG_TO_REG and/or COPY operations will convert
it to a full vector register of the class required by the context. If
this vector register is then used as part of a lane-permuted
computation, the original scalar value will be in the wrong lane. We
can fix this by adding a swap operation following any widening
SUBREG_TO_REG operation. Additional COPY operations may be needed
around the swap operation in order to keep register assignment happy,
but these are pro forma operations that will be removed by coalescing.
If a scalar value is otherwise directly referenced in a computation
(such as by one of the many XS* vector-scalar operations), we
currently disable swap optimization. These operations are
lane-sensitive by definition. A MentionsPartialVR flag is added for
use in each swap table entry that mentions a scalar floating-point
register without having special handling defined.
A common idiom for PPC64LE is to convert a double-precision scalar to
a vector by performing a splat operation. This ensures that the value
can be referenced as V[0], as it would be for big endian, whereas just
converting the scalar to a vector with a SUBREG_TO_REG operation
leaves this value only in V[1]. A doubleword splat operation is one
form of an XXPERMDI instruction, which takes one doubleword from a
first operand and another doubleword from a second operand, with a
two-bit selector operand indicating which doublewords are chosen. In
the general case, an XXPERMDI can be permitted in a lane-swapped
region provided that it is properly transformed to select the
corresponding swapped values. This transformation is to reverse the
order of the two input operands, and to reverse and complement the
bits of the selector operand (derivation left as an exercise to the
reader ;).
A new test case that exercises the scalar-to-vector and generalized
XXPERMDI transformations is added as CodeGen/PowerPC/swaps-le-5.ll.
The patch also requires a change to CodeGen/PowerPC/swaps-le-3.ll to
use CHECK-DAG instead of CHECK for two independent instructions that
now appear in reverse order.
There are two small unrelated changes that are added with this patch.
First, the XXSLDWI instruction was incorrectly omitted from the list
of lane-sensitive instructions; this is now fixed. Second, I observed
that the same webs were being rejected over and over again for
different reasons. Since it's sufficient to reject a web only once, I
added a check for this to speed up the compilation time slightly.
llvm-svn: 242081
Samuel Antao [Mon, 13 Jul 2015 22:54:53 +0000 (22:54 +0000)]
[OpenMP] Add TLS-based implementation for threadprivate directive.
llvm-svn: 242080
Adrian McCarthy [Mon, 13 Jul 2015 22:35:44 +0000 (22:35 +0000)]
Fix Windows build break related to MainLoop.
llvm-svn: 242079
Rui Ueyama [Mon, 13 Jul 2015 22:31:45 +0000 (22:31 +0000)]
COFF: Fix x86 delay-load helper function name.
If /delayload option is given, we have to resolve __delayLoadHelper2
since the function is the dynamic loader to delay-load DLLs.
The function name is mangled in x86 as ___delayLoadHelper2@8.
llvm-svn: 242078
Rafael Espindola [Mon, 13 Jul 2015 22:26:30 +0000 (22:26 +0000)]
This reverts commit r242058, r242065, r242067.
The tests were failing on OS X.
Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code."
Revert "Fixed regex to properly match '64' in the test case."
Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least."
llvm-svn: 242077
Greg Clayton [Mon, 13 Jul 2015 22:08:16 +0000 (22:08 +0000)]
Don't crash if we are unable to get the member type.
<rdar://problem/
21624447>
llvm-svn: 242076
Rui Ueyama [Mon, 13 Jul 2015 22:01:27 +0000 (22:01 +0000)]
COFF: Inline Defined::getRVA because it's very hot.
llvm-svn: 242075
Rafael Espindola [Mon, 13 Jul 2015 22:01:02 +0000 (22:01 +0000)]
Use std::make_tuple to reduce code duplication.
Thanks to David Blaikie for the suggestion.
llvm-svn: 242074
Pete Cooper [Mon, 13 Jul 2015 21:50:35 +0000 (21:50 +0000)]
Remove unnecessary lines from the test in r242068.
This test case was breaking the hexagon elf bot. The failing lines
were actually unnecessary as checking that the store still reads the
correct value demonstrates that everything is working fine now.
llvm-svn: 242073
Nico Weber [Mon, 13 Jul 2015 21:33:21 +0000 (21:33 +0000)]
Reduce memory usage of ComputeEditDistance() by (almost) 50%
ComputeEditDistance() currently keeps two rows of the edit distance matrix in
memory. That's unnecessary, one row plus one additional element are sufficient.
With this change, strings up to 64 chars can be processed without going to the
heap, compared to 32 chars previously. (But the main motivation is that the
code gets a bit simpler.)
No intended behavior change.
llvm-svn: 242069
Pete Cooper [Mon, 13 Jul 2015 21:25:33 +0000 (21:25 +0000)]
Loop idiom recognizer was replacing too many uses of popcount.
When spotting that a loop can use ctpop, we were incorrectly replacing all uses of a value with a value derived from ctpop.
The bug here was exposed because we were replacing a use prior to the ctpop with the ctpop value and so we have a use before def, i.e., we changed
%tobool.5 = icmp ne i32 %num, 0
store i1 %tobool.5, i1* %ptr
br i1 %tobool.5, label %for.body.lr.ph, label %for.end
to
store i1 %1, i1* %ptr
%0 = call i32 @llvm.ctpop.i32(i32 %num)
%1 = icmp ne i32 %0, 0
br i1 %1, label %for.body.lr.ph, label %for.end
Even if we inserted the ctpop so that it dominates the store here, that would still be incorrect. The store doesn’t want the result of ctpop.
The fix is very simple, and involves replacing only the branch condition with the ctpop instead of all uses.
Reviewed by Hal Finkel.
llvm-svn: 242068
NAKAMURA Takumi [Mon, 13 Jul 2015 21:18:53 +0000 (21:18 +0000)]
clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least.
llvm-svn: 242067
Rui Ueyama [Mon, 13 Jul 2015 20:56:31 +0000 (20:56 +0000)]
COFF: Split createSymbolAndSymbolTable to small functions. NFC.
llvm-svn: 242066
Artem Belevich [Mon, 13 Jul 2015 20:49:50 +0000 (20:49 +0000)]
Fixed regex to properly match '64' in the test case.
llvm-svn: 242065
Benjamin Kramer [Mon, 13 Jul 2015 20:42:13 +0000 (20:42 +0000)]
Move class into an anonymous namespace. NFC.
llvm-svn: 242064
Reid Kleckner [Mon, 13 Jul 2015 20:41:46 +0000 (20:41 +0000)]
[WinEH] Emit the LSDA even if no lpads remain but outlining occurred
The outlined funclets call intrinsics which reference labels from the
LSDA. This situation can easily arise in small functions with a single
cleanup at -O0, where Clang marks a definition as nounwind, and then
WinEHPrepare "discovers" that the landingpad is dead by accident and
deletes it.
We now need to ask the LLVM IR Function for it's personality directly,
rather than going through MachineModuleInfo.
Fixes PR23892.
llvm-svn: 242063
Benjamin Kramer [Mon, 13 Jul 2015 20:38:16 +0000 (20:38 +0000)]
[Hexagon] Move BitTracker into the llvm namespace and remove redundant qualifications
No functional change intended.
llvm-svn: 242062
Rafael Espindola [Mon, 13 Jul 2015 20:38:09 +0000 (20:38 +0000)]
Add support deterministic output in llvm-ar and make it the default.
llvm-svn: 242061
Chris Bieneman [Mon, 13 Jul 2015 20:30:58 +0000 (20:30 +0000)]
Revert "[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working."
Reverting r242059 because it broke some bots. I'm attempting to reproduce the failures now.
llvm-svn: 242060
Chris Bieneman [Mon, 13 Jul 2015 20:23:15 +0000 (20:23 +0000)]
[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working.
Summary:
This change re-lands r241621, with an additional fix that was required to allow tool sources to live outside the llvm checkout. It also no longer renames LLVM_EXTERNAL_*_SOURCE_DIR. This change was reverted in r241663, because it renamed several variables of the format LLVM_EXTERNAL_*_* to LLVM_TOOL_*_*.
Original Summary:
The tools CMakeLists file already had implicit tool registration, but there were a few things off about it that needed to be altered to make it work. This change addresses all that. The changes in this patch are:
* factored out canonicalizing tool names from paths to CMake variables * removed the LLVM_IMPLICIT_PROJECT_IGNORE mechanism in favor of LLVM_EXTERNAL_${nameUPPER}_BUILD which I renamed to LLVM_TOOL_${nameUPPER}_BUILD because it applies to internal and external tools
* removed ignore_llvm_tool_subdirectory() in favor of just setting LLVM_TOOL_${nameUPPER}_BUILD to Off
* Added create_llvm_tool_options() to resolve a bug in add_llvm_external_project() - the old LLVM_EXTERNAL_${nameUPPER}_BUILD would not work on a clean CMake directory because the option could be created after it was set in code.
* Removed all but the minimum required calls to add_llvm_external_project from tools/CMakeLists.txt
Differential Revision: http://reviews.llvm.org/D10665
llvm-svn: 242059
Artem Belevich [Mon, 13 Jul 2015 20:21:06 +0000 (20:21 +0000)]
[cuda] Driver changes to compile and stitch together host and device-side CUDA code.
- Changed driver pipeline to compile host and device side of CUDA
files and incorporate results of device-side compilation into host
object file.
- Added a test for cuda pipeline creation in clang driver.
New clang options:
--cuda-host-only - Do host-side compilation only.
--cuda-device-only - Do device-side compilation only.
--cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side
compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more
than once in which case one device-compilation will be done per
unique specified GPU architecture.
Differential Revision: http://reviews.llvm.org/D9509
llvm-svn: 242058
Dawn Perchik [Mon, 13 Jul 2015 20:16:13 +0000 (20:16 +0000)]
[lldb-mi] Add const qualifier to vMITextLine in InterpretCommandThisDriver.
llvm-svn: 242057
Marshall Clow [Mon, 13 Jul 2015 20:04:56 +0000 (20:04 +0000)]
Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
llvm-svn: 242056
Ben Langmuir [Mon, 13 Jul 2015 19:48:52 +0000 (19:48 +0000)]
[Modules] Allow missing header before a missing requirement
And make the module unavailable without breaking any parent modules.
If there's a missing requirement after we've already seen a missing
header, still update the IsMissingRequiement bit correctly. Also,
diagnose missing requirements before missing headers, since the
existence of the header is moot if there are missing requirements.
llvm-svn: 242055
Keno Fischer [Mon, 13 Jul 2015 19:41:51 +0000 (19:41 +0000)]
[CMake] Add missing DebugInfo libraries to llvm-shlib
Reviewers: beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11128
llvm-svn: 242054
Matt Arsenault [Mon, 13 Jul 2015 19:08:36 +0000 (19:08 +0000)]
AMDGPU: Minor cleanups to always inline pass
llvm-svn: 242053
Jonathan Peyton [Mon, 13 Jul 2015 18:55:45 +0000 (18:55 +0000)]
Fix some bugs in OMPT support
1.) in kmp_csupport.c, move computation of parameters only needed for OMPT tracing
inside a conditional to reduce overhead if not receiving ompt_event_master_begin
callbacks.
2.) in kmp_gsupport.c, remove spurious reset of OMPT reenter_runtime_frame (which
is set in its caller, GOMP_parallel_start correct placement of #if OMP_TRACE so
that state is maintained even if tracing support not included.
3.) in z_Linux_util.c, add architecture independent support for OMPT by setting
and resetting OMPT's exit_frame_ptr before and after invoking a microtask.
4.) On the Intel MIC, the loader refuses to retain static symbols in the
libomp.so shared library, even though tools need them. The loader could not be
bullied into doing so. To accommodate this, I changed the visibility of OMPT
placeholder functions to public. This required additions in exports.so.txt,
adding extern "C" scoping in ompt-general.c so that the public placeholder
symbols won't be mangled.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D11062
llvm-svn: 242052
Nico Weber [Mon, 13 Jul 2015 18:54:56 +0000 (18:54 +0000)]
clang-cl: For files setting output names, mention which flags they belong to.
It always takes me a while to figure out how to say "preprocess to file
foo.txt" with clang-cl. With this, it might be easier.
http://reviews.llvm.org/D10890
llvm-svn: 242051