Commit Graph

162523 Commits

Author SHA1 Message Date
Michael Liao d617a3015d Fix PR18054
- Fix bug in (vsext (vzext x)) -> (vsext x) in SIGN_EXTEND_IN_REG
  lowering where we need to check whether x is a vector type (in-reg
  type) of i8, i16 or i32; otherwise, that optimization is not valid.

llvm-svn: 195779
2013-11-26 20:31:31 +00:00
Diego Novillo e43611fc45 Add PostDominatorTree::getDescendants.
This patch adds the counter-part to DominatorTree::getDescendants.
It also fixes a couple of comments I noticed out of date in the
DominatorTree class.

llvm-svn: 195778
2013-11-26 20:11:12 +00:00
DeLesley Hutchins 39b804f8a4 Thread safety analysis: fix ICE due to missing null check on dyn_cast.
llvm-svn: 195777
2013-11-26 19:45:21 +00:00
David Blaikie fd1eff5a0a DwarfDebug: Include type units in accelerator tables.
Since type units aren't in the CUMap, use the DwarfUnits list to iterate
over units for tasks such as accelerator table building.

llvm-svn: 195776
2013-11-26 19:14:34 +00:00
Renato Golin 1388f07053 Fix spurious return introduced by my earlier patch to DebugInfo
llvm-svn: 195775
2013-11-26 18:54:37 +00:00
Rui Ueyama 912e65ef4b [PECOFF] Fix parameter mapping for /section.
The current mapping for /section one character options is really bogus.
Map to the correct flags.

llvm-svn: 195774
2013-11-26 17:57:05 +00:00
Nadav Rotem f9f8482e3a PR18060 - When we RAUW values with ExtractElement instructions in some cases
we generate PHI nodes with multiple entries from the same basic block but
with different values. Enabling CSE on ExtractElement instructions make sure
that all of the RAUWed instructions are the same.

llvm-svn: 195773
2013-11-26 17:29:19 +00:00
Renato Golin 47f46fd42c Add return to DIType::Verify
Code scanner ran by Sylvestre Ledru got a no_return bug
in DebugInfo.cpp. Adding the return statements that
should be there.

llvm-svn: 195772
2013-11-26 16:47:00 +00:00
Alexey Samsonov d5144879f9 [Sanitizer] Improve external symbolizer behavior.
1) Don't start external symbolizer subprocess until we actually try to
   symbolize anything.
2) Allow to turn off external symbolizer by providing empty ?SAN_SYMBOLIZER_PATH
   environment variable.

llvm-svn: 195771
2013-11-26 16:24:53 +00:00
Aaron Ballman b0dc07419b Replacing a custom diagnostic with a more standard one. No functional change intended.
llvm-svn: 195770
2013-11-26 16:14:15 +00:00
Stepan Dyatkovskiy abb8505dc5 PR17925 bugfix.
Short description.

This issue is about case of treating pointers as integers.
We treat pointers as different if they references different address space.
At the same time, we treat pointers equal to integers (with machine address
width). It was a point of false-positive. Consider next case on 32bit machine:

void foo0(i32 addrespace(1)* %p)
void foo1(i32 addrespace(2)* %p)
void foo2(i32 %p)

foo0 != foo1, while
foo1 == foo2 and foo0 == foo2.

As you can see it breaks transitivity. That means that result depends on order
of how functions are presented in module. Next order causes merging of foo0
and foo1: foo2, foo0, foo1
First foo0 will be merged with foo2, foo0 will be erased. Second foo1 will be
merged with foo2.
Depending on order, things could be merged we don't expect to.

The fix:
Forbid to treat any pointer as integer, except for those, who belong to address space 0.

llvm-svn: 195769
2013-11-26 16:11:03 +00:00
Rafael Espindola 9ad6112772 Don't call getMostRecentDecl when we know we have it.
On a Release build this takes the testcase in pr18055 from 0m3.892s to 0m1.452s.

llvm-svn: 195768
2013-11-26 16:09:08 +00:00
Rafael Espindola 8ef7f6828c Move these virtual methods out of line.
llvm-svn: 195767
2013-11-26 15:12:20 +00:00
Colin Riley 909bb7a3f4 Fix MSVC build
Added _WIN32 guards to new platform features. Using correct SetErrorStringWithFormat within Host when LLDB_DISABLE_POSIX is defined. Also fixed an if defined block.

llvm-svn: 195766
2013-11-26 15:10:46 +00:00
Timur Iskhodzhanov 119f307317 Rename DwarfException methods so the new names are consistent with DwarfDebug and the style guide
llvm-svn: 195763
2013-11-26 13:34:55 +00:00
Alexander Kornienko fd1d7002e2 Changed non-printable characters in the test to the escaped form. Apparently, not all tools display non-printable characters ;)
llvm-svn: 195761
2013-11-26 13:31:46 +00:00
Gabor Greif 6ef70f957e fix a typo
llvm-svn: 195760
2013-11-26 13:28:51 +00:00
Tim Northover fa36dfeeca Darwin-ARM: use movw/movt for static relocations
llvm-svn: 195759
2013-11-26 12:45:05 +00:00
Chandler Carruth 954ee10528 [PM] Fix a stale comment after my last refactoring spoted by Joey in
review!

llvm-svn: 195757
2013-11-26 12:00:58 +00:00
Simon Atanasyan bd98663c7a [Mips] Pass -mmsa option to the assembler.
llvm-svn: 195756
2013-11-26 11:58:04 +00:00
Simon Atanasyan 8cc7c123a1 [Mips] Replace explicit argument handling by the single ArgList::AddLastArg() call.
llvm-svn: 195755
2013-11-26 11:57:58 +00:00
Simon Atanasyan 6b358b39fb [Mips] Reduce number of FileCheck variables used in the tests.
llvm-svn: 195754
2013-11-26 11:57:53 +00:00
Simon Atanasyan 3e0f388725 [Mips] Add support for nan2008 libraries and headers look up for Code
Sourcery MIPS toolchain.

llvm-svn: 195753
2013-11-26 11:57:48 +00:00
Simon Atanasyan 4cc2bfa953 [Mips] Merge two MIPS Code Sourcery toolchain tests into the single one.
llvm-svn: 195752
2013-11-26 11:57:19 +00:00
Simon Atanasyan 13e965a5c0 [Mips] Do not detect a used MIPS toolchain. Build a path suffix for FSF
toolchain first and check the path existence. If the path does not
exist build and check a path suffix for Code Sourcery toolchain.

llvm-svn: 195751
2013-11-26 11:57:14 +00:00
Simon Atanasyan 54f3f93988 [Mips] Call findMIPSABIDirSuffix() for MIPS targets only.
llvm-svn: 195750
2013-11-26 11:57:09 +00:00
Lorenzo Martignoni 895454e1e4 Implement a bunch of custom glibc wrappers & corresponding tests
llvm-svn: 195749
2013-11-26 11:45:58 +00:00
Chandler Carruth cffb33c53f [PM] Remove four extraneous 'typename's that Clang (in C++11 mode) is
happy with but GCC complains about. I'm assuming both compilers are
correct and these are optional in C++11 because I'm too tired to read
the standard. ;]

llvm-svn: 195748
2013-11-26 11:31:06 +00:00
Chandler Carruth 16ea68e806 [PM] Factor the overwhelming majority of the interface boiler plate out
of the two analysis managers into a CRTP base class that can be shared
and re-used in building any analysis manager. This will in turn simplify
adding yet another analysis manager to the system.

The base class provides all of the interface sugar for the analysis
manager delegating the functionality back through DerivedT methods which
operate on simple pass IDs. It also provides the pass registration,
storage, and lookup system which is common across the various
formulations of analysis managers.

llvm-svn: 195747
2013-11-26 11:24:37 +00:00
Richard Sandiford dd7dd930d1 [SystemZ] Fix incorrect use of RISBG for a zero-extended right shift
We would wrongly transform the testcase into the equivalent of an AND with 1.
The problem was that, when testing whether the shifted-in bits of the right
shift were significant, we used the width of the final zero-extended result
rather than the width of the shifted value.

llvm-svn: 195731
2013-11-26 10:53:16 +00:00
Alexander Kornienko 71d95d6e51 Fix crash in getStringSplit.
Summary:
getStringSplit used to crash, when trying to split a long string
literal containing both printable and unprintable multi-byte UTF-8 characters.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2268

llvm-svn: 195728
2013-11-26 10:38:53 +00:00
Arnaud A. de Grandmaison b697b538dc CMake : optionaly enable LLVM to be compiled with -std=c++11 (default: off)
In some case, it may be required to build LLVM in C++11 mode, as some the subprojects (like lldb) requires it.

This mimics the autoconf behaviour.

However, given the discussions on the switch to C++11 of the codebase, this behaviour should evolve to default to C++11 with some checks of the compiler capabilities.

llvm-svn: 195727
2013-11-26 10:33:53 +00:00
Timur Iskhodzhanov 895392d03f [ASan] Use ExitProcess rather than _exit on Windows to avoid calling global dtors etc
llvm-svn: 195723
2013-11-26 09:40:39 +00:00
Chandler Carruth 6378cf539f [PM] Split the CallGraph out from the ModulePass which creates the
CallGraph.

This makes the CallGraph a totally generic analysis object that is the
container for the graph data structure and the primary interface for
querying and manipulating it. The pass logic is separated into its own
class. For compatibility reasons, the pass provides wrapper methods for
most of the methods on CallGraph -- they all just forward.

This will allow the new pass manager infrastructure to provide its own
analysis pass that constructs the same CallGraph object and makes it
available. The idea is that in the new pass manager, the analysis pass's
'run' method returns a concrete analysis 'result'. Here, that result is
a 'CallGraph'. The 'run' method will typically do only minimal work,
deferring much of the work into the implementation of the result object
in order to be lazy about computing things, but when (like DomTree)
there is *some* up-front computation, the analysis does it prior to
handing the result back to the querying pass.

I know some of this is fairly ugly. I'm happy to change it around if
folks can suggest a cleaner interim state, but there is going to be some
amount of unavoidable ugliness during the transition period. The good
thing is that this is very limited and will naturally go away when the
old pass infrastructure goes away. It won't hang around to bother us
later.

Next up is the initial new-PM-style call graph analysis. =]

llvm-svn: 195722
2013-11-26 04:19:30 +00:00
Chandler Carruth 878b55372a [PM] Reformat some code with clang-format as I'm going to be editting as
part of generalizing the call graph infrastructure for the new pass
manager.

llvm-svn: 195718
2013-11-26 03:45:26 +00:00
Chandler Carruth 1a60023b94 [PM] Add a really simple trait to the DOTGraphTraitsPass class templates
that lets the analysis and graph types be separate and the graph
computed from the analysis through some arbitrary user-supplied code.

This will allow a call graph to an independent entity from the pass
which creates it which is necessary for the new pass manager.

llvm-svn: 195717
2013-11-26 03:43:52 +00:00
Kevin Qin 599c47d0de Refactored the implementation of AArch64 NEON instruction ZIP, UZP
and TRN.
Fix a bug when mixed use of vget_high_u8() and vuzp_u8().

llvm-svn: 195716
2013-11-26 03:26:47 +00:00
Chandler Carruth 5477a592f9 [PM] Re-format this code with clang-format before making substantial
changes to it. No functionality changed.

You may wonder why on earth touching this code is involved in the pass
manager work as indicated by my lovely '[PM]' tag? Let me tell you
a story.

<redacted>

Yea, it's too long of a story. Let us say that there are yaks, many of
them. I am busy shaving them as fast as I can.

llvm-svn: 195715
2013-11-26 03:22:09 +00:00
Alp Toker aced95a0b0 Remove some unused locals
llvm-svn: 195714
2013-11-26 02:52:41 +00:00
Kevin Qin 33ca18fdcf [AArch64]Implement 128 bit register copy with NEON.
llvm-svn: 195713
2013-11-26 02:33:42 +00:00
Andrew Trick 391dbadb51 StackMap: Implement support for DirectMemRefOp.
A Direct stack map location records the address of frame index. This
address is itself the value that the runtime requested. This differs
from IndirectMemRefOp locations, which refer to a stack locations from
which the requested values must be loaded. Direct locations can
directly communicate the address if an alloca, while IndirectMemRefOp
handle register spills.

For example:

entry:
  %a = alloca i64...
  llvm.experimental.stackmap(i32 <ID>, i32 <shadowBytes>, i64* %a)

Since both the alloca and stackmap intrinsic are in the entry block,
and the intrinsic takes the address of the alloca, the runtime can
assume that LLVM will not substitute alloca with any intervening
value. This must be verified by the runtime by checking that the stack
map's location is a Direct location type. The runtime can then
determine the alloca's relative location on the stack immediately after
compilation, or at any time thereafter. This differs from Register and
Indirect locations, because the runtime can only read the values in
those locations when execution reaches the instruction address of the
stack map.

llvm-svn: 195712
2013-11-26 02:03:25 +00:00
Andrew Trick d3ab37cfeb whitespace
llvm-svn: 195711
2013-11-26 02:03:20 +00:00
Alp Toker 62c5b5713c Unbreak -fms-extensions with GNU libc headers
GNU libc uses '__uptr' as a member name in C mode, conflicting with the
eponymous MSVC pointer modifier keyword.

Detect and mark the token as an identifier when these specific conditions are
met. __uptr will continue to work as a keyword for the remainder of the
translation unit.

Fixes PR17824.

llvm-svn: 195710
2013-11-26 01:30:10 +00:00
Chandler Carruth 8a7bdd9194 [PM] Make the (really awesome) file comment here available as part of
the Doxygen.

llvm-svn: 195709
2013-11-26 01:27:20 +00:00
Chandler Carruth e1901fafbd [PM] Reformat this file with clang-format. Mostly fixes inconsistent
spacing around the '*' in pointer types. Will let me use clang-format on
subsequent changes without introducing any noise. No functionality
changed.

llvm-svn: 195708
2013-11-26 01:25:07 +00:00
Ed Maste 0d092a446b Add decorator for FreeBSD failing test due to pr18061
The test code locks mutexes from one thread and unlocks them from a
different one, which is not valid (it's either undefined behaviour or is
required to return an error).

See http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html

llvm-svn: 195707
2013-11-26 01:11:14 +00:00
David Blaikie a357aa03af DebugInfo: Update test case due to dumper improvements in r195698
The dumper was only dumping one pubtypes set and it was /always/ dumping
one pubtypes set even when there were zero sets. Now that the dumper
correctly dumps zero, one, or many sets, we can update this test case to
test for the absolute absence of a set rather than a bogus/accidental
zero-valued set.

llvm-svn: 195706
2013-11-26 01:11:02 +00:00
Chandler Carruth 480f5d265a Lift self-copy protection up to the header file and add self-move
protection to the same layer.

This is in line with Howard's advice on how best to handle self-move
assignment as he explained on SO[1]. It also ensures that implementing
swap with move assignment continues to work in the case of self-swap.

[1]: http://stackoverflow.com/questions/9322174/move-assignment-operator-and-if-this-rhs

llvm-svn: 195705
2013-11-26 00:54:44 +00:00
Chandler Carruth 2664317b66 Fix a self-memcpy which only breaks under Valgrind's memcpy
implementation. Silliness, but it'll be a trivial performance
optimization. This should clear up a failure on the vg_leak bot.

llvm-svn: 195704
2013-11-26 00:44:36 +00:00
Richard Smith 30f5336ba8 Fix buildbot.
llvm-svn: 195703
2013-11-26 00:40:46 +00:00