Commit Graph

211900 Commits

Author SHA1 Message Date
David Majnemer 4600c06434 [WinEH] Stop BranchFolding from merging across funclets
BranchFolding would merge two funclets together, this is not OK.
Disable this and strengthen the assertion in FuncletLayout.

llvm-svn: 249069
2015-10-01 21:04:13 +00:00
Chris Bieneman d943670a82 [CMake] [builtins] [iOS Sim] Adding all builtins that generate empty object files for the iOS simulator to the exclude lists.
This should help make the compiler-rt build less noisy.

llvm-svn: 249068
2015-10-01 21:03:00 +00:00
Jonathan Roelofs 86cbf543e0 Kill another reference to in-source builds
llvm-svn: 249067
2015-10-01 20:53:59 +00:00
Rafael Espindola 3e60379fd9 Don't crash on files with no symbol table.
Thanks to Roman Divacky for the test.

llvm-svn: 249066
2015-10-01 20:26:37 +00:00
Douglas Gregor a602a153de Perform Objective-C lifetime adjustments before comparing deduced lambda result types.
Objective-C ARC lifetime qualifiers are dropped when canonicalizing
function types. Perform the same adjustment before comparing the
deduced result types of lambdas. Fixes rdar://problem/22344904.

llvm-svn: 249065
2015-10-01 20:20:47 +00:00
George Rimar 57e40deb8d [ELF2] Implement --no-undefined flag.
llvm-svn: 249064
2015-10-01 20:14:45 +00:00
Devin Coughlin 195b3b0074 [analyzer] Add TK_EntireMemSpace invalidation trait.
This commit supports Sean Eveson's work on loop widening. It is NFC for now.
It adds a new TK_EntireMemSpace invalidation trait that, when applied to a
MemSpaceRegion, indicates that the entire memory space should be invalidated.

Clients can add this trait before invalidating. For example:

RegionAndSymbolInvalidationTraits ITraits;
ITraits.setTrait(MRMgr.getStackLocalsRegion(STC),
                 RegionAndSymbolInvalidationTraits::TK_EntireMemSpace);

This commit updates the existing logic invalidating global memspace regions for
calls to additionally handle arbitrary memspaces. When generating initial
clusters during cluster analysis we now add a cluster to the worklist if
the memspace for its base is marked with TK_EntireMemSpace.

This also moves the logic for invalidating globals from ClusterAnalysis to
invalidateRegionsWorker so that it is not shared with removeDeadBindingsWorker.

There are no explicit tests with this patch -- but when applied to Sean's patch
for loop widening in http://reviews.llvm.org/D12358 and after updating his code
to set the trait, the failing tests in that patch now pass.

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

llvm-svn: 249063
2015-10-01 20:09:11 +00:00
Rafael Espindola ff1dcc59d9 Make the test a bit stronger.
This shows that it is really DT_SONAME that is used to detect dups.

llvm-svn: 249062
2015-10-01 20:04:31 +00:00
Rafael Espindola 6a3b5ded8a Don't include shared libraries multiple times.
llvm-svn: 249061
2015-10-01 19:52:48 +00:00
Douglas Gregor 6032d5b332 Simplify Sema::DeduceFunctionTypeFromReturnExpr and eliminae a redundant check.
NFC

llvm-svn: 249060
2015-10-01 19:52:44 +00:00
Rui Ueyama b9287b1fba ELF2: Use -soname to create a test .so file. Remove the .so binary from repository.
llvm-svn: 249059
2015-10-01 19:39:02 +00:00
Rui Ueyama 7de3f3719a ELF2: Add -soname option.
llvm-svn: 249058
2015-10-01 19:36:04 +00:00
Chris Bieneman f14b3f10a8 [CMake] [iOS] [builtins] Adding all builtins that generate empty object files for iOS to the exclude lists.
This should help make the compiler-rt build less noisy.

llvm-svn: 249057
2015-10-01 19:26:29 +00:00
Chris Bieneman adfe26fdbd [CMake] Only build the simulator builtins if you're also building the device builtins.
This matters because simulator builtins get lipo'd together with the device builtins into a single static archive per-platform.

llvm-svn: 249056
2015-10-01 19:26:26 +00:00
Oleksiy Vyalov af87713a81 Fix Android build after r249047.
llvm-svn: 249055
2015-10-01 19:08:00 +00:00
Chris Bieneman 291723353a [CMake] Only add an OS to the supported OS lists if there are supported architectures for that OS.
llvm-svn: 249054
2015-10-01 18:58:59 +00:00
George Burgess IV ced56e6eca Teach -Wtautological-overlap-compare about enums
Prior to this patch, -Wtautological-overlap-compare would only warn us
if there was a sketchy logical comparison between variables and
IntegerLiterals. This patch makes -Wtautological-overlap-compare aware
of EnumConstantDecls, so it can apply the same logic to them.

llvm-svn: 249053
2015-10-01 18:47:52 +00:00
David Majnemer f828a0ccc7 [WinEH] Make FuncletLayout more robust against catchret
Catchret transfers control from a catch funclet to an earlier funclet.
However, it is not completely clear which funclet the catchret target is
part of.  Make this clear by stapling the catchret target's funclet
membership onto the CATCHRET SDAG node.

llvm-svn: 249052
2015-10-01 18:44:59 +00:00
Evgeniy Stepanov 74697714c2 [asan] Tweak gen_dynamic_list.py to work with both Py2 and Py3.
llvm-svn: 249051
2015-10-01 18:27:28 +00:00
Chris Bieneman 03c48b01bf [CMake] Don't include the lld test directory if LLVM_INCLUDE_TESTS is Off
This matches the behavior of LLVM and Clang.

llvm-svn: 249050
2015-10-01 18:17:47 +00:00
Chad Rosier f11d040f01 [AArch64] Deprecate a command-line option used for testing.
Support for pairing unscaled loads and stores has been enabled since the
original ARM64 port.  This feature is no longer experimental, AFAICT.

llvm-svn: 249049
2015-10-01 18:17:12 +00:00
Chris Bieneman 261d3ea0f8 [CMake] Don't include the test directories if CLANG_INCLUDE_TESTS is Off
This matches Clang's behavior.

llvm-svn: 249048
2015-10-01 18:16:56 +00:00
Enrico Granata 9b0af1b86f Add a 'type lookup' command. This command is meant to look up type information by name in a language-specific way.
Currently, it only supports Objective-C - C++ types can be looked up through debug info via 'image lookup -t', whereas ObjC types via this command are looked up by runtime introspection

This behavior is in line with type lookup's behavior in Xcode 7, but I am definitely open to feedback as to what makes the most sense here

llvm-svn: 249047
2015-10-01 18:16:18 +00:00
Jonas Paulsson 12629324a4 [SystemZ] Add some generic (floating point support) load instructions.
Add generic instructions for load complement, load negative and load positive
for fp32 and fp64, and let isel prefer them. They do not clobber CC, and so
give scheduler more freedom. SystemZElimCompare pass will convert them when it
can to the CC-setting variants.

Regression tests updated to expect the new opcodes in places where the old ones
where used. New test case SystemZ/fp-cmp-05.ll checks that
SystemZCompareElim.cpp can handle the new opcodes.

README.txt updated (bullet removed).

Note that fp128 is not yet handled, because it is relatively rare, and is a
bit trickier, because of the fact that l.dfr would operate on the sign bit of
one of the subregisters of a fp128, but we would not want to copy the other
sub-reg in case src and dst regs are not the same.

Reviewed by Ulrich Weigand.

llvm-svn: 249046
2015-10-01 18:12:28 +00:00
Igor Kudrin 2696bbeb93 [ELF2] Add --[no-]whole-archive command line switches
Summary:
If --whole-archive is used, all symbols from the following archives are added to the output. --no-whole-archive restores default behavior. These switches can be used multiple times.

NB. We have to keep an ArchiveFile instance within SymbolTable even if --whole-archive mode is active since it can be a thin archive which contains just names of external files. In that case actual memory buffers for the archive members will be stored within the File member of ArchiveFile class.

Reviewers: rafael, ruiu

Subscribers: grimar, llvm-commits

Projects: #lld

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

llvm-svn: 249045
2015-10-01 18:02:21 +00:00
Evgeniy Stepanov 8adbded6a4 [asan] Tune down SizeClassAllocator tests.
This should make the Android/x86 bot (running on a Nexus Player) less
flaky.

llvm-svn: 249044
2015-10-01 17:59:08 +00:00
Rafael Espindola e883514736 Fix printing of 64 bit values and make test more strict.
llvm-svn: 249043
2015-10-01 17:57:31 +00:00
Tom Stellard e0e582c9aa AMDGPU: Add MEM_RAT STORE_TYPED.
v2: Add test (Matt).
    Fix capitalization of isEOP (Matt).
    Move pattern to class parameter (Matt).
    Make the instruction available to Cayman (Matt).
    Change name from MEM_RAT WRITE_TYPED to MEM_RAT STORE_TYPED.

Patch by: Zoltan Gilian

llvm-svn: 249042
2015-10-01 17:51:34 +00:00
Tom Stellard c0f0fba2c4 AMDGPU: Factor out EOP query.
v2: Fix brace placement and capitalization (Matt).

Patch by: Zoltan Gilian

llvm-svn: 249041
2015-10-01 17:51:29 +00:00
Oleksiy Vyalov d21ca280cb Use %HOME%/.lldb/module_cache as a default module cache directory.
http://reviews.llvm.org/D13323

llvm-svn: 249040
2015-10-01 17:48:57 +00:00
Sean Callanan 1ab1ee7620 Removed a mutex guard that I accidentally pasted in from other code.
It was causing deadlocks when stepping out.

llvm-svn: 249039
2015-10-01 17:48:25 +00:00
Rui Ueyama fd124db996 ELF2: Tidy up Options.td again.
llvm-svn: 249038
2015-10-01 17:33:38 +00:00
Rui Ueyama 47d4f9496c Remove trailing whitespaces.
llvm-svn: 249037
2015-10-01 17:33:36 +00:00
George Rimar ee05828261 [ELF2] Implement --allow-shlib-undefined as default behavior.
We ignore --{no,}allow-shlib-undefined options and always allow undefined
symbols if we are building a DSO.

llvm-svn: 249036
2015-10-01 17:24:24 +00:00
NAKAMURA Takumi 096492a07b Reformat.
llvm-svn: 249033
2015-10-01 17:01:03 +00:00
NAKAMURA Takumi 1ed20db720 Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64"
It broke; LLVM :: CodeGen__Generic__2009-11-16-BadKillsCrash.ll

llvm-svn: 249032
2015-10-01 17:00:56 +00:00
Adrian Prantl 42ce2d3ba3 Module debugging: Also emit Objective-C interfaces forward declarations
in their module scope when building a clang module.

llvm-svn: 249031
2015-10-01 16:57:02 +00:00
Vasileios Kalintiris 447e35701a Allow a ToolChain to compute the path of a compiler-rt's component.
Summary:
This patch moves getCompilerRT() from the clang::driver::tools namespace to
the ToolChain class. This is needed for multilib toolchains that need to
place their libraries in Clang's resource directory with a layout that is
different from the default one.

Reviewers: atanasyan, rsmith

Subscribers: tberghammer, danalbert, srhines, cfe-commits

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

llvm-svn: 249030
2015-10-01 16:54:58 +00:00
Igor Kudrin d912ee9595 [ELF2] Add -Bstatic and -Bdynamic command line switches
Summary:
These switches affect library searching for '-l' which follow them. Synonym forms are also supported:
* -dy and -call_shared for -Bdynamic switch
* -dn, -non_shared and -static for -Bstatic switch 

Reviewers: rafael, ruiu

Subscribers: emaste, llvm-commits

Projects: #lld

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

llvm-svn: 249029
2015-10-01 16:42:03 +00:00
Sean Callanan b92bd7538e Made Target hold a map of languages to TypeSystems, and added some accessors.
Also added some target-level search functions so that persistent variables and
symbols can be searched for without hand-iterating across the map of
TypeSystems.

llvm-svn: 249027
2015-10-01 16:28:02 +00:00
Rafael Espindola c8b158155c Copy DT_SONAME to DT_NEEDED.
If a shared library has a DT_SONAME entry, that is what should be included
in the DT_NEEDED of a program using it.

We don't implement -soname yet, so check in a .so for now.

llvm-svn: 249025
2015-10-01 15:47:50 +00:00
Rui Ueyama bd35d75e42 ELF2: Linker scripts can refer other linker scripts. Test that.
This did not work before r249023.

llvm-svn: 249024
2015-10-01 15:45:41 +00:00
Rui Ueyama 983ed2b749 ELF2: Define Driver::addFile() as a one-stop place to open a file.
Opening a file and dispatching to readLinkerScript() or createFile()
is a common operation. We want to use that at least from Driver and
from LinkerScript. In COFF, we had the same problem. This patch
resolves the problem in the same way as we did for COFF.

Now, if you have a path that you want to open, just call
Driver->addFile(StringRef). That function opens the file and handles
that as if that were given by command line. This function is the
only place we call identify_magic().

llvm-svn: 249023
2015-10-01 15:23:09 +00:00
Rafael Espindola 812f57e6dc Use more strict types. NFC.
On 32 bit ELF these are 32 bit values.

llvm-svn: 249022
2015-10-01 15:22:42 +00:00
Sagar Thakur 2ee26ee37b Romove accidentially added statement in r249020
llvm-svn: 249021
2015-10-01 15:15:42 +00:00
Sagar Thakur b8862c0107 [LLDB][MIPS] Fix gp register value for o32 applications on 64-bit target
GP registers for o32 applications were always giving zero value because SetType() on the RegisterValue was causing the accessor functions to pickup the value from m_scalar of RegisterValue which is zero.
In this patch byte size and byte order of register value is set at the time of setting the value of the register.

llvm-svn: 249020
2015-10-01 15:05:31 +00:00
Benjamin Kramer 250c892ac1 [VFS] Remove unused setters. NFC.
llvm-svn: 249019
2015-10-01 15:02:15 +00:00
Arnaud A. de Grandmaison 849f3bf8c9 [InstCombine] Remove trivially empty lifetime start/end ranges.
Summary:
Some passes may open up opportunities for optimizations, leaving empty
lifetime start/end ranges. For example, with the following code:

    void foo(char *, char *);
    void bar(int Size, bool flag) {
      for (int i = 0; i < Size; ++i) {
        char text[1];
        char buff[1];
        if (flag)
          foo(text, buff); // BBFoo
      }
    }

the loop unswitch pass will create 2 versions of the loop, one with
flag==true, and the other one with flag==false, but always leaving
the BBFoo basic block, with lifetime ranges covering the scope of the for
loop. Simplify CFG will then remove BBFoo in the case where flag==false,
but will leave the lifetime markers.

This patch teaches InstCombine to remove trivially empty lifetime marker
ranges, that is ranges ending right after they were started (ignoring
debug info or other lifetime markers in the range).

This fixes PR24598: excessive compile time after r234581.

Reviewers: reames, chandlerc

Subscribers: llvm-commits

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

llvm-svn: 249018
2015-10-01 14:54:31 +00:00
Angel Garcia Gomez 05ca3ec7d0 Update clang-tidy documentation.
Summary:
Improve modernize-use-auto documentation (https://llvm.org/bugs/show_bug.cgi?id=24962).
Add documentation for modernize-make-unique.

Reviewers: klimek

Subscribers: cfe-commits, alexfh

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

llvm-svn: 249017
2015-10-01 14:50:40 +00:00
Rui Ueyama 44f5d91af9 ELF2: Rename undefError -> reportUndefined.
The new name starts with a verb, and it does not imply that it errors
out and exit (it acutally can just emit a warning depending on settings.)

llvm-svn: 249016
2015-10-01 14:46:54 +00:00