Commit Graph

162267 Commits

Author SHA1 Message Date
Evgeniy Stepanov c53407de3c [sanitizer] Fix build.
llvm-svn: 195433
2013-11-22 09:26:10 +00:00
Hao Liu e8bdc8c864 Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This patch only renames variables, no functional change.

llvm-svn: 195432
2013-11-22 09:24:41 +00:00
Yaron Keren e050d66e12 Compiling libcxx with gcc 4.6.4 (MingW) produces these errors:
type_traits:3280:31: error: expected primary-expression before 'decltype'
 type_traits:3280:29: error: expected ';' at end of member declaration

 memory:2415:49: error: function 'std::__1::default_delete<_Tp>::default_delete()'
 defaulted on its first declaration must not have an exception-specification

 memory:2435:49: error: function 'std::__1::default_delete<_Tp []>::default_delete()'
 defaulted on its first declaration must not have an exception-specification

The attached patch defines _LIBCPP_HAS_NO_ADVANCED_SFINAE and 
_LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS for gcc version < 4.7, making
the library compile with gcc 4.6.4.

llvm-svn: 195431
2013-11-22 09:22:12 +00:00
Artyom Skrobov be36c42df6 Deleting three tests that are redundant with test/Preprocessor/arm-target-features.c and test/Driver/arm-cortex-cpus.c
llvm-svn: 195430
2013-11-22 09:21:51 +00:00
Evgeniy Stepanov 39cc337e20 [sanitizer] Change the way we use certain linux kernel headers.
Some linux headers are broken on older kernels.
Instead of depending on the constants and types from such headers directly,
we provide our own definitions and then verify them with compile-time
assertions. This makes the dependency on the headers test-only and would allow
switching to some other way of testing on older kernels, or even disable the
tests as the last resort (after all, kernel interfaces are supposed to be
stable).

llvm-svn: 195427
2013-11-22 09:01:50 +00:00
Richard Smith f798172419 Add class-specific operator new to Decl hierarchy. This guarantees that Decls
can't accidentally be allocated the wrong way (missing prefix data for decls
from AST files, for instance) and simplifies the CreateDeserialized functions a
little. An extra DeclContext* parameter to the not-from-AST-file operator new
allows us to ensure that we don't accidentally call the wrong one when
deserializing (when we don't have a DeclContext), allows some extra checks, and
prepares for some planned modules-related changes to Decl allocation.

No functionality change intended.

llvm-svn: 195426
2013-11-22 09:01:48 +00:00
Evgeniy Stepanov fe8ed4a591 [sanitizer] Add missing header dependencies.
llvm-svn: 195425
2013-11-22 08:55:33 +00:00
Hao Liu 25aed9bb5b Fix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector types.
e.g. "%tmp = load <2 x i64>* %ptr" can't be selected. 
     "%tmp = bitcast i64 %in to <2 x i32>" can't be selected.

llvm-svn: 195424
2013-11-22 08:47:22 +00:00
Hao Liu 91ae869692 Revert last change by haoliu because of buildbot failure.
llvm-svn: 195423
2013-11-22 08:34:54 +00:00
Alp Toker c8d4f0fa1d Tidy up the no-external-assembler diag
Diags aren't usually in the first person, and 'windows' isn't the correct
product spelling to use in prose. Sidestep issues completely by making this
error message platform-neutral.

llvm-svn: 195422
2013-11-22 08:27:46 +00:00
Hao Liu b75d80fdf0 Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This solution only renames variables, no functional change.

NOTE: This is a candidate for the 3.4 branch.
llvm-svn: 195421
2013-11-22 08:17:16 +00:00
Alp Toker 9ba7536e45 Add txt file extension to VS solution's README
This matches other README.txt files in LLVM and makes things more obvious on
Windows where it's likely to be read. CRLFs are retained for the same reason.

Also fix Visual Studio product name.

llvm-svn: 195420
2013-11-22 08:00:20 +00:00
Alp Toker b159c13d11 Make ASTUnit structure stable with NDEBUG
ASTUnit instances are allocated infrequently so it's fine to keep this field
around in all build configurations.

Assigns null to silence -Wunused-private-field in Release.

llvm-svn: 195419
2013-11-22 07:49:39 +00:00
Daniel Jasper 298c3403d2 clang-format: Fix bug in alignment of complex template parameters.
Before:
  template <typename aaaaaaaaaaa, typename bbbbbbbbbbbbb, template <typename>
            class cccccccccccccccccccccc, typename ddddddddddddd>
  class C {};

After:
  template <typename aaaaaaaaaaa, typename bbbbbbbbbbbbb,
            template <typename> class cccccccccccccccccccccc,
            typename ddddddddddddd>
  class C {};

llvm-svn: 195418
2013-11-22 07:48:15 +00:00
Daniel Jasper b631d5e6f3 clang-format: Recognize braced lists with trailing function call.
Before:
  int count = set<int> { f(), g(), h() }
      .size();

After:
  int count = set<int>{f(), g(), h()}.size();

llvm-svn: 195417
2013-11-22 07:26:53 +00:00
Michael Gottesman 983f94a2b6 [block-freq] Update data in test case to be unsigned long long to fix mingw build.
llvm-svn: 195411
2013-11-22 05:00:51 +00:00
Michael Gottesman 5aba0aeedc [block-freq] Add a method to loop info for returning all loop latches for a specific loop.
We already have a method for returning one loop latch but for some
reason no one has committed one for returning loop latches in the case
where there are multiple latches.

llvm-svn: 195410
2013-11-22 05:00:48 +00:00
Jiangning Liu 72b624ac16 For AArch64, intrinsic vget_low_xxx can be optimized away.
llvm-svn: 195409
2013-11-22 02:46:20 +00:00
Jiangning Liu a91633a435 For AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.
llvm-svn: 195408
2013-11-22 02:45:13 +00:00
NAKAMURA Takumi 08be5afea4 Tweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.
They failed on bdver2 buildslave.

FIXME: FileCheck-ize them.
llvm-svn: 195407
2013-11-22 02:28:04 +00:00
Yi Jiang 79a2b0a6d1 SLP Vectorizer: Extract cost will only be added once even if the scalar has multiple external uses.
llvm-svn: 195406
2013-11-22 01:57:02 +00:00
Dmitri Gribenko ae215951a9 Comment parsing tests: XML schema: actually run the valid-function-10.xml test
It was there all the time, but I missed adding a RUN line for it.

llvm-svn: 195405
2013-11-22 01:47:15 +00:00
Jim Ingham 1a7ee7044a #include <AvailabilityMacros.h> if you want to use them. This was causing us to skip
the code that should have set thread names on Mac OS X.

<rdar://problem/15517264>

llvm-svn: 195403
2013-11-22 00:51:36 +00:00
Chandler Carruth 0dfedcddee [PM] Simplify how the SFINAE for AnalysisResultModel is applied by
factoring it out into the default template argument so clients don't
have to even think about it.

llvm-svn: 195402
2013-11-22 00:48:49 +00:00
Lang Hames 1ca1123598 Fix a typo where we were creating <def,kill> operands instead of
<def,dead> ones.

Add an assertion to make sure we catch this in the future.

Fixes <rdar://problem/15464559>.

llvm-svn: 195401
2013-11-22 00:46:32 +00:00
Chandler Carruth b3e721995f [PM] Switch analysis managers to be threaded through the run methods
rather than the constructors of passes.

This simplifies the APIs of passes significantly and removes an error
prone pattern where the *same* manager had to be given to every
different layer. With the new API the analysis managers themselves will
have to be cross connected with proxy analyses that allow a pass at one
layer to query for the analysis manager of another layer. The proxy will
both expose a handle to the other layer's manager and it will provide
the invalidation hooks to ensure things remain consistent across layers.
Finally, the outer-most analysis manager has to be passed to the run
method of the outer-most pass manager. The rest of the propagation is
automatic.

I've used SFINAE again to allow passes to completely disregard the
analysis manager if they don't need or want to care. This helps keep
simple things simple for users of the new pass manager.

Also, the system specifically supports passing a null pointer into the
outer-most run method if your pass pipeline neither needs nor wants to
deal with analyses. I find this of dubious utility as while some
*passes* don't care about analysis, I'm not sure there are any
real-world users of the pass manager itself that need to avoid even
creating an analysis manager. But it is easy to support, so there we go.

Finally I renamed the module proxy for the function analysis manager to
the more verbose but less confusing name of
FunctionAnalysisManagerModuleProxy. I hate this name, but I have no idea
what else to name these things. I'm expecting in the fullness of time to
potentially have the complete cross product of types at the proxy layer:

{Module,SCC,Function,Loop,Region}AnalysisManager{Module,SCC,Function,Loop,Region}Proxy

(except for XAnalysisManagerXProxy which doesn't make any sense)

This should make it somewhat easier to do the next phases which is to
build the upward proxy and get its invalidation correct, as well as to
make the invalidation within the Module -> Function mapping pass be more
fine grained so as to invalidate fewer fuction analyses.

After all of the proxy analyses are done and the invalidation working,
I'll finally be able to start working on the next two fun fronts: how to
adapt an existing pass to work in both the legacy pass world and the new
one, and building the SCC, Loop, and Region counterparts. Fun times!

llvm-svn: 195400
2013-11-22 00:43:29 +00:00
Tom Stellard cd6b0a658a R600: Implement TargetInstrInfo::isLegalToSplitMBBAt()
Splitting a basic block will create a new ALU clause, so we need to make
sure we aren't moving uses of registers that are local to their
current clause into a new one.

I had a test case for this, but unfortunately unrelated schedule changes
invalidated it, and I wasn't been able to come up with another one.

NOTE: This is a candidate for the 3.4 branch.
llvm-svn: 195399
2013-11-22 00:41:08 +00:00
Tom Stellard 06c67bcbe4 SelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type
The legalizer can now do this type of expansion for more
type combinations without loading and storing to and
from the stack.

NOTE: This is a candidate for the 3.4 branch.
llvm-svn: 195398
2013-11-22 00:41:05 +00:00
Tom Stellard 9cbd2c5581 Split SETCC if VSELECT requires splitting too.
This patch is a rewrite of the original patch commited in r194542. Instead of
relying on the type legalizer to do the splitting for us, we now peform the
splitting ourselves in the DAG combiner. This is necessary for the case where
the vector mask is a legal type after promotion and still wouldn't require
splitting.

Patch by: Juergen Ributzka

NOTE: This is a candidate for the 3.4 branch.
llvm-svn: 195397
2013-11-22 00:39:23 +00:00
Fariborz Jahanian 2651ac5445 ObjectiveC migrator. Improve on definition, use
and testing of objc_bridgmutable attribute per
Aaron Ballman's comments.
// rdar://15498044

llvm-svn: 195396
2013-11-22 00:02:22 +00:00
Enrico Granata de61cecd1c <rdar://problem/15530080>
Rework data formatters matching algorithm
What happens now is that, for each category, the FormatNavigator generates all possible matches, and checks them one by one
Since the possible matches do not actually depend on the category (whether a match is accepted or not does, but that check can be shifted at a more convenient time),
it is actually feasible to generate every possible match upfront and then let individual categories just scan through those

This commit changes things by introducing a notion of formatters match candidate, and shifting responsibility for generating all of them given a (ValueObject,DynamicValueType) pair
from the FormatNavigator back to the FormatManager
A list of these candidates is then passed down to each category for matching
Candidates also need to remember whether they were generated by stripping pointers, references, typedefs, since this is something that individual formatters can choose to reject
This check, however, is conveniently only done once a "textual" match has been found, so that the list of candidates is truly category-independent

While the performance benefit is small (mostly, due to caching), this is much cleaner from a design perspective

llvm-svn: 195395
2013-11-22 00:02:13 +00:00
Rui Ueyama 340cdda2f6 Fix file header comment.
llvm-svn: 195393
2013-11-21 23:54:13 +00:00
Peter Collingbourne f09d5d03fd Revert r195381, "Implement a bunch of custom glibc wrappers & corresponding tests."
It broke a buildbot.

llvm-svn: 195392
2013-11-21 23:48:19 +00:00
Eric Christopher 33ff697cb1 In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
section use the form DW_FORM_data4 whilst in Dwarf 4 and later they
use the form DW_FORM_sec_offset.

This patch updates the places where such attributes are generated to
use the appropriate form depending on the Dwarf version. The DIE entries
affected have the following tags:
DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames,
DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base

It also adds a hidden command line option "--dwarf-version=<uint>"
to llc which allows the version of Dwarf to be generated to override
what is specified in the metadata; this makes it possible to update
existing tests to check the debugging information generated for both
Dwarf 4 (the default) and Dwarf 3 using the same metadata.

Patch (slightly modified) by Keith Walker!

llvm-svn: 195391
2013-11-21 23:46:41 +00:00
Rui Ueyama fd133b300c Fix indentation and whitespace.
llvm-svn: 195389
2013-11-21 23:41:53 +00:00
Shankar Easwaran fb473c280f [test] Add InputGraph tests
llvm-svn: 195388
2013-11-21 23:37:45 +00:00
Richard Smith 0449aaf39c PR18013: Don't assert diagnosing a bad std::initializer_list construction.
llvm-svn: 195384
2013-11-21 23:30:57 +00:00
Ekaterina Romanova d5fa55470c SHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certain architectures. While generating SHLD/SHRD instructions is acceptable when optimizing for size, optimizing for speed on these platforms should be implemented using alternative sequences of instructions composed of add, adc, shr, shl, or and lea which are directPath instructions. These alternative instructions not only have a lower latency but they also increase the decode bandwidth by allowing simultaneous decoding of a third directPath instruction.
AMD's processors family K7, K8, K10, K12, K15 and K16 are known to have SHLD/SHRD instructions with very poor latency. Optimization guides for these processors recommend using an alternative sequence of instructions. For these AMD's processors, I disabled folding (or (x << c) | (y >> (64 - c))) when we are not optimizing for size.

It might be beneficial to disable this folding for some of the Intel's processors. However, since I couldn't find specific recommendations regarding using SHLD/SHRD instructions on Intel's processors, I haven't disabled this peephole for Intel.

llvm-svn: 195383
2013-11-21 23:21:26 +00:00
Peter Collingbourne 0be79e1ade Introduce two command-line flags for the instrumentation pass to control whether the labels of pointers should be ignored in load and store instructions
The new command line flags are -dfsan-ignore-pointer-label-on-store and -dfsan-ignore-pointer-label-on-load. Their default value matches the current labelling scheme.

Additionally, the function __dfsan_union_load is marked as readonly.

Patch by Lorenzo Martignoni!

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

llvm-svn: 195382
2013-11-21 23:20:54 +00:00
Peter Collingbourne 0a14a71061 Implement a bunch of custom glibc wrappers & corresponding tests.
- Introduce several new custom glibc wrappers
- Implement some of the not yet implemented wrappers
- Refactor and extend the tests
- Add script to make sure all declare custom glibc wrappers are implemented & tested.

Patch by Lorenzo Martignoni!

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

llvm-svn: 195381
2013-11-21 23:18:03 +00:00
Eric Christopher 0a13eb38c8 Move member variable up to where the rest of non-DWARF5 variables reside.
llvm-svn: 195380
2013-11-21 22:56:11 +00:00
Hans Wennborg 09d108b79e CMake: Some changes to package version names:
- Allow overriding PACKAGE_VERSION from the command-line
- Use PACKAGE_VERSION to set CPACK_PACKAGE_VERSION (used by the Win installer)
- Don't include the version number in the CPack install dir or registry key.

Differential revision: http://llvm-reviews.chandlerc.com/D2245

llvm-svn: 195379
2013-11-21 22:47:21 +00:00
Ekaterina Romanova 91b655b683 Test commit for the user "kromanova" to verify commit access. I removed "UNSUPPORTED" comment because unsigned __int128 type is in fact supported.
llvm-svn: 195378
2013-11-21 22:25:24 +00:00
Jason Molenda a69c1139e9 Tweak exports list so lldb will still build correctly when
init_lldb is absent (when doing a no-python build).

llvm-svn: 195377
2013-11-21 22:23:46 +00:00
Fariborz Jahanian 87c7791bb7 ObjectiveC. Implement attribute 'objc_bridge_mutable'
whose semantic is currently identical to objc_bridge,
but their differences may manifest down the road with
further enhancements. // rdar://15498044

llvm-svn: 195376
2013-11-21 20:50:32 +00:00
Benjamin Kramer c680226fbf Remove dangling documentation. llvm-prof was deleted a while ago.
llvm-svn: 195372
2013-11-21 19:32:37 +00:00
Greg Clayton 904c145d4c Exit if launch doesn't succeed.
llvm-svn: 195371
2013-11-21 19:03:34 +00:00
Greg Clayton dd59dcb6d1 Added the ability to launch the program that was specified on the command line and have it waiting for a NativeProcessProtocol to attach.
llvm-svn: 195370
2013-11-21 18:58:35 +00:00
Greg Clayton be94a04055 Start the correct host abstraction of process and thread.
Added a new "Host/Debug.h" which contains the pure virtual class definitions for NativeProcessProtocol and NativeThreadProtocol. These classes are host layer classes that, over time, every host that supports debugging will implement once.

Then the new "lldb-gdbserver" binary in the tools directory will be able to make a remote debugging binary from these native classes, and we will also be able to have a new lldb_private::Process class that implements native debugging using these classes.

So as soon as linux and MacOSX switch over to using this layer, everyone will get native and remote debugging.

This check-in is primarily to get the needed code in so that poeple can start trying to implement the NativeProcessProtocol and NativeThreadProtocol and use it in the GDBRemoteCommunicationServer class to implement a GDB server for remote debugging.

llvm-svn: 195369
2013-11-21 18:39:32 +00:00
Fariborz Jahanian d9aef7883d ObjectiveC migrator. delegate property must be
inferred as 'assign', not 'assign' and 'strong'.
// rdar://15509831

llvm-svn: 195368
2013-11-21 17:49:34 +00:00