Simon Atanasyan [Thu, 17 Mar 2016 10:43:44 +0000 (10:43 +0000)]
[llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex format
It might be hard to recognize a hexadecimal number without '0x' prefix.
Besides that '0x' prefix corresponds to GNU objdump behaviour.
Differential Revision: http://reviews.llvm.org/D18207
llvm-svn: 263705
Simon Atanasyan [Thu, 17 Mar 2016 10:43:36 +0000 (10:43 +0000)]
[mips] Use `formatImm` call to print immediate value in the `MipsInstPrinter`
That allows, for example, to print hex-formatted immediates using
llvm-objdump --print-imm-hex command line option.
Differential Revision: http://reviews.llvm.org/D18195
llvm-svn: 263704
Scott Egerton [Thu, 17 Mar 2016 10:37:51 +0000 (10:37 +0000)]
[mips] Eliminate instances of "potentially uninitialised local variable" warnings, NFC
Summary:
This should eliminate all occurrences of this within LLVMMipsAsmParser.
This patch is in response to http://reviews.llvm.org/D17983. I was unable
to reproduce the warnings on my machine so please advise if this fixes the
warnings.
Reviewers: ariccio, vkalintiris, dsanders
Subscribers: dblaikie, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D18087
llvm-svn: 263703
Wilfred Hughes [Thu, 17 Mar 2016 10:20:58 +0000 (10:20 +0000)]
Remove obselete reference to TypeResolve from the tutorial.
TypeResolve went away in r134829 in 2011.
llvm-svn: 263702
Alexey Bataev [Thu, 17 Mar 2016 10:19:46 +0000 (10:19 +0000)]
[OPENMP 4.0] Use 'declare reduction' constructs in 'reduction' clauses.
OpenMP 4.0 allows to define custom reduction operations using '#pragma
omp declare reduction' construct. Patch allows to use this custom
defined reduction operations in 'reduction' clauses.
llvm-svn: 263701
Wilfred Hughes [Thu, 17 Mar 2016 10:18:13 +0000 (10:18 +0000)]
Minor grammar fix in kaleidoscope tutorial.
llvm-svn: 263700
Jonas Hahnfeld [Thu, 17 Mar 2016 10:00:24 +0000 (10:00 +0000)]
[libcxxabi] Disable cxa_thread_atexit_test if unavailable
The feature check is already in place when building the library but wasn't
honored for the tests.
Differential Revision: http://reviews.llvm.org/D18205
llvm-svn: 263699
Kuba Brecka [Thu, 17 Mar 2016 09:27:40 +0000 (09:27 +0000)]
Removing a non-intentional debug output that got committed in r263695.
llvm-svn: 263698
Wilfred Hughes [Thu, 17 Mar 2016 09:26:45 +0000 (09:26 +0000)]
Further typo fixes in kaleidoscope tutorial.
llvm-svn: 263697
Wilfred Hughes [Thu, 17 Mar 2016 09:09:07 +0000 (09:09 +0000)]
Fix typo in kaleidoscope tutorial.
llvm-svn: 263696
Kuba Brecka [Thu, 17 Mar 2016 08:37:25 +0000 (08:37 +0000)]
[sanitizer] On OS X, verify that interceptors work and abort if not, take 2
On OS X 10.11+, we have "automatic interceptors", so we don't need to use DYLD_INSERT_LIBRARIES when launching instrumented programs. However, non-instrumented programs that load TSan late (e.g. via dlopen) are currently broken, as TSan will still try to initialize, but the program will crash/hang at random places (because the interceptors don't work). This patch adds an explicit check that interceptors are working, and if not, it aborts and prints out an error message suggesting to explicitly use DYLD_INSERT_LIBRARIES.
TSan unit tests run with a statically linked runtime, where interceptors don't work. To avoid aborting the process in this case, the patch replaces `DisableReexec()` with a weak `ReexecDisabled()` function which is defined to return true in unit tests.
Differential Revision: http://reviews.llvm.org/D18212
llvm-svn: 263695
Junmo Park [Thu, 17 Mar 2016 06:41:27 +0000 (06:41 +0000)]
Minor code cleanups. NFC.
llvm-svn: 263694
George Rimar [Thu, 17 Mar 2016 05:57:33 +0000 (05:57 +0000)]
[ELF] - -pie/--pic-executable option implemented
-pie
--pic-executable
Create a position independent executable. This is currently only
supported on ELF platforms. Position independent executables are
similar to shared libraries in that they are relocated by the
dynamic linker to the virtual address the OS chooses for them
(which can vary between invocations). Like normal dynamically
linked executables they can be executed and symbols defined in the
executable cannot be overridden by shared libraries.
Differential revision: http://reviews.llvm.org/D18183
llvm-svn: 263693
David Majnemer [Thu, 17 Mar 2016 05:43:26 +0000 (05:43 +0000)]
[yaml2obj, COFF] Correctly handle section alignment
The section alignment field was marked optional but not provided a
default value: initialize it with 0.
While we are here, ensure that the section alignment is plausible.
llvm-svn: 263692
Bruno Cardoso Lopes [Thu, 17 Mar 2016 04:59:52 +0000 (04:59 +0000)]
[VFS] Remove wrong header include
Follow up from r263686. Forgot to remove the wrong header file.
llvm-svn: 263691
Davide Italiano [Thu, 17 Mar 2016 04:28:41 +0000 (04:28 +0000)]
[ELF] Use braces for muti-line if(s).
Reported by: Joerg Sonnenberg.
llvm-svn: 263690
Argyrios Kyrtzidis [Thu, 17 Mar 2016 04:28:19 +0000 (04:28 +0000)]
[index] Make sure that declarations of builtin functions are indexed.
rdar://
25154630
llvm-svn: 263689
Eric Fiselier [Thu, 17 Mar 2016 03:30:56 +0000 (03:30 +0000)]
Make std::addressof constexpr in C++17 (Clang only).
llvm-svn: 263688
Manman Ren [Thu, 17 Mar 2016 03:09:55 +0000 (03:09 +0000)]
Add an optional named argument (replacement = "xxx") to AvailabilityAttr.
This commit adds a named argument to AvailabilityAttr, while r263652 adds an
optional string argument to __attribute__((deprecated)). This enables the
compiler to provide Fix-Its for deprecated declarations.
rdar://
20588929
llvm-svn: 263687
Bruno Cardoso Lopes [Thu, 17 Mar 2016 02:20:43 +0000 (02:20 +0000)]
Reapply [2]: [VFS] Add support for handling path traversals
This was applied twice r261551 and 263617 and later reverted because:
(1) Windows bot failing on unittests. Change the current behavior to do
not handle path traversals on windows.
(2) Windows bot failed to include llvm/Config/config.h in order to use
HAVE_REALPATH. Use LLVM_ON_UNIX instead, as done in lib/Basic/FileManager.cpp.
Handle ".", ".." and "./" with trailing slashes while collecting files
to be dumped into the vfs overlay directory.
Include the support for symlinks into components. Given the path:
/install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin"
component is a symlink, it's not safe to use `path::remove_dots` here,
and `realpath` is used to get the right answer. Since `realpath`
is expensive, we only do it at collecting time (which only happens
during the crash reproducer) and cache the base directory for fast lookups.
Overall, this makes the input to the VFS YAML file to be canonicalized
to never contain traversal components.
Differential Revision: http://reviews.llvm.org/D17104
rdar://problem/
24499339
llvm-svn: 263686
Sanjoy Das [Thu, 17 Mar 2016 01:56:10 +0000 (01:56 +0000)]
[Statepoints] Separate out logic for statepoint directives; NFC
This splits out the logic that maps the `"statepoint-id"` attribute into
the actual statepoint ID, and the `"statepoint-num-patch-bytes"`
attribute into the number of patchable bytes the statpeoint is lowered
into. The new home of this logic is in IR/Statepoint.cpp, and this
refactoring will support similar functionality when lowering calls with
deopt operand bundles in the future.
llvm-svn: 263685
Sanjoy Das [Thu, 17 Mar 2016 01:15:27 +0000 (01:15 +0000)]
[Statepoint] Remove unused header; NFC
llvm-svn: 263684
Sanjoy Das [Thu, 17 Mar 2016 00:47:18 +0000 (00:47 +0000)]
[Statepoints] Minor NFC cleanups
Mostly code simplifcations, and bringing up IR/Statepoints.cpp up to
LLVM coding style.
llvm-svn: 263683
Sanjoy Das [Thu, 17 Mar 2016 00:47:14 +0000 (00:47 +0000)]
[SelectionDAG] Remove visitStatepoint; NFC
This way we have a single entry point into StatepointLowering. The
method was a direct dispatch to LowerStatepoint anyway.
llvm-svn: 263682
Pete Cooper [Thu, 17 Mar 2016 00:34:54 +0000 (00:34 +0000)]
Require allocator parameter to YAML traits.
The allocator here can still be a nullptr, but this atleast makes the
single caller which needed nullptr be explicit about it.
Note, lld started always passing a parameter here as of r263680. If
anything builds out of sync, that would be why errors may occur.
llvm-svn: 263681
Pete Cooper [Thu, 17 Mar 2016 00:33:58 +0000 (00:33 +0000)]
Always pass an allocator to YAMLTraits.
The YAML traits new's when not passed an allocator to parse data.
For atom types, this is a leak as we don't destruct atoms. For
the File here, we do actually destruct File's so that single case of
not using an allocator will be fine.
Should fix a bunch more leaks.
llvm-svn: 263680
Sanjay Patel [Wed, 16 Mar 2016 23:39:37 +0000 (23:39 +0000)]
use FileCheck for tighter checking
llvm-svn: 263679
Tobias Grosser [Wed, 16 Mar 2016 23:33:54 +0000 (23:33 +0000)]
ScopInfo: Do not generate dependences for i1 values used in affine branches
Affine branches are fully modeled and regenerated from the polyhedral domain and
consequently do not require any input conditions to be propagated.
llvm-svn: 263678
Pete Cooper [Wed, 16 Mar 2016 23:30:27 +0000 (23:30 +0000)]
Use allocator in YAML code to avoid leaking atom content.
In lld we allocate atoms on an allocator and so don't run their
destructors. This means we also shouldn't allocate memory inside
them without that also being on an allocator.
Reviewed by Lang Hames and Rafael Espindola.
llvm-svn: 263677
Pete Cooper [Wed, 16 Mar 2016 23:29:31 +0000 (23:29 +0000)]
Add optional allocator to YAML code to avoid leaking lld atoms.
In lld we allocate atoms on an allocator and so don't run their
destructors. This means we also shouldn't allocate memory inside
them without that also being on an allocator.
Reviewed by Lang Hames and Rafael Espindola.
llvm-svn: 263676
Sanjay Patel [Wed, 16 Mar 2016 23:22:01 +0000 (23:22 +0000)]
reduce check strings; no need to check IR comments
llvm-svn: 263675
Sanjay Patel [Wed, 16 Mar 2016 23:20:20 +0000 (23:20 +0000)]
use FileCheck for tighter checking
llvm-svn: 263674
Chris Bieneman [Wed, 16 Mar 2016 23:17:54 +0000 (23:17 +0000)]
Upgrade TBAA *before* upgrading intrinsics
Summary: If TBAA is on an intrinsic and it gets upgraded and drops the TBAA we hit an odd assert. We should just upgrade the TBAA first because it doesn't have side-effects.
Reviewers: reames, apilipenko, manmanren
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18229
llvm-svn: 263673
Sanjoy Das [Wed, 16 Mar 2016 23:11:21 +0000 (23:11 +0000)]
Fix indentation; NFC
llvm-svn: 263672
Sanjoy Das [Wed, 16 Mar 2016 23:08:00 +0000 (23:08 +0000)]
Extract out a SelectionDAGBuilder::LowerAsStatepoint; NFC
Summary:
This is a step towards implementing "direct" lowering of calls and
invokes with deopt operand bundles into STATEPOINT nodes (as opposed to
having them mandatorily pass through RewriteStatepointsForGC, which is
the case today).
This change extracts out a `SelectionDAGBuilder::LowerAsStatepoint`
helper function that is able to lower a "statepoint like thing", and
uses it to lower `gc.statepoint` calls. This is an NFC now, but in a
later change we will use `LowerAsStatepoint` to directly lower calls and
invokes with operand bundles without going through an intermediate
`gc.statepoint` IR representation.
FYI: I expect `SelectionDAGBuilder::StatepointInfo` will evolve as I add
support for lowering non gc.statepoints, right now it is fairly tightly
coupled with an IR level `gc.statepoint`.
Reviewers: reames, pgavlin, JosephTremoulet
Subscribers: sanjoy, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18106
llvm-svn: 263671
Rafael Espindola [Wed, 16 Mar 2016 23:01:56 +0000 (23:01 +0000)]
Don't pass SymbolBody to the relax* functions.
We already pass the symbol value.
llvm-svn: 263670
Rafael Espindola [Wed, 16 Mar 2016 22:43:36 +0000 (22:43 +0000)]
Don't create a got entry if we optimize it out.
llvm-svn: 263669
Sanjay Patel [Wed, 16 Mar 2016 22:34:57 +0000 (22:34 +0000)]
use FileCheck for tighter checking
I'm testing out a script that auto-generates the check lines.
It's 98% copied from utils/update_llc_test_checks.py.
If others think this is useful, please let me know.
llvm-svn: 263668
Sanjay Patel [Wed, 16 Mar 2016 22:29:07 +0000 (22:29 +0000)]
use FileCheck for tighter checking
I'm testing out a script that auto-generates the check lines.
It's 98% copied from utils/update_llc_test_checks.py.
If others think this is useful, please let me know.
llvm-svn: 263667
Xinliang David Li [Wed, 16 Mar 2016 22:13:41 +0000 (22:13 +0000)]
Variable name cleanup /NFC
llvm-svn: 263666
James Y Knight [Wed, 16 Mar 2016 22:12:04 +0000 (22:12 +0000)]
Tweak some atomics functions in preparation for larger changes; NFC.
- Rename getATOMIC to getSYNC, as llvm will soon be able to emit both
'__sync' libcalls and '__atomic' libcalls, and this function is for
the '__sync' ones.
- getInsertFencesForAtomic() has been replaced with
shouldInsertFencesForAtomic(Instruction), so that the decision can be
made per-instruction. This functionality will be used soon.
- emitLeadingFence/emitTrailingFence are no longer called if
shouldInsertFencesForAtomic returns false, and thus don't need to
check the condition themselves.
llvm-svn: 263665
Ed Maste [Wed, 16 Mar 2016 21:12:53 +0000 (21:12 +0000)]
[ELF] SHF_MERGE section with 0 entsize is not fatal
For now just treat such sections as non-mergeable.
Resubmit r263660 with test fix.
Differential Revision: http://reviews.llvm.org/D18225
llvm-svn: 263664
Sanjoy Das [Wed, 16 Mar 2016 20:49:31 +0000 (20:49 +0000)]
[SelectionDAG] Extract out populateCallLoweringInfo; NFC
SelectionDAGBuilder::populateCallLoweringInfo is now used instead of
SelectionDAGBuilder::lowerCallOperands. The populateCallLoweringInfo
interface is more composable in face of design changes like
http://reviews.llvm.org/D18106
llvm-svn: 263663
Vedant Kumar [Wed, 16 Mar 2016 20:49:26 +0000 (20:49 +0000)]
[ProfileData] Make a utility method public, NFC
The swift frontend needs to be able to look up PGO function name
variables based on the original raw function name. That's because it's
not possible to create PGO function name variables while emitting swift
IR. Instead, we have to create the name variables while lowering swift
IR to llvm IR, at which point we fix up all calls to the increment
intrinsic to point to the right name variable.
llvm-svn: 263662
Ed Maste [Wed, 16 Mar 2016 20:42:27 +0000 (20:42 +0000)]
Revert r263660 as one of the tests is broken.
llvm-svn: 263661
Ed Maste [Wed, 16 Mar 2016 20:32:32 +0000 (20:32 +0000)]
[ELF] SHF_MERGE section with 0 entsize is not fatal
For now just treat such sections as non-mergeable.
Differential Revision: http://reviews.llvm.org/D18222
llvm-svn: 263660
Eric Fiselier [Wed, 16 Mar 2016 20:32:07 +0000 (20:32 +0000)]
Add __unconstref for future use
llvm-svn: 263659
Nicolai Haehnle [Wed, 16 Mar 2016 20:14:33 +0000 (20:14 +0000)]
AMDGPU: Prevent uniform loops from becoming infinite
Summary:
Uniform loops where the branch leaving the loop is predicated on VCCNZ
must be skipped if EXEC = 0, otherwise they will be infinite.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18137
llvm-svn: 263658
Colin LeMahieu [Wed, 16 Mar 2016 20:00:38 +0000 (20:00 +0000)]
[Hexagon] Adding missing break in switch statement. Extra operands would have been appended to the end.
llvm-svn: 263657
Chad Rosier [Wed, 16 Mar 2016 19:48:42 +0000 (19:48 +0000)]
[SLP] Make DataLayout a member variable.
llvm-svn: 263656
Geoff Berry [Wed, 16 Mar 2016 19:21:47 +0000 (19:21 +0000)]
Revert "[LSR] Create fewer redundant instructions."
This reverts commit r263644. Investigating bootstrap failures.
llvm-svn: 263655
Carlo Bertolli [Wed, 16 Mar 2016 19:04:22 +0000 (19:04 +0000)]
[OPENMP] Support for codegen of private clause of target, host side
This patch adds support for codegen of private clause of target and a regression test for host code generation, when the host is used as target device. I believe that code generation for nvptx backend would not require anything additional or different to what is done for the host.
http://reviews.llvm.org/D18105
llvm-svn: 263654
Rafael Espindola [Wed, 16 Mar 2016 19:03:58 +0000 (19:03 +0000)]
Split relaxTls into one per relaxation type.
This reduces code duplication in each target.
llvm-svn: 263653
Manman Ren [Wed, 16 Mar 2016 18:50:49 +0000 (18:50 +0000)]
Add an optional string argument to DeprecatedAttr for Fix-It.
We only add this to __attribute__((deprecated)).
Differential Revision: http://reviews.llvm.org/D17865
llvm-svn: 263652
Jonathan Peyton [Wed, 16 Mar 2016 18:44:18 +0000 (18:44 +0000)]
[CMake] Fix Windows build problem for CMake versions < 3.3
Building libomp using CMake versions < 3.3 caused a link time error. These
errors occurred because when assembling z_Windows_NT-586_asm.asm, the
definitions: OMPT_SUPPORT, _M_AMD64|_M_IA32 weren't defined on the command line.
To fix the problem, the COMPILE_FLAGS property for the assembly file is appended
to instead of the COMPILE_DEFINITIONS property being set. For whatever reason, the
COMPILE_DEFINITIONS property doesn't pick up the definitions for assembly files
for the older CMake versions.
llvm-svn: 263651
Simon Pilgrim [Wed, 16 Mar 2016 18:37:44 +0000 (18:37 +0000)]
Removed trailing whitespace
llvm-svn: 263650
Simon Pilgrim [Wed, 16 Mar 2016 18:32:44 +0000 (18:32 +0000)]
[X86] Reduced alignment of widened vector load/stores to better match PR26953 cases
llvm-svn: 263649
Sanjay Patel [Wed, 16 Mar 2016 18:15:34 +0000 (18:15 +0000)]
add checks for 'unpredictable' metadata preservation
llvm-svn: 263648
Roman Levenstein [Wed, 16 Mar 2016 18:00:46 +0000 (18:00 +0000)]
Add attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end
Till now, preserve_mostcc/preserve_allcc calling convention attributes were only
available at the LLVM IR level. This patch adds attributes for
preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end.
The code was mostly written by Juergen Ributzka.
I just added support for the AArch64 target and tests.
Differential Revision: http://reviews.llvm.org/D18025
llvm-svn: 263647
Sanjay Patel [Wed, 16 Mar 2016 18:00:09 +0000 (18:00 +0000)]
fix function names; NFC
llvm-svn: 263646
Evgeniy Stepanov [Wed, 16 Mar 2016 17:39:17 +0000 (17:39 +0000)]
[msan] Add a comment with a bug link.
llvm-svn: 263645
Geoff Berry [Wed, 16 Mar 2016 17:29:49 +0000 (17:29 +0000)]
[LSR] Create fewer redundant instructions.
Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs. This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.
Reviewers: atrick
Subscribers: mcrosier, mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D18001
llvm-svn: 263644
Kuba Brecka [Wed, 16 Mar 2016 15:39:20 +0000 (15:39 +0000)]
[tsan] Detect uses of uninitialized, destroyed and invalid mutexes
This patch adds a new TSan report type, ReportTypeMutexInvalidAccess, which is triggered when pthread_mutex_lock or pthread_mutex_unlock returns EINVAL (this means the mutex is invalid, uninitialized or already destroyed).
Differential Revision: http://reviews.llvm.org/D18132
llvm-svn: 263641
Simon Pilgrim [Wed, 16 Mar 2016 15:33:43 +0000 (15:33 +0000)]
[X86] Regenerated + extended widened vector conversion tests
- Ensure we test X86 + X64
- sitopfp / uitofp requires testing for SSE2 and SSE42 as well (part of the fix for PR26953)
llvm-svn: 263640
Olivier Goffart [Wed, 16 Mar 2016 14:36:11 +0000 (14:36 +0000)]
Fix destructor definition of invalid classes
The declaration of the destructor of an invalid class was not properly marked
as noexcept. As a result, the definition of the same destructor, which was
properly implicitly marked as noexcept, would not match the definition.
This would cause the definition CXXDestructorDecl to be matked as invalid
and omited from the AST.
Differential Revision: http://reviews.llvm.org/D17988
llvm-svn: 263639
Mike Spertus [Wed, 16 Mar 2016 14:27:50 +0000 (14:27 +0000)]
Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types
Created visualizer for PointerType, LValueReferenceType, RValueReferenceType, and TemplateParmType.
In addition, cleaned up the display of existing types to be more C++-like. For example, instead of
SubstTemplateTypeParmType: {Identifier (("T"))} => Record (25), {Identifier (("A"))}
it now displays more readably as
SubstTemplateTypeParmType: {typename T <= struct A}
The <expand> sections still can be used for all the gory details if necessary.
llvm-svn: 263638
Pavel Labath [Wed, 16 Mar 2016 14:03:20 +0000 (14:03 +0000)]
Fix null pointer "dereference" in DomainSocket
offsetof is the official way to get the offset of a field in a structure.
llvm-svn: 263637
NAKAMURA Takumi [Wed, 16 Mar 2016 12:15:29 +0000 (12:15 +0000)]
Revert r263617, "Reapply: [VFS] Add support for handling path traversals"
It broke standalone clang build.
llvm-svn: 263636
Yaron Keren [Wed, 16 Mar 2016 12:14:43 +0000 (12:14 +0000)]
Directly get the canonical Type instead of going around through a CanQualType temporary, NFC.
llvm-svn: 263635
Vassil Vassilev [Wed, 16 Mar 2016 11:17:04 +0000 (11:17 +0000)]
[modules] Fix adding a templated friend functions to a namespace from another module.
When clang adds argument dependent lookup candidates, it can perform template
instantiation. For example, it can instantiate a templated friend function and
register it in the enclosing namespace's lookup table.
Fixes https://llvm.org/bugs/show_bug.cgi?id=24954
Reviewed by Richard Smith.
llvm-svn: 263634
Pavel Labath [Wed, 16 Mar 2016 10:39:33 +0000 (10:39 +0000)]
Switch from unittest2.expectedFailure to our own decorator on TestSTL
the main reason is that our decorator contains extra fluff to "expect" crashes (which seem to
happen occasionaly on the android buildbot).
llvm-svn: 263633
Pablo Barrio [Wed, 16 Mar 2016 10:21:04 +0000 (10:21 +0000)]
Add more ARM Cortex-R8 regression tests to Clang.
Summary:
This patch adds Clang tests for Cortex-R8 related to FP capabilities and
hardware integer divide.
Reviewers: rengolin, bsmith
Subscribers: aemerson, cfe-commits, rengolin
Differential Revision: http://reviews.llvm.org/D18193
llvm-svn: 263632
Pavel Labath [Wed, 16 Mar 2016 09:58:34 +0000 (09:58 +0000)]
Mark an LLGS test as flaky
cause: Async output arrival over pty
llvm-svn: 263631
Marina Yatsina [Wed, 16 Mar 2016 09:56:58 +0000 (09:56 +0000)]
Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings
The purpose of this patch is to keep the same functionality without using LookupResult's implicit copy ctor and assignment operator, because they cause warnings when -Wdeprecated is passed.
This patch is meant to help the following review: http://reviews.llvm.org/D18123.
The functionality is covered by the tests in my original commit (255890)
The test case in this patch was added to test a bug caught in the review of the first version of this fix.
Differential Revision: http://reviews.llvm.org/D18175
llvm-svn: 263630
Pavel Labath [Wed, 16 Mar 2016 09:44:49 +0000 (09:44 +0000)]
[test] Persist packets between expect_gdbremote_sequence invocations
Summary:
Some tests (Hc_then_Csignal_signals_correct_thread, at least) were sending a "continue" packet in
one expect_gdbremote_sequence invocation, and "expecting" the stop-reply in another call. This
posed a problem, because the were packets were not persisted between the two invocations, and if
the stub was exceptionally fast to respond, the packet would be received in the first invocation
(where it would be ignored) and then the second invocation would fail because it could not find
the packet.
Since doing matching in two invocations seems like a reasonable use of the packet pump, instead
of fixing the test, I make sure the packet_pump supports this usage by making the list of
captured packets persistent.
Reviewers: tfiala
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D18140
llvm-svn: 263629
Pavel Labath [Wed, 16 Mar 2016 09:19:57 +0000 (09:19 +0000)]
Fix thread/process ID reading from linux core files
Summary:
This also adds a basic smoke test for linux core file reading. I'm checking in the core files as
well, so that the tests can run on all platforms. With some tricks I was able to produce
reasonably-sized core files (~40K).
This fixes the first part of pr26322.
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D18176
llvm-svn: 263628
Michel Danzer [Wed, 16 Mar 2016 09:10:42 +0000 (09:10 +0000)]
AMDGPU: Verify instructions in non-debug builds as well
And emit an error if it fails.
This prevents illegal instructions from getting sent to the GPU, which
would potentially result in a hang.
This is a candidate for the stable branch(es).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 263627
Michel Danzer [Wed, 16 Mar 2016 09:10:35 +0000 (09:10 +0000)]
AMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 263626
Pavel Labath [Wed, 16 Mar 2016 08:48:56 +0000 (08:48 +0000)]
Move OperatingSystem plugins to SystemInitializerFull
Summary: These are not needed in lldb-server. Removing them shrinks the server size by about 1.5%.
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D18188
llvm-svn: 263625
Igor Breger [Wed, 16 Mar 2016 08:48:26 +0000 (08:48 +0000)]
AVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit vector because PCMPGT supported only for 128/256bit.
Differential Revision: http://reviews.llvm.org/D18204
llvm-svn: 263624
NAKAMURA Takumi [Wed, 16 Mar 2016 08:44:37 +0000 (08:44 +0000)]
Revert r263622, "clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h instead of llvm's."
I'll commit better fix(es) later. "llvm/Config/config.h" shouldn't be available here.
llvm-svn: 263623
NAKAMURA Takumi [Wed, 16 Mar 2016 08:28:55 +0000 (08:28 +0000)]
clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h instead of llvm's.
llvm-svn: 263622
Mohit K. Bhakkad [Wed, 16 Mar 2016 08:23:10 +0000 (08:23 +0000)]
[ASAN] Add support for mips/mips64 android
Patch by Duane Sand
Reviewers: samsonov
Subscribers: duanesand, jaydeep, sagar, llvm-commits, filcab.
Differential Revision: http://reviews.llvm.org/D17883
llvm-svn: 263621
Vedant Kumar [Wed, 16 Mar 2016 05:43:03 +0000 (05:43 +0000)]
[Bitcode] Add compatibility test for the 3.8 release
Fork off compatibility.ll for the 3.8 release. The *.bc file in this
commit was produced using a Release build of the release_38 branch.
llvm-svn: 263620
Haicheng Wu [Wed, 16 Mar 2016 04:52:52 +0000 (04:52 +0000)]
[JumpThreading] See through Cast Instructions
To capture more jump-thread opportunity.
llvm-svn: 263618
Bruno Cardoso Lopes [Wed, 16 Mar 2016 04:39:38 +0000 (04:39 +0000)]
Reapply: [VFS] Add support for handling path traversals
This is originally r261551, reverted because of windows bots failing on
unittests. Change the current behavior to do not handle path traversals
on windows.
Handle ".", ".." and "./" with trailing slashes while collecting files
to be dumped into the vfs overlay directory.
Include the support for symlinks into components. Given the path:
/install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin"
component is a symlink, it's not safe to use `path::remove_dots` here,
and `realpath` is used to get the right answer. Since `realpath`
is expensive, we only do it at collecting time (which only happens
during the crash reproducer) and cache the base directory for fast lookups.
Overall, this makes the input to the VFS YAML file to be canonicalized
to never contain traversal components.
Differential Revision: http://reviews.llvm.org/D17104
rdar://problem/
24499339
llvm-svn: 263617
Eric Fiselier [Wed, 16 Mar 2016 02:30:06 +0000 (02:30 +0000)]
Add clang thread safety annotations to mutex and lock_guard. Patch by jamesr@google.com.
This adds clang thread safety annotations to std::mutex and
std::lock_guard so code using these types can use these types directly
instead of having to wrap the types to provide annotations. These checks
when enabled by -Wthread-safety provide simple but useful static
checking to detect potential race conditions.
See http://clang.llvm.org/docs/ThreadSafetyAnalysis.html for details.
This patch was reviewed in http://reviews.llvm.org/D14731.
llvm-svn: 263611
Lang Hames [Wed, 16 Mar 2016 01:20:54 +0000 (01:20 +0000)]
[Support] Update Error unit test to remove implementation specific behaviour.
llvm-svn: 263610
Lang Hames [Wed, 16 Mar 2016 01:02:46 +0000 (01:02 +0000)]
[Support] Add the 'Error' class for structured error handling.
This patch introduces the Error classs for lightweight, structured,
recoverable error handling. It includes utilities for creating, manipulating
and handling errors. The scheme is similar to exceptions, in that errors are
described with user-defined types. Unlike exceptions however, errors are
represented as ordinary return types in the API (similar to the way
std::error_code is used).
For usage notes see the LLVM programmer's manual, and the Error.h header.
Usage examples can be found in unittests/Support/ErrorTest.cpp.
Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the
llvm-dev and llvm-commits lists for lots of discussion and review.
llvm-svn: 263609
Simon Pilgrim [Wed, 16 Mar 2016 00:41:21 +0000 (00:41 +0000)]
[X86] Regenerated widen load tests
llvm-svn: 263608
Pete Cooper [Wed, 16 Mar 2016 00:33:21 +0000 (00:33 +0000)]
Convert some ObjC msgSends to runtime calls.
It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions.
This patch adds support for converting messages to retain/release/alloc/autorelease to their equivalent runtime calls.
Tests included for the positive case of applying this transformation, negative tests that we ensure we only convert "alloc" to objc_alloc, not "alloc2", and also a driver test to ensure we enable this only for supported runtime versions.
Reviewed by John McCall.
Differential Revision: http://reviews.llvm.org/D14737
llvm-svn: 263607
Simon Pilgrim [Wed, 16 Mar 2016 00:13:36 +0000 (00:13 +0000)]
[X86][SSE41] Additional tests for extracting zeroable shuffle elements
We can currently only match zeroable vector elements of the same size as the shuffle type - these tests demonstrate the problem and a solution will be shortly added in an updated D14261
llvm-svn: 263606
Haicheng Wu [Tue, 15 Mar 2016 23:38:47 +0000 (23:38 +0000)]
Revert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"
Not sure it handles undef properly.
llvm-svn: 263605
Enrico Granata [Tue, 15 Mar 2016 23:38:04 +0000 (23:38 +0000)]
On some platforms, the compiler is allowed to assume that BOOL == bool. On others, BOOL == signed char.
This can cause differences in which bit patterns end up meaning YES or NO. In general, however, 0 == NO and 1 == YES.
To keep it simple, LLDB will now show "YES" and "NO" only for 1 and 0 respectively, and format other values as the plain numeric value instead.
Fixes rdar://
24809994
llvm-svn: 263604
Enrico Granata [Tue, 15 Mar 2016 23:20:10 +0000 (23:20 +0000)]
Make it so that the data formatter for NSError can see through a variable of type NSError**. Fixes rdar://
25060684
llvm-svn: 263603
Greg Clayton [Tue, 15 Mar 2016 22:44:07 +0000 (22:44 +0000)]
Only try to load the OS plug-in after a shared library load if we don't already have one.
<rdar://problem/
24162686>
llvm-svn: 263602
Greg Clayton [Tue, 15 Mar 2016 22:43:26 +0000 (22:43 +0000)]
Fix ClangASTContext::GetFunctionArgumentAtIndex() to not water down the type to the canonical type before handing the type out for the function type.
llvm-svn: 263601
Davide Italiano [Tue, 15 Mar 2016 22:38:21 +0000 (22:38 +0000)]
Unbreak buildbot.
It passed on a case-insensitive filesystem, but
it was broken on a case-sensitive one.
llvm-svn: 263598
Justin Bogner [Tue, 15 Mar 2016 22:37:25 +0000 (22:37 +0000)]
llvm-bcanalyzer: Fix handling of attribute group entries
These were printing as "UnknownCode3", since we were looking for them
inside PARAMATTR blocks instead of PARAMATTR_GROUP blocks.
llvm-svn: 263597
Douglas Katzman [Tue, 15 Mar 2016 22:34:02 +0000 (22:34 +0000)]
Myriad: define __myriad2 macro automatically
llvm-svn: 263596