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
Rafael Espindola [Mon, 13 Jul 2015 13:55:18 +0000 (13:55 +0000)]
Print the visibility of available_externally functions.
We were already printing it for declarations, but not available_externally.
llvm-svn: 242027
Manuel Klimek [Mon, 13 Jul 2015 13:50:55 +0000 (13:50 +0000)]
Revert r241981 "Revert "Revert r236894 "[BasicAA] Fix zext & sext handling"""
The repros from PR23626 still fail.
llvm-svn: 242025
Elena Demikhovsky [Mon, 13 Jul 2015 13:26:20 +0000 (13:26 +0000)]
AVX-512: Added all AVX-512 forms of Vector Convert for Float/Double/Int/Long types.
In this patch I have only encoding. Intrinsics and DAG lowering will be in the next patch.
I temporary removed the old intrinsics test (just to split this patch).
Half types are not covered here.
Differential Revision: http://reviews.llvm.org/D11134
llvm-svn: 242023
Pavel Labath [Mon, 13 Jul 2015 12:27:28 +0000 (12:27 +0000)]
Avoid dependency on uuid.h in MacOSXDYLD
Summary:
r241964 has added a dependency on uuid.h, which (on linux at least) necessitates instalation of a
new package. Since the only thing we need from that file is uuid_t (and this is already defined
in UuidCompatibility.h), we can avoid this dependency by making this include __APPLE__ specific.
If in future, we need more from this library, we can revisit this decision.
Reviewers: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11135
llvm-svn: 242022
Ulrich Weigand [Mon, 13 Jul 2015 11:52:14 +0000 (11:52 +0000)]
Update comment
As noticed by David Majnemer, update an out-of-date comment in
CGClass.cpp after the r241916 commit.
llvm-svn: 242021
Pawel Bylica [Mon, 13 Jul 2015 11:25:56 +0000 (11:25 +0000)]
[llvm-stress] Remove unneeded llvm:: prefix. NFC.
llvm-svn: 242020
Tamas Berghammer [Mon, 13 Jul 2015 10:50:55 +0000 (10:50 +0000)]
Remove hack about the size of long doubles from DataExtractor
The size of a long double was hardcoded in DataExtractor for x86 and
x86_64 architectures. This CL removes the hard coded values and use the
actual size based on the floating point semantics specified.
Differential revision: http://reviews.llvm.org/D8417
llvm-svn: 242019
Pavel Labath [Mon, 13 Jul 2015 10:44:55 +0000 (10:44 +0000)]
Introduce a MainLoop class and switch llgs to use it
Summary:
This is the first part of our effort to make llgs single threaded. Currently, llgs consists of
about three threads and the synchronisation between them is a major source of latency when
debugging linux and android applications.
In order to be able to go single threaded, we must have the ability to listen for events from
multiple sources (primarily, client commands coming over the network and debug events from the
inferior) and perform necessary actions. For this reason I introduce the concept of a MainLoop.
A main loop has the ability to register callback's which will be invoked upon receipt of certain
events. MainLoopPosix has the ability to listen for file descriptors and signals.
For the moment, I have merely made the GDBRemoteCommunicationServerLLGS class use MainLoop
instead of waiting on the network socket directly, but the other threads still remain. In the
followup patches I indend to migrate NativeProcessLinux to this class and remove the remaining
threads.
Reviewers: ovyalov, clayborg, amccarth, zturner, emaste
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D11066
llvm-svn: 242018
Tamas Berghammer [Mon, 13 Jul 2015 09:54:41 +0000 (09:54 +0000)]
Skip oatdata and oatexec symbols in system@framework@boot.oat
On Android the oatdata and the oatexec symbols in
system@framework@boot.oat covers the full .text section what causes
issues with displaying unusable symbol name to the user and very slow
unwinding speed because the instruction emulation based unwind plans
try to emulate all instructions in these symbols. Don't add these
symbols to the symbol list as they have no use for the debugger and
they are causing a lot of trouble.
Differential revision: http://reviews.llvm.org/D11065
llvm-svn: 242017
Sagar Thakur [Mon, 13 Jul 2015 09:52:06 +0000 (09:52 +0000)]
[LLDB][MIPS] Add mips cores in cores_match () in ArchSpec
This patch:
- Allows mips32 cores to match with any mips32/mips64 cores.
- Allows mips32r2 cores to match with core only up-to mips32r2/mips64r2.
- Allows mips32r3 cores to match with core only up-to mips32r3/mips64r3.
- Allows mips32r5 cores to match with core only up-to mips32r3/mips64r5.
- Allows mips32r6 core to match with only mips32r6/mips64r6 or mips32/mips64.
Reviewers: emaste, jaydeep, clayborg
Subscribers: mohit.bhakkad, nitesh.jain, bhushan, lldb-commits
Differential Revision: http://reviews.llvm.org/D10921
llvm-svn: 242016
Daniel Sanders [Mon, 13 Jul 2015 09:24:21 +0000 (09:24 +0000)]
[mips] Explained the 'w' modifier in the Inline Assembler documentation.
It exists for compatibility with GCC which requires it to print MSA registers
for the 'f' constraint. Although LLVM doesn't need it, the 'w' modifier should
still be used for portability between the two compilers.
llvm-svn: 242015
Simon Atanasyan [Mon, 13 Jul 2015 09:11:35 +0000 (09:11 +0000)]
[Mips] Support MIPS big-endian 32/64-bits targets
llvm-svn: 242014
Justin Bogner [Mon, 13 Jul 2015 06:39:53 +0000 (06:39 +0000)]
profile: Autoconf build system support for r241824
r241824 didn't update the autoconf build system to handle the new file
in the profile library.
llvm-svn: 242013