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
David Majnemer [Mon, 13 Jul 2015 18:51:15 +0000 (18:51 +0000)]
[MC] Correctly escape .safeseh's symbol
This fixes PR24107.
llvm-svn: 242050
Mark Heffernan [Mon, 13 Jul 2015 18:33:21 +0000 (18:33 +0000)]
Enable partial and runtime loop unrolling for NVPTX.
Enable partial and runtime loop unrolling for NVPTX backend via
TTI::UnrollingPreferences with a small threshold. This partially unrolls
small loops which are often unrolled by the PTX to SASS compiler
and unrolling earlier can be beneficial.
llvm-svn: 242049
Mark Heffernan [Mon, 13 Jul 2015 18:31:37 +0000 (18:31 +0000)]
Update documentation for unroll pragmas on loops with runtime trip counts.
This change updates the documentation for the loop unrolling pragma behavior
change in r242047. Specifically, with that change "#pragma unroll" will not
unroll loops with a runtime trip count.
llvm-svn: 242048
Mark Heffernan [Mon, 13 Jul 2015 18:26:27 +0000 (18:26 +0000)]
Enable runtime unrolling with unroll pragma metadata
Enable runtime unrolling for loops with unroll count metadata ("#pragma unroll N")
and a runtime trip count. Also, do not unroll loops with unroll full metadata if the
loop has a runtime loop count. Previously, such loops would be unrolled with a
very large threshold (pragma-unroll-threshold) if runtime unrolled happened to be
enabled resulting in a very large (and likely unwise) unroll factor.
llvm-svn: 242047
Adrian Prantl [Mon, 13 Jul 2015 18:25:29 +0000 (18:25 +0000)]
Service the doxygen comments in DwarfUnit and DwarfDebug.
llvm-svn: 242046
Alex Lorenz [Mon, 13 Jul 2015 18:07:26 +0000 (18:07 +0000)]
MIR Serialization: Serialize the fixed stack objects.
This commit serializes the fixed stack objects, including fixed spill slots.
The fixed stack objects are serialized using a YAML sequence of YAML inline
mappings. Each mapping has the object's ID, type, size, offset, and alignment.
The objects that aren't spill slots also serialize the isImmutable and isAliased
flags.
The fixed stack objects are a part of the machine function's YAML mapping.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242045
Reid Kleckner [Mon, 13 Jul 2015 17:55:14 +0000 (17:55 +0000)]
[WinEH] Strip the \01 character from the __CxxFrameHandler3 thunk name
Add another C++ 32-bit EH table test.
llvm-svn: 242044
Andrey Churbanov [Mon, 13 Jul 2015 17:52:41 +0000 (17:52 +0000)]
fixed typo in debug assertion reported by John Mellor-Crummey
llvm-svn: 242043
Benjamin Kramer [Mon, 13 Jul 2015 17:21:31 +0000 (17:21 +0000)]
Remove macro guards for extern template instantiations.
This is a C++11 feature that both GCC and MSVC have supported as ane extension
long before C++11 was approved.
llvm-svn: 242042
Benjamin Kramer [Mon, 13 Jul 2015 17:21:14 +0000 (17:21 +0000)]
Avoid using Loop::getSubLoopsVector.
Passes should never modify it, just use the const version. While there
reduce copying in LoopInterchange. No functional change intended.
llvm-svn: 242041
James Y Knight [Mon, 13 Jul 2015 16:36:22 +0000 (16:36 +0000)]
Fix handling of the 'n' asm constraint with invalid operands.
It had accidently accepted a symbol+offset value (and emitted
incorrect code for it, keeping only the offset part) instead of
properly reporting the constraint as invalid.
Differential Revision: http://reviews.llvm.org/D11039
llvm-svn: 242040
Birunthan Mohanathas [Mon, 13 Jul 2015 16:19:34 +0000 (16:19 +0000)]
clang-format: Print token type name instead of number in -debug output
Differential Revision: http://reviews.llvm.org/D11125
llvm-svn: 242039
Tom Stellard [Mon, 13 Jul 2015 15:47:57 +0000 (15:47 +0000)]
AMDGPU/SI: Select mad patterns to v_mac_f32
The two-address instruction pass will convert these back to v_mad_f32
if necessary.
Differential Revision: http://reviews.llvm.org/D11060
llvm-svn: 242038
Logan Chien [Mon, 13 Jul 2015 15:37:30 +0000 (15:37 +0000)]
ARM: Fix cttz expansion on vector types.
The 64/128-bit vector types are legal if NEON instructions are
available. However, there was no matching patterns for @llvm.cttz.*()
intrinsics and result in fatal error.
This commit fixes the problem by lowering cttz to:
a. ctpop((x & -x) - 1)
b. width - ctlz(x & -x) - 1
llvm-svn: 242037
Scott Douglass [Mon, 13 Jul 2015 15:31:48 +0000 (15:31 +0000)]
[ARM] Handle commutativity when converting to tADDhirr in Thumb2
Also, run thumb_rewrite.s tests in Thumb2 now that they pass.
Differential Revision: http://reviews.llvm.org/D11132
llvm-svn: 242036
Scott Douglass [Mon, 13 Jul 2015 15:31:40 +0000 (15:31 +0000)]
[ARM] Add Thumb2 ADD with SP narrowing from 3 operand to 2
Differential Revision: http://reviews.llvm.org/D11131
llvm-svn: 242035
Scott Douglass [Mon, 13 Jul 2015 15:31:33 +0000 (15:31 +0000)]
[ARM] Small refactor of tryConvertingToTwoOperandForm (nfc)
Also, add more Thumb2 ADD tests requested during review of
http://reviews.llvm.org/D11053.
Differential Revision: http://reviews.llvm.org/D11130
llvm-svn: 242034
Silviu Baranga [Mon, 13 Jul 2015 14:48:24 +0000 (14:48 +0000)]
Cleanup after r241809 - remove uncessary call to std::sort
Summary:
The iteration order within a member of DepCands is deterministic
and therefore we don't have to sort the accesses within a member.
We also don't have to copy the indices of the pointers into a
vector, since we can iterate over the members of the class.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11145
llvm-svn: 242033
Rafael Espindola [Mon, 13 Jul 2015 14:43:33 +0000 (14:43 +0000)]
Remove unused variable.
Sorry I missed it in the previous commit.
llvm-svn: 242032
Rafael Espindola [Mon, 13 Jul 2015 14:39:02 +0000 (14:39 +0000)]
Aliases don't have available_externally linkage.
Allowing that is probably a good idea, but currently we don't, so
this is dead code.
llvm-svn: 242031
Rafael Espindola [Mon, 13 Jul 2015 14:18:22 +0000 (14:18 +0000)]
Don't change the visibility when converting a definition to a declaration.
llvm-svn: 242030
Ulrich Weigand [Mon, 13 Jul 2015 14:13:01 +0000 (14:13 +0000)]
Support alternate attribute spelling __enable_if__
Attribute names usually support an alternate spelling that uses double
underscores before and after the attribute name, like e.g. attribute
((__aligned__)) for attribute ((aligned)). This is necessary to allow
use of attributes in system headers without polluting the name space.
However, for attribute ((enable_if)) that alternate spelling does not
work correctly. This is because of code in Parser::ParseGNUAttributeArgs
(ParseDecl.cpp) that specifically checks for the "enable_if" spelling
without allowing the alternate spelling.
Similar code in ParseDecl.cpp uses the normalizeAttrName helper to allow
both spellings. This patch adds use of that helper for the "enable_if"
check as well, which fixes attribute ((__enable_if__)).
Differential Revision: http://reviews.llvm.org/D11142
llvm-svn: 242029
Aaron Ballman [Mon, 13 Jul 2015 14:04:30 +0000 (14:04 +0000)]
Removing several -Wunused-but-set-variable warnings; NFC intended.
llvm-svn: 242028