Chaoren Lin [Fri, 31 Jul 2015 00:35:40 +0000 (00:35 +0000)]
Allow ValueObject::Dereference to dereference references.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11667
llvm-svn: 243716
Dawn Perchik [Fri, 31 Jul 2015 00:26:46 +0000 (00:26 +0000)]
Fix build of lldb on Mavericks after svn rev.243511.
This patch adds a test for ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED
around the code which requires 10.10 support to link. Without this, lldb
gets unresolved references to _csr_check and _rootless_allows_task_for_pid.
Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11668
llvm-svn: 243715
Evgeniy Stepanov [Fri, 31 Jul 2015 00:00:03 +0000 (00:00 +0000)]
[asan] Fix signal() interception on 64-bit Android.
The bsd_signal() special case only applies to 32-bit Android targets.
Fixes AddressSanitizer.SignalTest on aarch64/android.
llvm-svn: 243714
Rui Ueyama [Thu, 30 Jul 2015 22:57:21 +0000 (22:57 +0000)]
COFF: Move code for Identical COMDAT Folding to ICF.cpp.
llvm-svn: 243701
Rui Ueyama [Thu, 30 Jul 2015 22:48:45 +0000 (22:48 +0000)]
COFF: Handle all COMDAT sections as non-GC root.
I don't remember why I thought that only functions are subject
of garbage collection, but the comment here said so, which is
not correct. Moreover, the code just below the comment does not
do what the comment says -- it handles non-COMDAT, non-function
sections as GC root. As a result, it just handles non-COMDAT
sections as GC root.
This patch cleans that up by removing SectionChunk::isRoot and
use isCOMDAT instead.
llvm-svn: 243700
Eric Fiselier [Thu, 30 Jul 2015 22:30:34 +0000 (22:30 +0000)]
Reapply working parts of CMake cleanup.
This patch adds the working parts of r243503. The difference with this patch
is that it doesn't include the HandleLLVMOptions.cmake file.
llvm-svn: 243698
Dawn Perchik [Thu, 30 Jul 2015 22:10:08 +0000 (22:10 +0000)]
Fix help message for target.language setting.
llvm-svn: 243697
Alex Lorenz [Thu, 30 Jul 2015 22:00:17 +0000 (22:00 +0000)]
MIR Parser: Report an error when a constant pool item is redefined.
llvm-svn: 243696
Alex Lorenz [Thu, 30 Jul 2015 21:54:10 +0000 (21:54 +0000)]
MIR Parser: Report an error when a virtual register is redefined.
llvm-svn: 243695
David Blaikie [Thu, 30 Jul 2015 21:42:22 +0000 (21:42 +0000)]
Split DWARF: Allow -gmlt/-gsplit-dwarf to override rather than complement each other
It doesn't make any sense to enable -gmlt with -gsplit-dwarf, since
-gmlt is designed for on-line symbolication (and -gsplit-dwarf normally
emits all the -gmlt data into the .o anyway - so there's nothing to
split out except redundant/duplicate info).
With this change they override each other, -gmlt -gsplit-dwarf is the
same as -gsplit-dwarf and -gsplit-dwarf -gmlt is the same as -gmlt.
llvm-svn: 243694
Sanjay Patel [Thu, 30 Jul 2015 21:41:50 +0000 (21:41 +0000)]
fix memcpy/memset/memmove lowering when optimizing for size
Fixing MinSize attribute handling was discussed in D11363.
This is a prerequisite patch to doing that.
The handling of OptSize when lowering mem* functions was broken
on Darwin because it wants to ignore -Os for these cases, but the
existing logic also made it ignore -Oz (MinSize).
The Linux change demonstrates a widespread problem. The backend
doesn't usually recognize the MinSize attribute by itself; it
assumes that if the MinSize attribute exists, then the OptSize
attribute must also exist.
Fixing this more generally will be a follow-on patch or two.
Differential Revision: http://reviews.llvm.org/D11568
llvm-svn: 243693
Hubert Tong [Thu, 30 Jul 2015 21:30:00 +0000 (21:30 +0000)]
Improved error recovery for _Pragma
Summary:
Currently, if the argument to _Pragma is not a parenthesised string
literal, the bad token will be consumed, as well as the ')', if present.
If additional bad tokens are passed to the _Pragma, this results in
extra error messages which may distract from the true problem.
The proposed patch causes all tokens to be consumed until the closing
')' or a new line, whichever is reached first.
Reviewers: hfinkel, rsmith
Subscribers: hubert.reinterpretcast, fraggamuffin, rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D8308
Patch by Rachel Craik!
llvm-svn: 243692
Kostya Serebryany [Thu, 30 Jul 2015 21:22:22 +0000 (21:22 +0000)]
[libFuzzer] fix the strncmp interceptor -- it should respect short strings.
llvm-svn: 243691
Hubert Tong [Thu, 30 Jul 2015 21:20:55 +0000 (21:20 +0000)]
[Concepts] Add diagnostic: non template declaration
Summary:
Adding diagnostic for concepts declared as non template (function
or variable)
Reviewers: faisalv, fraggamuffin, rsmith, hubert.reinterpretcast
Subscribers: nwilson, cfe-commits
Differential Revision: http://reviews.llvm.org/D11490
Patch by Nathan Wilson!
llvm-svn: 243690
Eric Christopher [Thu, 30 Jul 2015 21:16:34 +0000 (21:16 +0000)]
Fix TableGen code generation for ReadNone attribute.
Patch by Pete Abred!
llvm-svn: 243689
Adhemerval Zanella [Thu, 30 Jul 2015 21:13:21 +0000 (21:13 +0000)]
[dfsan] Enable dfsan for aarch64
This patch enable DFSan for AArch64 (39-bit VMA). All tests are passing
but:
* test/dfsan/custom.cc
Due an invalid access in dl_iterate_phdr instrumentation (commenting out
this function make the testcase to pass). The test is XFAIL for aarch64
for now.
llvm-svn: 243688
Sanjay Patel [Thu, 30 Jul 2015 21:06:55 +0000 (21:06 +0000)]
enable fast-math-flag propagation to DAG nodes
This uncovered latent bugs previously:
http://reviews.llvm.org/D10403
...but it's time to try again because internal tests aren't finding more.
If time passes and no other bugs are reported, we can remove this cl::opt.
llvm-svn: 243687
Daniel Sanders [Thu, 30 Jul 2015 21:00:48 +0000 (21:00 +0000)]
[Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
Summary:
Using u64 as type for offset changes its value, changing starting address for map in file.
This patch solves Bug 24151, which raises issue while mapping file in mips32.
Patch by Mohit Bhakkad
Reviewers: dsanders, kcc
Subscribers: hans, llvm-commits, samsonov, nitesh.jain, sagar, bhushan, jaydeep
Differential Revision: http://reviews.llvm.org/D11588
llvm-svn: 243686
Adhemerval Zanella [Thu, 30 Jul 2015 20:50:39 +0000 (20:50 +0000)]
[sanitizers] Enable dfsan for aarch64
This patch enables DFSan for aarch64/linux.
llvm-svn: 243685
Adhemerval Zanella [Thu, 30 Jul 2015 20:49:35 +0000 (20:49 +0000)]
Enable dfsan for aarch64
This patch enable DFSan memory transformation for aarch64 (39-bit VMA).
llvm-svn: 243684
Rui Ueyama [Thu, 30 Jul 2015 20:47:17 +0000 (20:47 +0000)]
Remove trailing whitespace.
llvm-svn: 243683
Mehdi Amini [Thu, 30 Jul 2015 20:33:18 +0000 (20:33 +0000)]
Add a TargetMachine hook that verifies DataLayout compatibility
Summary: Also provide the associated assertion when CodeGen starts.
Reviewers: echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11654
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243682
Zachary Turner [Thu, 30 Jul 2015 20:28:07 +0000 (20:28 +0000)]
Convert the ScriptInterpreter system to a plugin-based one.
Previously embedded interpreters were handled as ad-hoc source
files compiled into source/Interpreter. This made it hard to
disable a specific interpreter, or to add support for other
interpreters and allow the developer to choose which interpreter(s)
were enabled for a particular build.
This patch converts script interpreters over to a plugin-based system.
Script interpreters now live in source/Plugins/ScriptInterpreter, and
the canonical LLDB interpreter, ScriptInterpreterPython, is moved there
as well.
Any new code interfacing with the Python C API must live in this location
from here on out. Additionally, generic code should never need to
reference or make assumptions about the presence of a specific interpreter
going forward.
Differential Revision: http://reviews.llvm.org/D11431
Reviewed By: Greg Clayton
llvm-svn: 243681
David Majnemer [Thu, 30 Jul 2015 20:26:55 +0000 (20:26 +0000)]
COFF: Sort output sections which start with .debug to the end of the file
We want to convince the NT loader not to map these sections into memory.
A good first step is to move them to the end of the executable.
Differential Revision: http://reviews.llvm.org/D11655
llvm-svn: 243680
Evgeniy Stepanov [Thu, 30 Jul 2015 20:07:13 +0000 (20:07 +0000)]
[asan] Support arm64 devices in asan_device_setup.
llvm-svn: 243679
Michael Kruse [Thu, 30 Jul 2015 19:27:04 +0000 (19:27 +0000)]
Move computations out of constructors
It is common practice to keep constructors lightweight. The reasons
include:
- The vtable during the constructor's execution is set to the static
type of the object, not to the vtable of the derived class. That is,
method calls behave differently in constructors and ordinary methods.
This way it is possible to call unimplemented methods of abstract
classes, which usually results in a segmentation fault.
- If an exception is thrown in the constructor, the destructor is not
called, potentially leaking memory.
- Code in constructors cannot be called in a regular way, e.g. from
non-constructor methods of derived classes.
- Because it is common practice, people may not expect the constructor
to do more than initializing data and skip them when looking for bugs.
Not all of these are applicable to LLVM (e.g. exceptions are disabled).
This patch refactors out the computational work in the constructors of
Scop and IslAst into regular init functions and introduces static
create-functions as replacement.
Differential revision: http://reviews.llvm.org/D11491
Reviewers: grosser, jdoerfert
llvm-svn: 243677
Argyrios Kyrtzidis [Thu, 30 Jul 2015 19:06:04 +0000 (19:06 +0000)]
[sema] Allow to opt-out of overriding the super class's designated initializers by marking the initializer as unavailable in the subclass.
rdar://
20281322
llvm-svn: 243676
Naomi Musgrave [Thu, 30 Jul 2015 18:46:18 +0000 (18:46 +0000)]
testing for tail call optimization repression when sanitizing use-after-dtor
Summary: Verify that running in optimized mode while checking for use-after-dtor errors, does not generate tail call invocation of destructor. This avoids possible error where stack frame for the destructor is eliminated, making tracking down the errors more difficult.
Reviewers: eugenis, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11614
simplified test cases
updated line numbering on test
renamed test
llvm-svn: 243675
Marshall Clow [Thu, 30 Jul 2015 18:26:34 +0000 (18:26 +0000)]
Fix PR#24267. use numeric_limits::max instead of ~0 for 'all ones', since that might give wrong answers on a 1's complement machine.
llvm-svn: 243674
Naomi Musgrave [Thu, 30 Jul 2015 17:59:55 +0000 (17:59 +0000)]
simplified test case
llvm-svn: 243673
Naomi Musgrave [Thu, 30 Jul 2015 17:59:54 +0000 (17:59 +0000)]
removed hardcoding for attribute associated with dtor in test
llvm-svn: 243672
Naomi Musgrave [Thu, 30 Jul 2015 17:59:52 +0000 (17:59 +0000)]
Testing to verify function attribute disable-tail-calls applied to destructor
llvm-svn: 243671
Naomi Musgrave [Thu, 30 Jul 2015 17:59:50 +0000 (17:59 +0000)]
updated test to be more explicit
llvm-svn: 243670
Naomi Musgrave [Thu, 30 Jul 2015 17:59:48 +0000 (17:59 +0000)]
Updated test regex and flags
llvm-svn: 243669
Naomi Musgrave [Thu, 30 Jul 2015 17:59:46 +0000 (17:59 +0000)]
repress tail call optimization when performing use-after-dtor sanitization
Reviewers: eugenis, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11613
llvm-svn: 243668
Chaoren Lin [Thu, 30 Jul 2015 17:48:44 +0000 (17:48 +0000)]
Use only unnamed pipes to launch lldb-server gdbserver.
Summary:
If we used unnamed pipes instead of named pipes, we can avoid having the
file system littered with debugserver-named-pipes if lldb-server happens to
crash for whatever reason. Also, on some buggy systems, it's possible to be
able to create but not to delete a fifo. Ideally, support for unnamed pipes
should be added to debugserver as well, so we can avoid the `#ifdef` here.
Reviewers: clayborg, vharron, chying
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11609
llvm-svn: 243667
Wei Mi [Thu, 30 Jul 2015 17:40:39 +0000 (17:40 +0000)]
[SLP vectorizer]: Choose the best consecutive candidate to pair with a store instruction.
The patch changes the SLPVectorizer::vectorizeStores to choose the immediate
succeeding or preceding candidate for a store instruction when it has multiple
consecutive candidates. In this way it has better chance to find more slp
vectorization opportunities.
Differential Revision: http://reviews.llvm.org/D10445
llvm-svn: 243666
Mehdi Amini [Thu, 30 Jul 2015 17:29:33 +0000 (17:29 +0000)]
Fix lli with OrcLazyJIT: the default DataLayout was used.
Set the correct one using the TargetMachine instead.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243664
Pete Cooper [Thu, 30 Jul 2015 17:22:52 +0000 (17:22 +0000)]
Use llvm::reverse to make a bunch of loops use foreach. NFC.
In llvm commit r243581, a reverse range adapter was added which allows
us to change code such as
for (auto I = Fields.rbegin(), E = Fields.rend(); I != E; ++I) {
in to
for (const FieldDecl *I : llvm::reverse(Fields))
This commit changes a few of the places in clang which are eligible to use
this new adapter.
llvm-svn: 243663
Matt Arsenault [Thu, 30 Jul 2015 17:03:11 +0000 (17:03 +0000)]
AMDGPU: Set SubRegIndex size and offset
I'm not sure what reasons the comment here could have
had for not setting these. Without these set, there is
an assertion hit during DWARF emission.
llvm-svn: 243661
Matt Arsenault [Thu, 30 Jul 2015 17:03:08 +0000 (17:03 +0000)]
AMDGPU: Fix unreachable when emitting binary debug info
Copy implementation of applyFixup from AArch64 with AArch64 bits
ripped out.
Tests will be included with a later commit. Several other
problems must be fixed before binary debug info emission
will work.
llvm-svn: 243660
Alex Lorenz [Thu, 30 Jul 2015 16:54:38 +0000 (16:54 +0000)]
MIR Serialization: Serialize the machine basic block's successor weights.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243659
David Majnemer [Thu, 30 Jul 2015 16:47:56 +0000 (16:47 +0000)]
[COFF] Add IMAGE_SCN_TYPE_NOLOAD to SectionCharacteristics
llvm-svn: 243658
Pete Cooper [Thu, 30 Jul 2015 16:44:07 +0000 (16:44 +0000)]
Add fmodules-cache-path to 2 tests which were missing it.
These tests were creating a modules.idx file in my clang checkout, not
the build directory or temp.
All the other tests in this directory use -fmodules-cache-path=%t so
updated these to match.
llvm-svn: 243657
Renato Golin [Thu, 30 Jul 2015 16:40:17 +0000 (16:40 +0000)]
[ARM] Allow setting the generic features for native cpus
Copying the already existing code for x86 to ARM to set the correct CPU
features when using -mcpu=native. We can already detect the CPU name
but we were not setting the correct feature bits.
Moving fpu/hwdiv down to make sure they override whatever we set the
default to be.
No tests because this is native detection, and not all ARM-enabled builds
will hapen at a specific CPU, or even ARM. I have tested locally and it
works as expected.
Fixes PR12794.
llvm-svn: 243656
Tom Stellard [Thu, 30 Jul 2015 16:20:42 +0000 (16:20 +0000)]
AMDGPU/SI: Simplify moveSMRDToVALU()
Summary:
Replace the switch on instruction opcode with a switch on register size.
This way we don't need to update the switch statement when we add new
SMRD variants.
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11601
llvm-svn: 243652
Tom Stellard [Thu, 30 Jul 2015 16:20:40 +0000 (16:20 +0000)]
AMDGPU/SI: Remove isTriviallyReMaterializable() function from SIInstrInfo
Summary:
This function is never called. isReallyTriviallyReMaterializable() is
the function that should be implemented instead.
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11620
llvm-svn: 243651
Daniel Sanders [Thu, 30 Jul 2015 16:11:04 +0000 (16:11 +0000)]
[libcxxabi][mips] Correct float_data::mangled_size for all ABI's.
Summary:
Patch by Nitesh Jain and Jaydeep Patil with a small revision to use ABIs rather
than Architecture Revisions (which currently imply particular ABIs).
Fixes test_demangle.pass.cpp (PR24149).
Subscribers: mclow.lists, jaydeep, nitesh.jain, hans, cfe-commits
Differential Revision: http://reviews.llvm.org/D11483
llvm-svn: 243645
Ulrich Weigand [Thu, 30 Jul 2015 15:53:58 +0000 (15:53 +0000)]
Fix sanitizer fallout from r243642
The memory-sanitizer build bot reported:
==5574== WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f03089e15f6 in
clang::Parser::TryAltiVecTokenOutOfLine(clang::DeclSpec&,
clang::SourceLocation, char const*&, unsigned int&, bool&)
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/clang/lib/Parse/ParseDecl.cpp:6290:11
This is because the "Ident_pixel" variable was uninitialized
in the getLangOpts().ZVector case, but we'd still call into
clang::Parser::TryAltiVecTokenOutOfLine, which uses the variable.
The simplest fix for this without sprinkling !getLangOpts().ZVector
checks all over the code seems to be to just initialize the variable
to nullptr; this will then do the right thing on ZVector.
Checked in to unbreak the build bots.
llvm-svn: 243644
Ulrich Weigand [Thu, 30 Jul 2015 14:10:43 +0000 (14:10 +0000)]
[SystemZ] Add support for vecintrin.h vector built-in functions
This patch adds support for the System Z vector built-in functions.
The API-defined header file has the name vecintrin.h.
The user-level functions are defined in the same style as the clang
version of altivec.h, making heavy use of the __overloadable__ and
__always_inline__ attributes. Where possible the functions expand to
generic operations rather than specific built-in functions, in the hope
that that form can be optimised better.
Where a built-in routine is specified to require an immediate integer
argument, the __enable_if__ attribute is used to verify the argument is
in fact constant and in the appropriate range.
Based on a patch by Richard Sandiford.
llvm-svn: 243643
Ulrich Weigand [Thu, 30 Jul 2015 14:08:36 +0000 (14:08 +0000)]
Add support for System z vector language extensions
The z13 vector facility has an associated language extension,
closely modeled on AltiVec/VSX. The main differences are:
- vector long, vector float and vector pixel are not supported
- vector long long and vector double are supported (like VSX)
- comparison operators return a vector rather than a scalar integer
- shift operators behave like the OpenCL shift operators
- vector bool is only supported as argument to certain operators;
some operators allow mixing a bool with a non-bool vector
This patch adds clang support for the extension. It is closely modelled
on the AltiVec support. Similarly to the -faltivec option, there's a
new -fzvector option to enable the extensions (as well as an -mzvector
alias for compatibility with GCC). There's also a separate LangOpt.
The extension as implemented here is intended to be compatible with
the -mzvector extension recently implemented by GCC.
Based on a patch by Richard Sandiford.
Differential Revision: http://reviews.llvm.org/D11001
llvm-svn: 243642
Marshall Clow [Thu, 30 Jul 2015 13:56:00 +0000 (13:56 +0000)]
Change some #ifdefs to #if - thanks to Dexon for thge catch.
llvm-svn: 243641
Vasileios Kalintiris [Thu, 30 Jul 2015 13:13:09 +0000 (13:13 +0000)]
[mips] Fix out-of-date debug information in test file.
Update the debug info in the check-lines because the change in r243638
introduced a constant initialization before the prologue's end as part
of a register spill.
llvm-svn: 243640
NAKAMURA Takumi [Thu, 30 Jul 2015 13:06:53 +0000 (13:06 +0000)]
MCJITTests/MCJITCAPITest.cpp: Try to appease i686-win32.
llvm-svn: 243639
Vasileios Kalintiris [Thu, 30 Jul 2015 12:39:33 +0000 (12:39 +0000)]
[mips][FastISel] Remove hidden mips-fast-isel option.
Summary:
This hidden option would disable code generation through FastISel by
default. It was removed from the available options and from the
Fast-ISel tests that required it in order to run the tests.
Reviewers: dsanders
Subscribers: qcolombet, llvm-commits
Differential Revision: http://reviews.llvm.org/D11610
llvm-svn: 243638
Tamas Berghammer [Thu, 30 Jul 2015 12:38:18 +0000 (12:38 +0000)]
Fix issues with separate symbolfile handling
Differential revision: http://reviews.llvm.org/D11595
llvm-svn: 243637
Vasileios Kalintiris [Thu, 30 Jul 2015 11:51:44 +0000 (11:51 +0000)]
[mips][FastISel] Apply only zero-extension to constants prior to their materialization.
Summary:
Previously, we would sign-extend non-boolean negative constants and
zero-extend otherwise. This was problematic for PHI instructions with
negative values that had a type with bitwidth less than that of the
register used for materialization.
More specifically, ComputePHILiveOutRegInfo() assumes the constants
present in a PHI node are zero extended in their container and
afterwards deduces the known bits.
For example, previously we would materialize an i16 -4 with the
following instruction:
addiu $r, $zero, -4
The register would end-up with the 32-bit 2's complement representation
of -4. However, ComputePHILiveOutRegInfo() would generate a constant
with the upper 16-bits set to zero. The SelectionDAG builder would use
that information to generate an AssertZero node that would remove any
subsequent trunc & zero_extend nodes.
In theory, we should modify ComputePHILiveOutRegInfo() to consult
target-specific hooks about the way they prefer to materialize the
given constants. However, git-blame reports that this specific code
has not been touched since 2011 and it seems to be working well for every
target so far.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11592
llvm-svn: 243636
Alexey Bataev [Thu, 30 Jul 2015 11:36:16 +0000 (11:36 +0000)]
[OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.
llvm-svn: 243635
Daniel Sanders [Thu, 30 Jul 2015 10:14:57 +0000 (10:14 +0000)]
[test-release.sh] Add -no-libunwind to disable it on targets that don't support it.
Summary:
Mips doesn't implement unw_getcontext() or libunwind::Registers_*::jumpto() yet
so we must disable libunwind for this release.
Reviewers: hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11563
llvm-svn: 243633
Michael Kuperstein [Thu, 30 Jul 2015 10:10:47 +0000 (10:10 +0000)]
[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
This contains the test-case for r243630.
Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11513
llvm-svn: 243632
Michael Kuperstein [Thu, 30 Jul 2015 10:10:25 +0000 (10:10 +0000)]
[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11512
llvm-svn: 243630
Tamas Berghammer [Thu, 30 Jul 2015 09:09:22 +0000 (09:09 +0000)]
Mark TestMiBreak as falkey on Linux
llvm-svn: 243628
Matt Arsenault [Thu, 30 Jul 2015 08:16:51 +0000 (08:16 +0000)]
Add amdopencl environment to triple
This is used by the AMD x86 OpenCL implementation
to change some ABI details on Windows and Linux.
llvm-svn: 243627
Simon Atanasyan [Thu, 30 Jul 2015 07:45:55 +0000 (07:45 +0000)]
[Mips] Implement definition of DT_MIPS_RLD_MAP dynamic tag, .rld_map section, and __RLD_MAP symbol
llvm-svn: 243626
Sean Silva [Thu, 30 Jul 2015 07:30:24 +0000 (07:30 +0000)]
Add a comment explaining differing Windows behavior.
llvm-svn: 243625
Sean Silva [Thu, 30 Jul 2015 07:23:17 +0000 (07:23 +0000)]
Enable accidentally-disabled tests.
I think I was isolating the failure in the last RUN: line during
development, and forgot to re-enable the others.
llvm-svn: 243624
Asaf Badouh [Thu, 30 Jul 2015 06:52:26 +0000 (06:52 +0000)]
[X86][AVX512BW] Remove whitespaces
llvm-svn: 243623
Mohit K. Bhakkad [Thu, 30 Jul 2015 05:45:56 +0000 (05:45 +0000)]
[LLDB][MIPS] Added expected failure for "test disassembler settings"
Patch by Nitesh Jain
Reviewers: clayborg, ovyalov.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits.
Differential Revision: http://reviews.llvm.org/D11562
llvm-svn: 243622
Ilia K [Thu, 30 Jul 2015 05:39:31 +0000 (05:39 +0000)]
Clean up test/tools/lldb-mi/variable/main.cpp after r243619
llvm-svn: 243621
Mohit K. Bhakkad [Thu, 30 Jul 2015 05:38:11 +0000 (05:38 +0000)]
[LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address
Patch by Nitesh Jain
Reviewers: clayborg, ovyalov.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits.
Differential Revision: http://reviews.llvm.org/D11176
llvm-svn: 243620
Ilia K [Thu, 30 Jul 2015 05:32:41 +0000 (05:32 +0000)]
Fix bug in expression display when determining if a pointer should be treated as a string
Summary:
Currently if the "first child" of the pointer is a char type then the pointer is displayed as a string. This test succeeds incorrectly when the pointer is to a structured type with a char type as its first field. Fix this by switching the test to retrieve the pointee type and checking that it is a char type.
Reviewers: abidh, ChuckR, ki.stfu
Subscribers: greggm, lldb-commits
Differential Revision: http://reviews.llvm.org/D11488
llvm-svn: 243619
Jaydeep Patil [Thu, 30 Jul 2015 05:06:51 +0000 (05:06 +0000)]
[LLDB][MIPS] Create Unix Signals based on target architecture
SUMMARY:
The patch creates Unix Signals based on target architecture. For MIPS it creates MipsLinuxSignals.
Reviewers: clayborg
Subscribers: mohit.bhakkad, sagar, lldb-commits
Differential Revision: http://reviews.llvm.org/D11455
llvm-svn: 243618
Adam Nemet [Thu, 30 Jul 2015 04:21:13 +0000 (04:21 +0000)]
[LoopVer] Add missing std::move
The reason I was passing this vector by value in the constructor so that
I wouldn't have to copy when initializing the corresponding member but
then I forgot the std::move.
The use-case is LoopDistribution which filters the checks then
std::moves it to LoopVersioning's constructor. With this interface we
can avoid any copies.
llvm-svn: 243616
Nico Weber [Thu, 30 Jul 2015 03:41:05 +0000 (03:41 +0000)]
Revert r243604, it (very likely) caused PR24312.
llvm-svn: 243615
Richard Smith [Thu, 30 Jul 2015 03:37:16 +0000 (03:37 +0000)]
Remove some noise "this->"s left behind by r243213.
llvm-svn: 243614
Adam Nemet [Thu, 30 Jul 2015 03:29:16 +0000 (03:29 +0000)]
[LDist] Filter the checks locally rather than in LAA, NFC
Before, we were passing the pointer partitions to LAA. Now, we get all
the checks from LAA and filter out the checks within partitions in
LoopDistribution.
This effectively concludes the steps to move filtering memchecks from
LAA into its clients. There is still some cleanup left to remove the
unused interfaces in LAA that still take PtrPartition.
(Moving this functionality to LoopDistribution also requires
needsChecking on pointers to be made public.)
llvm-svn: 243613
Richard Smith [Thu, 30 Jul 2015 03:17:16 +0000 (03:17 +0000)]
[modules] Remove redundant information written into DeclContext name lookup tables. We don't need to store the data length twice.
llvm-svn: 243612
Kostya Serebryany [Thu, 30 Jul 2015 02:33:45 +0000 (02:33 +0000)]
[libFuzzer] implement strncmp hook for data-flow-guided fuzzing (w/ and w/o dfsan), add a test
llvm-svn: 243611
Kostya Serebryany [Thu, 30 Jul 2015 02:32:51 +0000 (02:32 +0000)]
[sanitizer] add a weak hook for strncmp interceptor, both to dfsan and other sanitizers. Hide the declaration and the calls in better macros
llvm-svn: 243610
Lang Hames [Thu, 30 Jul 2015 02:05:37 +0000 (02:05 +0000)]
[MCJIT] Fix a memory leak in a unit test that was introduced in r243589.
llvm-svn: 243609
Hans Wennborg [Thu, 30 Jul 2015 01:45:17 +0000 (01:45 +0000)]
[CMake] Pass -march=i686 when targeting i686 (PR24222)
Clang will not define __i686__, even when the target triple is i686,
without -march=i686.
With this patch, the compiler-rt build will successfully detect that
Clang can target i686.
The open_memstream.cc test is a little funny. Before my patch, it
was invoked with "-m32 -m64". To make it work after my -march
change, I had to add '-march=x86-64'.
Differential Revision: http://reviews.llvm.org/D11618
llvm-svn: 243604
Kostya Serebryany [Thu, 30 Jul 2015 01:34:58 +0000 (01:34 +0000)]
[libFuzzer] implement memcmp hook for data-flow-guided fuzzing (w/o dfsan), extend the memcmp fuzzer test
llvm-svn: 243603
Sean Silva [Thu, 30 Jul 2015 01:21:56 +0000 (01:21 +0000)]
Remove bad test.
We currently don't canonicalize paths in the preprocessed files.
But we do when writing to PCH.
This causes a discrepancy on Windows with the test below.
This test fails even on unix if you change the test to use
`%S//preprocess.h`.
I am led to conclude that the invariant that this test was intending to
test has not been upheld for a while (and may never have been).
llvm-svn: 243602
Kostya Serebryany [Thu, 30 Jul 2015 01:19:17 +0000 (01:19 +0000)]
[sanitizer] add a weak hook for memcmp interceptor, to be used primarily for fuzzing. More hooks will be added later. So far this is a Linux-only feature
llvm-svn: 243601
Sean Silva [Thu, 30 Jul 2015 00:52:32 +0000 (00:52 +0000)]
Attempt to make clang-x64-ninja-win7 happy.
It looks like we were somehow relying somewhere on removing 'foo/./bar'
but *not* 'foo/../foo/bar'. Currently investigating.
llvm-svn: 243600
Alexey Samsonov [Thu, 30 Jul 2015 00:50:40 +0000 (00:50 +0000)]
[Sanitizer] Replace diagnostic string literal to workaround CMake 2.8 bug.
Let me tell you a story. Suppose you want to build your project (e.g. LLVM)
with CMake 2.8, Clang and AddressSanitizer. You also want to ensure that
Clang is fresh enough and check that CMAKE_CXX_COMPILER_VERSION is 3.1+.
This check would fail - CMake would fail to correctly calculate compiler
version if you pass CMAKE_CXX_FLAGS=-fsanitize=address.
The problem is funky compiler version calculation in
CMakeDetermineCompilerId.cmake module: it compiles the sample source
file with provided compiler and compile flags, runs "strings" and greps
for "INFO:" ASCII strings contained on the executable to fetch
"INFO:compiler", "INFO:compiler_version" etc. It limits the output of
grep to just 4 lines.
Unfortunately, if your executable was built with ASan, it would also contain
an ASCII string
INFO: %s ignores mlock/mlockall/munlock/munlockall
and INFO:compiler_version string would never be parsed.
All of the above actually happened after r243574 when we tried to
configure libcxx with just-built Clang with TSan/MSan, and the version
check mentioned above failed in HandleLLVMOptions.cmake
(╯°□°)╯.~.┻━┻
llvm-svn: 243599
Pete Cooper [Thu, 30 Jul 2015 00:40:42 +0000 (00:40 +0000)]
Prefix make_reverse_iterator with llvm namespace.
This was fallout from r243581. Turns out C++14 has make_reverse_iterator.
Thanks to Filipe and David for the quick fix suggestion.
llvm-svn: 243598
Sean Silva [Thu, 30 Jul 2015 00:26:34 +0000 (00:26 +0000)]
Avoid failure to canonicalize '..'.
Also fix completely broken and untested code which was hiding the
primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op.
I ran into this in the wild. It was causing failures in our SDK build.
Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this
is a step in the right direction, and fixes an obviously broken case.
In some sense the test case I've added here is an integration test. We
should have these routines thoroughly unit tested in llvm::sys::fs.
llvm-svn: 243597
Sanjay Patel [Thu, 30 Jul 2015 00:04:21 +0000 (00:04 +0000)]
push fast-math check for machine-combiner reassociations into instruction-type check; NFC
This makes it simpler to add instruction types that don't depend on fast-math.
llvm-svn: 243596
Kostya Serebryany [Wed, 29 Jul 2015 23:53:08 +0000 (23:53 +0000)]
[asan,tsan,msan] move the memcmp interceptor from asan/tsan to sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1)
llvm-svn: 243595
Richard Trieu [Wed, 29 Jul 2015 23:47:19 +0000 (23:47 +0000)]
Fix -Wredundant-move warning.
Without DR1579 implemented, the only case for -Wredundant-move is for a
parameter being returned with the same type as the function return type. Also
include a check to verify that the move constructor will be used by matching
nodes in the AST dump.
llvm-svn: 243594
Eric Fiselier [Wed, 29 Jul 2015 23:46:55 +0000 (23:46 +0000)]
Revert recent CMake changes again due to failing compiler-rt builds
llvm-svn: 243593
Richard Smith [Wed, 29 Jul 2015 23:38:25 +0000 (23:38 +0000)]
[modules] When performing redeclaration lookup for a using declaration, prefer
UsingShadowDecls over other declarations of the same entity in the lookup
results. This ensures that we build correct redeclaration chains for the
UsingShadowDecls (otherwise we could see assertions and other misbehavior in
modules builds, when merging combines multiple redeclaration chains for the
same entity from the same module into one chain).
llvm-svn: 243592
Eric Fiselier [Wed, 29 Jul 2015 23:23:18 +0000 (23:23 +0000)]
Attempt to fix build issues introduced by
r243574
llvm-svn: 243591
Matthias Braun [Wed, 29 Jul 2015 23:22:48 +0000 (23:22 +0000)]
IR: Implement Value::mergeUseLists() iteratively
This avoids stack overflows when the the compiler does not perform tail call
elimination. Apparently this happens for MSVC with the /Ob2 switch which
may be used by external code including this header.
Reported by and based on a patch from Jean-Francois Riendeau.
Related to rdar://
21900756
llvm-svn: 243590
Lang Hames [Wed, 29 Jul 2015 23:12:33 +0000 (23:12 +0000)]
[MCJIT] Fix PR20656 by teaching MCJIT to honor ExecutionEngine's global mapping.
This is important for users of the C API who can't supply custom symbol
resolvers yet.
llvm-svn: 243589
Rui Ueyama [Wed, 29 Jul 2015 22:53:29 +0000 (22:53 +0000)]
Remove unused #includes.
llvm-svn: 243588
Rui Ueyama [Wed, 29 Jul 2015 22:38:27 +0000 (22:38 +0000)]
COFF: Suppress "Duplicate entry" warning of lib.exe
We create a module-definition file and give that to lib.exe to
create an import library file. A module-definition has to be
syntactically and semantically correct, of course.
There was a case that we created a module-definition file that
lib.exe would complain for duplicate entries. If a user gives
an unmangled and mangled name for the same symbol, we would end
up having two duplicate lines for the mangled name in a module-
definition file.
This patch fixes that issue by uniquefying entries by mangled
symbol name.
llvm-svn: 243587
Nick Lewycky [Wed, 29 Jul 2015 22:38:23 +0000 (22:38 +0000)]
Fix typo in unused variable name.
llvm-svn: 243586
Nick Lewycky [Wed, 29 Jul 2015 22:32:47 +0000 (22:32 +0000)]
Fix typo "fuction" noticed in comments in AssumptionCache.h, and also all the other files that have the same typo. All comments, no functionality change! (Merely a "fuctionality" change.)
Bonus change to remove emacs major mode marker from SystemZMachineFunctionInfo.cpp because emacs already knows it's C++ from the extension. Also fix typo "appeary" in AMDGPUMCAsmInfo.h.
llvm-svn: 243585