Commit Graph

223784 Commits

Author SHA1 Message Date
Jim Ingham 406ba45f24 SymbolFileDWARFDebugMap::FindTypes didn't obey the max_matches flag,
but kept looking through .o files even after it had found as many 
matches as were requested.

llvm-svn: 262051
2016-02-26 19:33:11 +00:00
Duncan P. N. Exon Smith ec599a906b SemaCXX: Support templates in availability attributes
If the availability context is `FunctionTemplateDecl`, we should look
through it to the `FunctionDecl`.  This prevents a diagnostic in the
following case:

    class C __attribute__((unavailable));
    template <class T> void foo(C&) __attribute__((unavailable));

This adds tests for availability in templates in many other cases, but
that was the only case that failed before this patch.

I added a feature `__has_feature(attribute_availability_in_templates)`
so users can test for this.

rdar://problem/24561029

llvm-svn: 262050
2016-02-26 19:27:00 +00:00
Nirav Dave 2993854bb4 Fix Sparc 32bit Lowering to rebundle up v2i32 values.
Summary: Fix LowerCall to rebundle v2i32 values after lowering and add testcase

Reviewers: jyknight

Subscribers: llvm-commits, jyknight

Differential Revision: http://reviews.llvm.org/D17615

llvm-svn: 262048
2016-02-26 18:55:22 +00:00
Sanjay Patel 155193c3aa [x86, AVX] fold 'isPositive' 256-bit vector integer operations (PR26701)
This extends the fold introduced with:
http://reviews.llvm.org/rL262036

llvm-svn: 262047
2016-02-26 18:42:50 +00:00
Dmitry Vyukov 7f022ae4c2 tsan: revert r262037
Broke aarch64 and darwin bots.

llvm-svn: 262046
2016-02-26 18:26:48 +00:00
Reid Kleckner 1762ad3e73 [IR] Optimize bitfield layout of Value for MSVC
This should save a pointer of padding from all MSVC Value subclasses.

Recall that MSVC will not pack the following bitfields together:
  unsigned Bits : 29;
  unsigned Flag1 : 1;
  unsigned Flag2 : 1;
  unsigned Flag3 : 1;

Add a static_assert because LLVM developers always trip over this
behavior. This regressed in June.

llvm-svn: 262045
2016-02-26 18:08:59 +00:00
Sanjay Patel 334685b486 [x86, AVX] add 256-bit tests
llvm-svn: 262044
2016-02-26 18:07:58 +00:00
Aidan Dodds 3cdf5516c6 remove unused local string in IRForTarget.cpp
Committed on behalf of: ldrumm <luke.drummond@codeplay.com>

Differential revision: http://reviews.llvm.org/D16412

llvm-svn: 262043
2016-02-26 18:03:06 +00:00
Sunil Srivastava a3a51fca81 Minor tweak to match the overall style.
llvm-svn: 262042
2016-02-26 18:01:12 +00:00
Aidan Dodds 5ba2b2af6e Fix bug with register values byte order in expression evaluation.
The evaluation of expressions containing register values was broken for targets for which endianness differs from host.

Committed on behalf of: mamai <marianne.mailhot.sarrasin@gmail.com>

Differential revision: http://reviews.llvm.org/D17167

llvm-svn: 262041
2016-02-26 17:40:50 +00:00
Greg Clayton 860582f78e The IOHandlerProcessSTDIO is the _only_ IOHandler that gets pushed and popped from functions that are run due to something that is NOT input from the user. All other IOHandler objects result from input from the user. An issue rose up where if a command caused the process to resume and stop and process state changed, where state changed Event objects were broadcast, it would cause the IOHandlerProcessSTDIO to have its IOHandlerProcessSTDIO::Cancel() function called. This used to always write a byte to the control pipe (IOHandlerProcessSTDIO::m_pipe) even if the IOHandlerProcessSTDIO::Run() was never called. What would happen is:
(lldb) command_that_steps_process_thousands_of_times

As the "command_that_steps_process_thousands_of_times" could be a python command that resumed the process thousands of times and in doing so the IOHandlerProcessSTDIO would get pushed when the process resumed, and popped when it stoppped, causing the call to IOHandlerProcessSTDIO::Cancel(). Since the IOHandler thread is currently in IOHandlerEditline::Run() for the command interpreter handling the "command_that_steps_process_thousands_of_times" command, IOHandlerProcessSTDIO::Run() would never get called, even though the IOHandlerProcessSTDIO is on the top of the stack. This caused the command pipe to keep getting 1 bytes written each time the IOHandlerProcessSTDIO::Cancel() was called and eventually we will deadlock since the write buffer is full.

The fix here is to make sure we are in IOHandlerProcessSTDIO::Run() before we write anything to the command pipe, and just call SetIsDone(true) if we are not.

<rdar://problem/22361364>

llvm-svn: 262040
2016-02-26 17:36:44 +00:00
Hongbin Zheng 9691d71674 Introduce fine-grain dependence analysis by tagging access functions and schedules tree with either the id of memory access or memory references.
Differential Revision: http://reviews.llvm.org/D17381

llvm-svn: 262039
2016-02-26 17:05:24 +00:00
Renato Golin 9590c532b8 [CMAKE] Update build on recent Haiku
This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess.
Please consider reviewing.

Pathc by Jérôme Duval.

llvm-svn: 262038
2016-02-26 17:01:45 +00:00
Dmitry Vyukov b8868b9bea tsan: split thread into logical and physical state
Currently ThreadState holds both logical state (required for race-detection algorithm, user-visible)
and physical state (various caches, most notably malloc cache). Move physical state in a new
Process entity. Besides just being the right thing from abstraction point of view, this solves several
problems:
1. Cache everything on P level in Go. Currently we cache on a mix of goroutine and OS thread levels.
This unnecessary increases memory consumption.
2. Properly handle free operations in Go. Frees are issue by GC which don't have goroutine context.
As the result we could not do anything more than just clearing shadow. For example, we leaked
sync objects and heap block descriptors.
3. This will allow to get rid of libc malloc in Go (now we have Processor context for internal allocator cache).
This in turn will allow to get rid of dependency on libc entirely.
4. Potentially we can make Processor per-CPU in C++ mode instead of per-thread, which will
reduce resource consumption.
The distinction between Thread and Processor is currently used only by Go, C++ creates Processor per OS thread,
which is equivalent to the current scheme.

llvm-svn: 262037
2016-02-26 16:57:14 +00:00
Sanjay Patel 4402a32b32 [x86, SSE] fold 'isPositive' vector integer operations (PR26701)
This is one of the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701

Shift and negate is what InstCombine appears to prefer, so I've started with that pattern. 
Note that the 'pcmpeq' instructions are always generating the negative one for the actual
'pcmpgt' comparison in each case (side note: why isn't there an alias mnemonic for that?).

Differential Revision: http://reviews.llvm.org/D17630

llvm-svn: 262036
2016-02-26 16:56:03 +00:00
Reid Kleckner 70c9bc71d4 [WinEH] Fix funclet return block clobber mask placement
MBB slot index intervals are half open, not closed. getMBBEndIndex()
returns the slot index of the start of the next block in layout order.
Placing a register mask there is incorrect if the successor of the
funclet return is not laid out after the return. Clang generates IR for
catch bodies before generating the following normal code, so we never
noticed this issue until the D frontend authors filed a bug about it.

Instead, we can put the clobber mask on the last instruction of the
funclet return block. We still aren't using a register mask operand on
the CATCHRET instruction because it would cause PEI to spill all CSRs,
including XMM regs, in the prologue.

Fixes PR26679.

llvm-svn: 262035
2016-02-26 16:53:19 +00:00
Rui Ueyama 68e15559b8 Fix broken buildbots.
llvm-svn: 262034
2016-02-26 16:49:54 +00:00
Tobias Grosser 8fa3e4c3fb ScopDetect/Info: Add option to disable invariant load hoisting
This is helpful for test case reduction and other experiments.

llvm-svn: 262033
2016-02-26 16:43:35 +00:00
Michael Kruse 0ac2d3e217 ScopDetection: Fix mix-up of isLoad and isStore.
This was accidentally introduced in r258947.

Thanks to Hongbin Zheng for finding this.

Found-by: etherzhhb
llvm-svn: 262032
2016-02-26 16:40:35 +00:00
Rui Ueyama 4d169bdca2 Simplify. NFC.
Regarding the comment, it is out of context because it describes
what it does not do there. It got too long because it was originally
two different comments that were simply merged together.
The semantics is described in fixAbsoluteSymbols, so we don't need it.

llvm-svn: 262031
2016-02-26 16:38:39 +00:00
Saleem Abdulrasool 16fcf0aa52 Basic: fix __USER_LABEL_PREFIX__ on Cygwin
Adjust the user label prefix for cygwin x86_64.

Resolves PR26744.

llvm-svn: 262030
2016-02-26 16:34:01 +00:00
Michael Kruse 37d136e48e Reduce indention. NFC.
The functions buildAccessMultiDimFixed and buildAccessMultiDimParam were
refactored from buildMemoryAccess. In their own functions, the control
flow can be shortcut and simplified using returns.

Suggested-by: etherzhhb
llvm-svn: 262029
2016-02-26 16:08:24 +00:00
Tamas Berghammer 7155be87cb Add new java plugin files to the xcode project
llvm-svn: 262028
2016-02-26 15:47:35 +00:00
Rui Ueyama dad77c593b Simplify. NFC.
llvm-svn: 262027
2016-02-26 15:42:06 +00:00
Rui Ueyama 72acaa1d17 Add comment on AMDGPU that the difference has no obvious reason.
llvm-svn: 262026
2016-02-26 15:39:26 +00:00
Andy Gibbs 9a31b3b07a Reduce false positives in printf/scanf format checker
Summary:
The printf/scanf format checker is a little over-zealous in handling the conditional operator.  This patch reduces work by not checking code-paths that are never used and reduces false positives regarding uncovered arguments, for example in the code fragment:

printf(minimal ? "%i\n" : "%i: %s\n", code, msg);

Reviewers: rtrieu

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15636

llvm-svn: 262025
2016-02-26 15:35:16 +00:00
Haojian Wu 0d5e9d3135 [clang-tidy] Fix an assertion failure in `modernize-use-nullptr` check.
Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D17640

llvm-svn: 262024
2016-02-26 15:34:35 +00:00
Tamas Berghammer 0ed9c497ca Revert part of rL262014 as it caused issues on gcc-i386
llvm-svn: 262023
2016-02-26 15:33:32 +00:00
Rui Ueyama eec23eb319 Fix unsafe dereference.
Bound may point to one element beyond the end of the
vector, so *Bound is not safe.

llvm-svn: 262022
2016-02-26 15:13:24 +00:00
Aidan Dodds 7f6e9d53a3 Add mips32 software breakpoints into platform::GetSoftwareBreakpointTrapOpcode().
The software breakpoint definitions for mips32 should have been included in my
recent patch that moved the software breakpoint definitions into the base platform
class.

llvm-svn: 262021
2016-02-26 15:11:01 +00:00
George Rimar e2ee72b509 [ELF] - Implemented linkerscript sections padding.
BSD linker scripts contain special cases to add NOP
padding to code sections. Syntax is next:

.init:
 {
   KEEP (*(.init))
 } =0x90909090
(0x90 is NOP)

This patch implements that functionality.

llvm-svn: 262020
2016-02-26 14:48:31 +00:00
George Rimar 9e8593949d Description of symbols is avalable here:
https://docs.oracle.com/cd/E53394_01/html/E54766/u-etext-3c.html

It is said that:
_etext - The address of _etext is the first 
location after the last read-only loadable segment.

_edata - The address of _edata is the first 
location after the last read-write loadable segment.

_end - If the address of _edata is greater than the address 
of _etext, the address of _end is same as the address of _edata.

In real life _end and _edata has different values for that case.
Both gold/bfd set _edata to the end of the last non SHT_NOBITS section.
This patch do the same for consistency.

It should fix the https://llvm.org/bugs/show_bug.cgi?id=26729.

Differential revision: http://reviews.llvm.org/D17601

llvm-svn: 262019
2016-02-26 14:36:36 +00:00
Rafael Espindola a350e266aa Refactor multiple calls to canBePreempted.
llvm-svn: 262018
2016-02-26 14:33:23 +00:00
Rafael Espindola 993f0273e3 Fix some confusion about what can be preempted.
For shared libraries we allow any weak undefined symbol to eventually be
resolved, even if we never see a definition in another .so. This matches
the behavior when handling other undefined symbols in a shared library.

For executables, we require seeing a definition in a .so or resolve it
to zero. This is also similar to how non weak symbols are handled.

llvm-svn: 262017
2016-02-26 14:27:47 +00:00
Tamas Berghammer 31d315b349 Fix address class lookup for absolute symbols
llvm-svn: 262016
2016-02-26 14:21:27 +00:00
Tamas Berghammer 87a9769e9b Add a set of new plugins to handle Java debugging
The purpose of these plugins is to make LLDB capable of debugging java
code JIT-ed by the android runtime.

Differential revision: http://reviews.llvm.org/D17616

llvm-svn: 262015
2016-02-26 14:21:23 +00:00
Tamas Berghammer 5b42c7aa25 Add support for DW_OP_push_object_address in dwarf expressions
Additionally fix the type of some dwarf expression where we had a
confusion between scalar and load address types after a dereference.

Differential revision: http://reviews.llvm.org/D17604

llvm-svn: 262014
2016-02-26 14:21:10 +00:00
Aaron Ballman 38f912ea00 Fixing an issue with the code block so that it does not appear as a list.
llvm-svn: 262013
2016-02-26 13:39:38 +00:00
Aaron Ballman c521a1a467 Giving this attribute documentation group a heading; fixes a documentation generation error.
llvm-svn: 262012
2016-02-26 13:30:58 +00:00
Sagar Thakur ba04ed4128 [LLDB][MIPS] Fix TestInferiorAssert.py for MIPS
Patch by Nitesh Jain.

Summary: The debug version of libc.so is require for backtracing which may not be available on all platforms.

Reviewers: ovyalov, clayborg
Subscribers: zturner, lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: http://reviews.llvm.org/D17131
llvm-svn: 262011
2016-02-26 13:30:34 +00:00
Tobias Grosser f8746fc88e BlockGenerators: Allow values to be removed from ScalarMap
This function is not yet used in Polly, but is useful to external projects that
generate multi-module code using Polly.

llvm-svn: 262010
2016-02-26 13:27:02 +00:00
Tobias Grosser 64ca00c344 IslAst: Expose run-time check generation as individual function
This allows to construct run-time checks for a scop without having to generate
a full AST. This is currently not taken advantage of in Polly itself, but
external users may benefit from this feature.

llvm-svn: 262009
2016-02-26 12:59:38 +00:00
Chandler Carruth 470734b512 [PM] Finish removing references to fix MSVC builds. Somehow adding base
classes changed whether the decltype of these expressions was
a reference. I'm somewhat horrified why, and there may need to be
a deeper fix on MSVC, but this should at least get the bots a step
further.

llvm-svn: 262008
2016-02-26 12:30:18 +00:00
Chris Dewhurst 829b104dc2 Reverting breaking change. Sorry.
llvm-svn: 262007
2016-02-26 12:20:10 +00:00
Chandler Carruth 58dde8cbc5 [PM] Speculative patch to try and fix MSVC's compilation.
No idea why r262004 triggered this, but just trying to fix somehow.

llvm-svn: 262006
2016-02-26 12:17:54 +00:00
Chris Dewhurst 9c3bf91d6e Reviewed at reviews.llvm.org/D17133
llvm-svn: 262005
2016-02-26 11:46:47 +00:00
Chandler Carruth 3a63435551 [PM] Introduce CRTP mixin base classes to help define passes and
analyses in the new pass manager.

These just handle really basic stuff: turning a type name into a string
statically that is nice to print in logs, and getting a static unique ID
for each analysis.

Sadly, the format of passes in anonymous namespaces makes using their
names in tests really annoying so I've customized the names of the no-op
passes to keep tests sane to read.

This is the first of a few simplifying refactorings for the new pass
manager that should reduce boilerplate and confusion.

llvm-svn: 262004
2016-02-26 11:44:45 +00:00
Chris Dewhurst 6456376fe9 Initial test commit only
llvm-svn: 262003
2016-02-26 11:38:24 +00:00
Tobias Grosser a67ac9767a Update to isl-0.16.1-68-g8fad211
This commit updates to the latest isl development version. There is no specific
feature we need on the Polly side, but we want to ensure test coverage for the
latest isl changes.

llvm-svn: 262001
2016-02-26 11:35:12 +00:00
Alexander Kornienko ba87c4db30 Use relative lines in CHECKs in race_on_mutex.c
llvm-svn: 262000
2016-02-26 11:09:32 +00:00