Commit Graph

119773 Commits

Author SHA1 Message Date
Greg Clayton 33289908f9 Added a file descriptor interposing library for darwin. This can catch all
functions that can create file descriptors and close them. It will warn when
there close file descriptor call that returns with EBADF and show the 
corresponding stack backtraces that caused the issue. It will also log all
file descriptor create and delete calls. See the comments at the top of
FDInterposing.cpp for all of the details.

llvm-svn: 147816
2012-01-10 00:29:36 +00:00
Greg Clayton e51363857f When doing a "target modules lookup --address <addr>", show the file address
in the module when dumping the information in addition to all info that we
were previously showing.

llvm-svn: 147815
2012-01-10 00:25:18 +00:00
Greg Clayton d50d23808b Update makefile rules to support C++ files in shared libraries and fix how
the linker driver is found.

llvm-svn: 147814
2012-01-10 00:00:15 +00:00
Greg Clayton aecb12b5c6 Make a log timer for the BSD archive creation so we can track the time it
takes to open and index BSD archives.

llvm-svn: 147813
2012-01-09 23:59:30 +00:00
Eli Friedman 7f21bd74b8 Don't crash with -Wlarge-by-value-copy and a dependent type. PR11726.
llvm-svn: 147812
2012-01-09 23:46:59 +00:00
Kostya Serebryany edb4a8a128 [asan] don't include unistd.h in the headers
llvm-svn: 147811
2012-01-09 23:11:26 +00:00
Kostya Serebryany 3a55cfacf1 [asan] temporary reinstate string.h/strings.h. Removal of those caused a Mac build failulre which I failed to observe before the commit
llvm-svn: 147810
2012-01-09 22:45:05 +00:00
Kostya Serebryany d9cb2f13b3 [asan] don't include string.h and strings.h
llvm-svn: 147809
2012-01-09 22:36:51 +00:00
Richard Smith c8a79033ba Extend the diagnostic for a ',' at the end of a declaration where a ';' was
intended to cover C++ class definitions.

llvm-svn: 147808
2012-01-09 22:31:44 +00:00
Kostya Serebryany 65518014e2 [asan] don't use strstr/strncat from libc, use our own versions instead
llvm-svn: 147807
2012-01-09 22:20:49 +00:00
Jakob Stoklund Olesen 1a80e3a26b Catch runaway ARMConstantIslandPass even in -Asserts builds.
The pass is prone to looping, and it is better to crash than loop
forever, even in a -Asserts build.

<rdar://problem/10660175>

llvm-svn: 147806
2012-01-09 22:16:24 +00:00
Devang Patel 29ba4f97e6 Fix asm string wrt variants.
llvm-svn: 147805
2012-01-09 21:32:02 +00:00
Devang Patel 700e2e7505 Use descriptive variable name and remove incorrect operand number check.
llvm-svn: 147802
2012-01-09 21:30:46 +00:00
Andrew Trick 248d410e3e Adding IV chain generation to LSR.
After collecting chains, check if any should be materialized. If so,
hide the chained IV users from the LSR solver. LSR will only solve for
the head of the chain. GenerateIVChains will then materialize the
chained IV users by computing the IV relative to its previous value in
the chain.

In theory, chained IV users could be exposed to LSR's solver. This
would be considerably complicated to implement and I'm not aware of a
case where we need it. In practice it's more important to
intelligently prune the search space of nontrivial loops before
running the solver, otherwise the solver is often forced to prune the
most optimal solutions. Hiding the chained users does this well, so
that LSR is more likely to find the best IV for the chain as a whole.

llvm-svn: 147801
2012-01-09 21:18:52 +00:00
Nick Kledzik bfedfc171d add initial support for coalescing by content (c-strings) with test case
llvm-svn: 147799
2012-01-09 20:18:15 +00:00
Nico Weber a8f80b31f9 Fix "note" of a duplicate explicit instantiation definition following a specialization.
llvm-svn: 147798
2012-01-09 19:52:25 +00:00
Andrew Trick 29fe5f03d7 Adding collection of IV chains to LSR.
This collects a set of IV uses within the loop whose values can be
computed relative to each other in a sequence. Following checkins will
make use of this information.

llvm-svn: 147797
2012-01-09 19:50:34 +00:00
Kostya Serebryany 3ab81d1f26 [asan] fix mac build once more
llvm-svn: 147796
2012-01-09 19:50:06 +00:00
Sean Callanan 8ca9025216 Updating Xcode project version numbers for lldb-102 and debugserver-161
llvm-svn: 147794
2012-01-09 19:41:28 +00:00
Kostya Serebryany 3e559e87a4 [asan]: fix typo from previous commit
llvm-svn: 147793
2012-01-09 19:41:15 +00:00
Kostya Serebryany ba41e8d2c5 [asan]: fix mac build
llvm-svn: 147792
2012-01-09 19:35:11 +00:00
Akira Hatanaka 1632af603d Insert padding before unaligned long double arguments.
llvm-svn: 147791
2012-01-09 19:31:25 +00:00
Greg Clayton 01a82d1918 Fixed a return value problem with the new ABI::FixCodeAddress () function:
it was checked in as:
 virtual bool ABI::FixCodeAddress (lldb::addr_t pc);

when it should have been:

virtual lldb::addr_t ABI::FixCodeAddress (lldb::addr_t pc);


 

llvm-svn: 147790
2012-01-09 19:23:34 +00:00
Johnny Chen c2a64b9b90 Fix comment.
llvm-svn: 147789
2012-01-09 19:19:23 +00:00
Kostya Serebryany 5be458ccfd [asan] refactoring: move some common linux/mac code to asan_posix.cc
llvm-svn: 147788
2012-01-09 19:18:27 +00:00
Devang Patel 85d684a4d9 Split AsmParser into two components - AsmParser and AsmParserVariant
AsmParser holds info specific to target parser.
AsmParserVariant holds info specific to asm variants supported by the target.

llvm-svn: 147787
2012-01-09 19:13:28 +00:00
Akira Hatanaka 18334dd9e9 Move the piece of code up that skips the padding argument. Without this change,
padding insertion will not work if the coerced type is not a structure.

llvm-svn: 147786
2012-01-09 19:08:06 +00:00
Andrew Trick 4dc3eff5ae "Minor LSR debugging stuff"
llvm-svn: 147785
2012-01-09 18:58:16 +00:00
Kostya Serebryany 9fd01e5ea5 [asan] refactoring: move all interceptors to a single file
llvm-svn: 147784
2012-01-09 18:53:15 +00:00
Richard Smith 12ea3c56c3 Restore some parts of this test which were accidental reverted in r147649.
Thanks to David Blaikie for pointing this out.

llvm-svn: 147783
2012-01-09 18:30:34 +00:00
Douglas Gregor 540fd8135e When deserializing an anonymous namespace from a module, do not attach
the anonymous namespace to its parent. Semantically, this means that
the anonymous namespaces defined in one module are distinct from the
anonymous namespaces defined in another module.

llvm-svn: 147782
2012-01-09 18:07:24 +00:00
Devang Patel fa8df4837a Update language check. Do not ignore DW_LANG_Python.
Patch by  Joe Groff!

llvm-svn: 147781
2012-01-09 17:49:47 +00:00
Douglas Gregor 9b47f94133 Implement merging of namespace-scope declarations across modules, so
that we can merge, for example, two occurrences of

  namespace N { void f(); }

in two disjoint modules.

llvm-svn: 147780
2012-01-09 17:38:47 +00:00
Benjamin Kramer f7fe24f40a Move assert to the right place.
llvm-svn: 147779
2012-01-09 17:36:29 +00:00
Douglas Gregor cfe7dc6b2f Implement redeclaration merging for namespaces defined in distinct
modules. Teach name lookup into namespaces to search in each of the
merged DeclContexts as well as the (now-primary) DeclContext. This
supports the common case where two different modules put something
into the same namespace.

llvm-svn: 147778
2012-01-09 17:30:44 +00:00
Benjamin Kramer f9d0cc0160 InstCombine: Teach foldLogOpOfMaskedICmpsHelper that sign bit tests are bit tests.
This subsumes several other transforms while enabling us to catch more cases.

llvm-svn: 147777
2012-01-09 17:23:27 +00:00
Howard Hinnant d88ba82a47 Getting a start on the typeinfo infrastructure.
llvm-svn: 147776
2012-01-09 17:10:00 +00:00
Douglas Gregor dbd93bfc2d Always allow redefinition of typedefs when modules are enabled. This
is important because it's fairly common for headers (especially system
headers) to want to provide only those typedefs needed for that
particular header, based on some guard macro, e.g.,

#ifndef _SIZE_T
#define _SIZE_T
typedef long size_t;
#endif

which is repeated in a number of headers. The guard macro protects
against duplicate definitions. However, this means that only the first
occurrence of this pattern actually defines size_t, so the submodule
corresponding to this header has the only visible definition. If a
user then imports a different submodule from the same module, size_t
will be known but not visible, and therefore cannot be used.

By allowing redefinition of typedefs, each header that wants to define
size_t can do so independently, so it will be available in the
corresponding submodules.

llvm-svn: 147775
2012-01-09 15:36:04 +00:00
Abramo Bagnara 3732fa5417 Made unknown builtin diagnostic remappable.
llvm-svn: 147774
2012-01-09 10:05:48 +00:00
Chandler Carruth c16622daff Don't rely on the fact that shift values are never very large, and thus
this substraction will result in small negative numbers at worst which
become very large positive numbers on assignment and are thus caught by
the <=4 check on the next line. The >0 check clearly intended to catch
these as negative numbers.

Spotted by inspection, and impossible to trigger given the shift widths
that can be used.

llvm-svn: 147773
2012-01-09 09:47:25 +00:00
Chandler Carruth ea27c16adc Cleanup and FileCheck-ize a test.
llvm-svn: 147772
2012-01-09 09:44:26 +00:00
Craig Topper 23b9219765 Merge AVX/AVX2 into the SSE level.
llvm-svn: 147771
2012-01-09 09:19:09 +00:00
Craig Topper f287a4509e Remove AVX hack in X86Subtarget. AVX/AVX2 are now treated as an SSE level. Predicate functions have been altered to maintain previous names and behavior.
llvm-svn: 147770
2012-01-09 09:02:13 +00:00
Craig Topper b89805c77d Add HasAVX predicate to some of the AVX patterns.
llvm-svn: 147769
2012-01-09 08:34:00 +00:00
Craig Topper a51f7f75c2 Reorder a bunch of patterns to put the AVX version first thus giving it priority over the SSE version. Another step towards trying to remove the AVX hack that disables SSE from X86Subtarget.
llvm-svn: 147768
2012-01-09 08:10:38 +00:00
Craig Topper ef7f5bf8c9 Clean up patterns for MOVNT*. Not sure why there were floating point types on MOVNTPS and MOVNTDQ. And v4i64 was completely missing.
llvm-svn: 147767
2012-01-09 06:52:46 +00:00
Craig Topper c1f5622ad3 Mark MOVNTI as being supported in SSE2 OR AVX mode. This instruction has no AVX equivalent so we should use the SSE version.
llvm-svn: 147766
2012-01-09 06:38:55 +00:00
Craig Topper a081644f8a Move SSE2 logical operations PAND/POR/PXOR/PANDN above SSE1 logical operations ANDPS/ORPS/XORPS/ANDNPS. This fixes a pattern ordering issue that meant that the SSE2 instructions could never be directly selected since the SSE1 patterns would always match first. This is largely moot with the ExeDepsFix pass, but I'm trying to audit for all such ordering issues.
llvm-svn: 147765
2012-01-09 05:07:01 +00:00
Craig Topper 210e4f81b3 Change some places that were checking for AVX OR SSE1/2 to use hasXMM/hasXMMInt instead. Also fix one place that checked SSE3, but accidentally excluded AVX to use hasSSE3orAVX. This is a step towards removing the AVX hack from the X86Subtarget.h
llvm-svn: 147764
2012-01-09 02:28:15 +00:00
Rafael Espindola f28213ca01 Don't print an unused label before .cfi_endproc.
llvm-svn: 147763
2012-01-09 00:17:29 +00:00