Commit Graph

116487 Commits

Author SHA1 Message Date
Akira Hatanaka 770f0646db Make the type of shift amount i32 in order to reduce the number of shift
instruction definitions.

llvm-svn: 143989
2011-11-07 18:59:49 +00:00
Akira Hatanaka d5c1329078 Add 64-bit to 32-bit trunc pattern.
llvm-svn: 143988
2011-11-07 18:57:41 +00:00
Douglas Gregor 80357c6227 Add missing part of test
llvm-svn: 143985
2011-11-07 18:54:12 +00:00
Douglas Gregor 61d63d0fd7 ASTConsumer::handleTopLevelDecl will end up getting called for
function template instantiations. Fixes <rdar://problem/10398005> / PR11312.

llvm-svn: 143984
2011-11-07 18:53:57 +00:00
Eric Christopher 988ac00abd Use StringRef::startswith to do some string comparisons.
llvm-svn: 143982
2011-11-07 18:53:23 +00:00
Argyrios Kyrtzidis d569791c44 [arcmt] Fix handling NSMakeCollectable inside an objc method.
llvm-svn: 143980
2011-11-07 18:46:50 +00:00
Argyrios Kyrtzidis 722d21c646 [arcmt] In GC, handle (assign) @properties.
-Move __strong/__weak added to a property type to the property attribute,
e.g.  "@property (assign) __weak Foo *prop;" --> "@property (weak) Foo *prop;"

-Remove (assign) in a property so that it becomes strong-by-default in ARC.

llvm-svn: 143979
2011-11-07 18:46:46 +00:00
Argyrios Kyrtzidis 0dd98a4c51 [arcmt] Map property decls to their GC attributes.
llvm-svn: 143978
2011-11-07 18:40:32 +00:00
Richard Trieu 8b626ba6de Add support for printing integer literals of type short, unsigned short,
__int128_t and __uint128_t.  Short and unsigned short integer literals support
is only to work around a crasher as reported in PR11179 and will be removed
once Clang no longer builds short integer literals.

llvm-svn: 143977
2011-11-07 18:40:31 +00:00
Argyrios Kyrtzidis e80d4f228c [arcmt] In GC, change '__weak' -> '__unsafe_unretained' when applied
to objects of classes that don't support ARC weak

llvm-svn: 143976
2011-11-07 18:40:29 +00:00
Argyrios Kyrtzidis fed29142ba When applying ARC __weak to a non-objc pointer, do not give error that
__weak is unsupported by the deployment target, since it is going to be
ignored anyway.

Makes it easier for incremental migration from GC.

llvm-svn: 143975
2011-11-07 18:40:21 +00:00
Eric Christopher 2c5dab541d Avoid the use of a local temporary for comment twines.
llvm-svn: 143974
2011-11-07 18:34:47 +00:00
Matt Beaumont-Gay 50da84bdb9 Better fix for -Wnon-virtual-dtor
llvm-svn: 143972
2011-11-07 18:30:47 +00:00
Eric Christopher cc979f9ae6 Allow for the case where the name of the subprogram is "".
Fixes a self-host error.

llvm-svn: 143970
2011-11-07 18:10:17 +00:00
Matt Beaumont-Gay 4703a29e4a Remove duplicate listings for core.DivideZero
llvm-svn: 143969
2011-11-07 18:00:03 +00:00
Douglas Gregor 4109afa1f1 Drastically simplify the mapping from the declaration corresponding to
the injected-class-name of a class (or class template) to the
declaration that results from substituting the given template
arguments. Previously, we would actually perform a substitution into
the injected-class-name type and then retrieve the resulting
declaration. However, in certain, rare circumstances involving
deeply-nested member templates, we would get the wrong substitution
arguments.

This new approach just matches up the declaration with a declaration
that's part of the current context (or one of its parents), which will
either be an instantiation (during template instantiation) or the
declaration itself (during the definition of the template). This is
both more efficient (we're avoiding a substitution) and more correct
(we can't get the template arguments wrong in the member-template
case). 

Fixes <rdar://problem/9676205>.

Reinstated, now that we have the fix in r143967.

llvm-svn: 143968
2011-11-07 17:43:18 +00:00
Douglas Gregor df593fbeda Tighten up the conditions under which we consider ourselves to be
entering the context of a nested-name-specifier. Fixes
<rdar://problem/10397846>.

llvm-svn: 143967
2011-11-07 17:33:42 +00:00
Owen Anderson 7635bb7ae2 Fix llvm-objdump's MachO mode to not depend on the value returned by RelocationRef::getInfo().
llvm-svn: 143966
2011-11-07 17:21:36 +00:00
Matt Beaumont-Gay 43e15ff357 Appease -Wnon-virtual-dtor
llvm-svn: 143965
2011-11-07 17:16:31 +00:00
Richard Osborne 561fac4d4e Don't introduce custom nodes after legalization in TargetLowering::BuildSDIV()
and TargetLowering::BuildUDIV(). Fixes PR11283

llvm-svn: 143964
2011-11-07 17:09:05 +00:00
Benjamin Kramer f5fbe436bc Fix an unsafe use of Twine.
llvm-svn: 143962
2011-11-07 16:02:25 +00:00
Tobias Grosser 76c2e32a8e ScopInfo: Extract function getIdForParam()
llvm-svn: 143961
2011-11-07 12:58:59 +00:00
Tobias Grosser 120db6b583 SCEVValidator: Move into own file
llvm-svn: 143960
2011-11-07 12:58:54 +00:00
Tobias Grosser 60e85cbd9d ScopDetection: Introduce methods to check attributes of ValidatorResult
This simplifies e.g:

if (Op.type == SCEVType::INT || Op.type == SCEVType::PARAM)

  to

if (Op.isConstant())

llvm-svn: 143959
2011-11-07 12:58:46 +00:00
Tobias Grosser eadc4285db ScopDetection: Add ValidatorResult class
llvm-svn: 143958
2011-11-07 12:58:41 +00:00
Eric Christopher 8c7505f258 Remove unnecessary addition to API. Replace with something much simpler.
llvm-svn: 143925
2011-11-07 09:38:42 +00:00
Eric Christopher e1c874aa70 Add new files to cmake.
llvm-svn: 143924
2011-11-07 09:37:06 +00:00
Eric Christopher 4996c70034 Add the support code to enable the dwarf accelerator tables. Upcoming patches
to fix the types section (all types, not just global types), and testcases.

The code to do the final emission is disabled by default.

llvm-svn: 143923
2011-11-07 09:24:32 +00:00
Richard Smith f3e9e43da4 Constant expression evaluation: support for arrays.
llvm-svn: 143922
2011-11-07 09:22:26 +00:00
Eric Christopher 6e47204b0c Add a new dwarf accelerator table prototype with the goal of replacing
the pubnames and pubtypes tables. LLDB can currently use this format
and a full spec is forthcoming and submission for standardization is planned.

A basic summary:

The dwarf accelerator tables are an indirect hash table optimized
for null lookup rather than access to known data. They are output into
an on-disk format that looks like this:

.-------------.
|  HEADER     |
|-------------|
|  BUCKETS    |
|-------------|
|  HASHES     |
|-------------|
|  OFFSETS    |
|-------------|
|  DATA       |
`-------------'

where the header contains a magic number, version, type of hash function,
the number of buckets, total number of hashes, and room for a special
struct of data and the length of that struct.

The buckets contain an index (e.g. 6) into the hashes array. The hashes
section contains all of the 32-bit hash values in contiguous memory, and
the offsets contain the offset into the data area for the particular
hash.

For a lookup example, we could hash a function name and take it modulo the
number of buckets giving us our bucket. From there we take the bucket value
as an index into the hashes table and look at each successive hash as long
as the hash value is still the same modulo result (bucket value) as earlier.
If we have a match we look at that same entry in the offsets table and
grab the offset in the data for our final match.

llvm-svn: 143921
2011-11-07 09:18:42 +00:00
Eric Christopher a7b6189071 Expose a way to get the beginning of the dwarf string section.
llvm-svn: 143920
2011-11-07 09:18:38 +00:00
Eric Christopher 6abc9c5aaa Fix up comment.
llvm-svn: 143919
2011-11-07 09:18:35 +00:00
Eric Christopher 2b4f77350d Typo.
llvm-svn: 143918
2011-11-07 09:18:32 +00:00
Chandler Carruth a62ba81682 Rip out one of the features I added for the driver-include-management.
We don't actually need a separate flag for non-sysrooted paths as the
driver has to manage the sysroot anyways. The driver is not infrequently
adding paths to the header search based on their existence on the
filesystem. For that, it has to add the sysroot anyways, we should pass
it on down to CC1 already joined. More importantly, the driver cannot in
all cases distinguish between sysrooted paths and paths that are
relative to the Clang binary's installation directory. Essentially, we
always need to ignore the system root for these internal header search
options. It turns out in most of the places we were already providing
the system root in the driver, and then another one in CC1 so this fixes
several bugs.

llvm-svn: 143917
2011-11-07 09:17:31 +00:00
Chandler Carruth f470173e46 Fix Linux libc++ usage. Somehow this slipped through during the port.
Test cases for this and all the rest of the port are still in the works,
but will wait for a fixed computer and post 3.0 merging...

llvm-svn: 143916
2011-11-07 09:01:17 +00:00
Craig Topper a6d409d543 Add AVX2 variable shift instructions and intrinsics.
llvm-svn: 143915
2011-11-07 08:26:24 +00:00
Richard Smith bcb4eb2813 Fix 32-bit build bots and remove some casting-away-const warnings.
llvm-svn: 143914
2011-11-07 07:31:09 +00:00
David Blaikie 103a3a03a2 Colorize. (this is consistent with the coloring in diagnostics.html, but perhaps that's a bit out of date because it doesn't look like current clang behavior)
llvm-svn: 143913
2011-11-07 06:28:33 +00:00
Anna Zaks 82a5b7bd25 [analyzer] Add the Checker Developer Manual to the menu.
It's still under construction but has enough info to be useful.

llvm-svn: 143912
2011-11-07 05:40:51 +00:00
Anna Zaks 5259086b8e [analyzer] Add overview and checker registration to the checker developer manual.
llvm-svn: 143911
2011-11-07 05:36:29 +00:00
John McCall ffc8ca2d84 Rip out CK_GetObjCProperty.
llvm-svn: 143910
2011-11-07 05:09:54 +00:00
Richard Smith 8081560048 Constant expression evaluation: preserve subobject designator when flattening a
core constant value down to an APValue.

llvm-svn: 143909
2011-11-07 05:07:52 +00:00
John McCall c109a259d2 Rip the ObjCPropertyRef l-value kind out of IR-generation.
llvm-svn: 143908
2011-11-07 03:59:57 +00:00
David Blaikie 8c045bcf9d Remove duplicate word & unnecessary conditional.
llvm-svn: 143907
2011-11-07 03:30:03 +00:00
David Blaikie b06c68d320 Move tests to the appropriate directory to match the spec hierarchy.
llvm-svn: 143906
2011-11-07 03:27:58 +00:00
Richard Smith a08acd8588 Allow constexpr variables' initializers to be folded in C++11 mode. This
partially undoes the revert in r143491, but does not introduce any new instances
of the underlying issue (which is not yet fixed) in code which does not use
the 'constexpr' keyword.

llvm-svn: 143905
2011-11-07 03:22:51 +00:00
Craig Topper ff39be0afc Add AVX2 VPMOVMASK instructions and intrinsics.
llvm-svn: 143904
2011-11-07 03:20:35 +00:00
Craig Topper e122dcbf4a Add AVX2 VEXTRACTI128 and VINSERTI128 instructions. Fix VPERM2I128 to be qualified with HasAVX2 instead of HasAVX. Mark VINSERTF128 and VEXTRACTF128 as never having side effects.
llvm-svn: 143902
2011-11-07 02:00:04 +00:00
Craig Topper 620db14aac Fix accidental edit to __builtin_ia32_vperm2f128_ps256's name
llvm-svn: 143901
2011-11-07 00:54:28 +00:00
Chandler Carruth efad16ad6b Begin lifting some of the one-off checking logic into generic helper
routines on the base toolchain class.

llvm-svn: 143900
2011-11-06 23:39:37 +00:00