Commit Graph

144500 Commits

Author SHA1 Message Date
Jordan Rose 4a7bf49bd4 [analyzer] If a struct has a partial lazy binding, its fields aren't Undef.
This is essentially the same problem as r174031: a lazy binding for the first
field of a struct may stomp on an existing default binding for the
entire struct. Because of the way RegionStore is set up, we can't help
but lose the top-level binding, but then we need to make sure that accessing
one of the other fields doesn't come back as Undefined.

In this case, RegionStore is now correctly detecting that the lazy binding
we have isn't the right type, but then failing to follow through on the
implications of that: we don't know anything about the other fields in the
aggregate. This fix adds a test when searching for other kinds of default
values to see if there's a lazy binding we rejected, and if so returns
a symbolic value instead of Undefined.

The long-term fix for this is probably a new Store model; see
<rdar://problem/12701038>.

Fixes <rdar://problem/13292559>.

llvm-svn: 176144
2013-02-27 00:05:29 +00:00
Manman Ren 5ae44d2b75 Debug Info: for static member variables, add AT_MIPS_linkage_name to the
definition DIE, to make old GDB happy.

We have a regression for old GDB when Clang uses DW_TAG_member to declare
static members inside a class, instead of DW_TAG_variable. This patch will fix
this regression.

rdar://problem/13291234

llvm-svn: 176143
2013-02-27 00:02:32 +00:00
Ted Kremenek 08037045f8 Refine SourceManager's isBeforeInTranslationUnit() cache to have more entries.
isBeforeInTranslationUnit() uses a cache to reduce the expensive work
to compute a common ancestor for two FileIDs.  This work is very
expensive, so even caching the latest used FileIDs was a big win.
A closer analysis of the cache before, however, shows that the cache
access pattern would oscillate between a working set of FileIDs, and
thus caching more pairs would be profitable.

This patch adds a side table for extending caching.  This side table
is bounded in size (experimentally determined in this case from
a simple Objective-C project), and when the table gets too large
we fall back to the single entry caching before as before.

On Sketch (a small example Objective-C project), this optimization
reduces -fsyntax-only time on SKTGraphicView.m by 5%.  This is
for a project that is already using PCH.

Fixes <rdar://problem/13299847>

llvm-svn: 176142
2013-02-27 00:00:26 +00:00
Jason Molenda 07c446baf4 Fix one remaining mach port number/globally unique thread ID mixup which prevented queue names
from being fetched correctly.  <rdar://problem/13290877> 

llvm-svn: 176141
2013-02-26 23:58:00 +00:00
Greg Clayton e528efd734 <rdar://problem/13287629>
Fixed an issue with clang 500's new way to represent static class variables where it emits a DW_TAG_member with a DW_AT_external(0x01) attribute and no DW_AT_data_member_location.

llvm-svn: 176140
2013-02-26 23:45:18 +00:00
Pedro Artigas e40467b589 Enhance integer division emulation support to handle types smaller than 32 bits,
enhancement done the trivial way; by extending inputs and truncating outputs 
which is addequate for targets with little or no support for integer arithmetic
on integer types less than 32 bits.

llvm-svn: 176139
2013-02-26 23:33:20 +00:00
Rafael Espindola 5718459767 Use existing macros to simplify the test a bit.
llvm-svn: 176138
2013-02-26 23:24:59 +00:00
Bill Wendling 0120ee792c Temporarily revert r176133 until testcases are modified.
llvm-svn: 176137
2013-02-26 23:18:33 +00:00
Michael Ilseman 846c6f0a32 Have a way for a target to opt-out of target-independent fast isel
llvm-svn: 176136
2013-02-26 23:15:23 +00:00
Bill Wendling d02fd83182 Fix testcases to not rely upon target-* attributes.
llvm-svn: 176135
2013-02-26 23:08:48 +00:00
Eli Bendersky 6f5d70efe9 Try to get rid of a -wunitialized warning: explicitly initialize the pointer
to NULL and use asserts to check in relevant places.

llvm-svn: 176134
2013-02-26 23:04:17 +00:00
Bill Wendling fdfd70a00c Don't set the -target-cpu and -target-features attributes just now.
This is causing some problems with some of the builders. It's non-trivial to
reset the target's features.

llvm-svn: 176133
2013-02-26 23:01:33 +00:00
Jim Ingham 344d36aa9f Mark a few more tests as "basic_process".
llvm-svn: 176132
2013-02-26 22:51:48 +00:00
Michael Ilseman a7b93c1e5f Constant fold vector bitcasts of halves similarly to how floats and doubles are folded. Test case included.
llvm-svn: 176131
2013-02-26 22:51:07 +00:00
Roman Divacky fd666e9e3c Add support for autodetection of ADM bdver2.
llvm-svn: 176130
2013-02-26 22:41:01 +00:00
Manman Ren fe494749e4 Revert r176120 as it caused a failure at static-member.cpp
llvm-svn: 176129
2013-02-26 22:35:53 +00:00
Chad Rosier 05e35566c8 No need to initialize these variables.
llvm-svn: 176128
2013-02-26 22:15:50 +00:00
Fariborz Jahanian 828b8d2415 doxygen command. Add 'attention' command to list of similar
doxygen commands. // rdar://12379053

llvm-svn: 176127
2013-02-26 22:12:16 +00:00
Daniel Malea 4dfd057e44 Add links to buildbots on the LLDB build instructions page
llvm-svn: 176126
2013-02-26 21:41:55 +00:00
Michael J. Spencer 2bb7db9d01 [TableGen] Fix ICE on MSVC 2012 Release builds.
llvm-svn: 176125
2013-02-26 21:29:47 +00:00
Bill Schmidt 8ea7af8e44 Fix PR15332 (patch by Florian Zeitz).
There's no need to generate a stack frame for PPC32 SVR4 when there are
no local variables assigned to the stack, i.e., when no red zone is needed.
(PPC64 supports a red zone, but PPC32 does not.)

llvm-svn: 176124
2013-02-26 21:28:57 +00:00
Matt Arsenault bceea5dfea Fix auto_ptr is deprecated warnings
llvm-svn: 176123
2013-02-26 21:20:35 +00:00
Matt Arsenault 376f72092c Fix assertion failure when a field is given an address space.
llvm-svn: 176122
2013-02-26 21:16:00 +00:00
Matt Arsenault 7d36c01747 Fix initializer for variables with attribute address_space set.
This would error in C++ mode unless the variable also had a cv
qualifier.

e.g.

__attribute__((address_space(2))) float foo = 1.0f; would error but
__attribute__((address_space(2))) const float foo = 1.0f; would not.

llvm-svn: 176121
2013-02-26 21:15:54 +00:00
Manman Ren 5222195831 Debug Info: for static member variables, move AT_MIPS_linkage_name from
TAG_member inside a class to the specification DIE.

Having AT_MIPS_linkage_name on TAG_member caused old gdb (GNU 6.3.50) to
error out. Also gcc 4.7 has AT_MIPS_linkage_name on the specification DIE.

rdar://problem/13291234

llvm-svn: 176120
2013-02-26 20:48:29 +00:00
Chad Rosier 31a9bbcd4a Add a test case for r176066.
llvm-svn: 176119
2013-02-26 20:22:30 +00:00
Jim Grosbach 94a2260a7f AsmParser: More generic support for integer type suffices.
For integer constants, allow 'L', 'UL' as well as 'ULL' and 'LL'. This provides
better support for shared headers between .s and .c files that define bunches
of constant values.

rdar://9321056

llvm-svn: 176118
2013-02-26 20:17:10 +00:00
Matt Arsenault 2d17bbee48 Fix typo
llvm-svn: 176117
2013-02-26 20:13:09 +00:00
Adrian Prantl 71510db7bc Ensure that DIType is regenerated after we visited an implementation that adds ivars to an interface. Fixes rdar://13175234
llvm-svn: 176116
2013-02-26 20:01:46 +00:00
Ted Kremenek 37c777ecc0 [analyzer] Use 'MemRegion::printPretty()' instead of assuming the region is a VarRegion.
Fixes PR15358 and <rdar://problem/13295437>.

Along the way, shorten path diagnostics that say "Variable 'x'" to just
be "'x'".  By the context, it is obvious that we have a variable,
and so this just consumes text space.

llvm-svn: 176115
2013-02-26 19:44:38 +00:00
Matt Beaumont-Gay 1c417da558 Warn on dropping the return value from a warn_unused_result function, even in
macros.

llvm-svn: 176114
2013-02-26 19:34:08 +00:00
Matt Arsenault c0550990c5 Another test commit. Remove trailing whitespace.
llvm-svn: 176113
2013-02-26 19:33:48 +00:00
Rafael Espindola 3a52c44865 Use the most recent decl in getExplicitVisibility.
Now that implicitly hidden template arguments can make an instantiation hidden,
it is important to look at more than just the canonical decl of the argument
in order to see if an attribute is available in a more recent decl.

This has the disadvantage of exposing when getExplicitVisibility is called,
but lets us handle cases like

template <typename T>
struct __attribute__((visibility("default"))) barT {
  static void zed() {}
};
class foo;
class __attribute__((visibility("default"))) foo;
template struct barT<foo>;

llvm-svn: 176112
2013-02-26 19:33:14 +00:00
Matt Arsenault 58f546cd15 Test commit. Remove trailing whitespace.
llvm-svn: 176111
2013-02-26 19:18:06 +00:00
Rafael Espindola db77c4ae13 Be more careful in applying pragma weak. Fixes pr14974.
GCC applies a pragma weak to a decl if it matches the mangled name. We used
to apply if it matched the plain name.

This patch is a compromise: we apply the pragma only if it matches the name
and the decl has C language linkage.

llvm-svn: 176110
2013-02-26 19:13:56 +00:00
Chad Rosier d2686ffa56 Remove a few unused arguments.
llvm-svn: 176109
2013-02-26 18:39:31 +00:00
Sean Silva cf6848f112 [docs] Use reST link instead of direct HTML link.
llvm-svn: 176108
2013-02-26 18:22:18 +00:00
Eli Bendersky 4e7f548efb Slight cosmetic fixes
llvm-svn: 176107
2013-02-26 18:05:31 +00:00
Greg Clayton 5e3e1499c0 Backed out a hacky fix that is no longer needed.
llvm-svn: 176106
2013-02-26 17:59:39 +00:00
Christian Konig e500e445c5 R600/SI: Add promotion of e32 to e64 in operand folding
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176105
2013-02-26 17:52:47 +00:00
Christian Konig f741fbfb1b R600/SI: add VOP mapping functions
Make it possible to map between e32 and e64 encoding opcodes.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176104
2013-02-26 17:52:42 +00:00
Christian Konig 6612ac39c9 R600/SI: swap operands if it helps folding
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176103
2013-02-26 17:52:36 +00:00
Christian Konig 76edd4f2bc R600/SI: add some more instruction flags
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176102
2013-02-26 17:52:29 +00:00
Christian Konig f82901af2a R600/SI: add post ISel folding for SI v2
Include immediate folding and SGPR limit handling for VOP3 instructions.

v2: remove leftover hasExtraSrcRegAllocReq

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176101
2013-02-26 17:52:23 +00:00
Christian Konig d910b7d534 R600/SI: add folding helper
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176100
2013-02-26 17:52:16 +00:00
Christian Konig d303996918 R600/SI: fix VOP3b encoding v2
v2: document why we hardcode VCC for now.

This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176099
2013-02-26 17:52:09 +00:00
Christian Konig 0f0a8fe2dd R600/SI: fix and cleanup SI register definition v2
Prevent producing real strange tablegen code by using
proper register sizes, alignments and hierarchy.

Also cleanup the unused definitions and add some comments.

v2: add SGPR 512 bit registers, stop registers from wrapping around,
    fix SGPR alignment

This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176098
2013-02-26 17:52:03 +00:00
Christian Konig d76ed54b60 R600/SI: fix stupid typo
This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176097
2013-02-26 17:51:57 +00:00
Renato Golin 276ec45704 Adding ARM as supported architecture
llvm-svn: 176096
2013-02-26 17:23:13 +00:00
Renato Golin e7693537d8 Proper XFAILs for ARMv7 / v5
llvm-svn: 176095
2013-02-26 17:16:27 +00:00