platform/upstream/llvm.git
11 years agollvm-dwarfdump: Do not include address offsets for attributes, only for tags
David Blaikie [Mon, 19 Aug 2013 03:36:23 +0000 (03:36 +0000)]
llvm-dwarfdump: Do not include address offsets for attributes, only for tags

This reduces the noise in diffs making it more likely that, at least for
LLVM revision-over-revision, diffs will actually yield usable results.

This is consistent with objdump's DWARF dumping behavior.

llvm-svn: 188650

11 years agoDebugInfo: don't emit zero-length names for parameters
David Blaikie [Mon, 19 Aug 2013 03:34:03 +0000 (03:34 +0000)]
DebugInfo: don't emit zero-length names for parameters

We check this in many/all other cases, just missed this one it seems.
Perhaps it'd be worth unifying this so we never emit zero-length
DW_AT_names.

llvm-svn: 188649

11 years agoMake the version of Stmt::operator new that takes ASTContext* call the ASTContext...
Craig Topper [Mon, 19 Aug 2013 03:11:34 +0000 (03:11 +0000)]
Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.

llvm-svn: 188648

11 years agoSema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction
David Majnemer [Mon, 19 Aug 2013 02:43:08 +0000 (02:43 +0000)]
Sema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction

Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.

Reviewers: eli.friedman, doug.gregor, majnemer

Reviewed By: majnemer

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1434

llvm-svn: 188647

11 years agoRemove SpecialCaseList::findCategory.
Peter Collingbourne [Mon, 19 Aug 2013 00:24:20 +0000 (00:24 +0000)]
Remove SpecialCaseList::findCategory.

It turned out that I didn't need this for DFSan.

llvm-svn: 188646

11 years agoRevert r188644 to unbreak buildbots.
Craig Topper [Sun, 18 Aug 2013 20:38:37 +0000 (20:38 +0000)]
Revert r188644 to unbreak buildbots.

llvm-svn: 188645

11 years agoRemove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext...
Craig Topper [Sun, 18 Aug 2013 20:03:21 +0000 (20:03 +0000)]
Remove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext& version.

llvm-svn: 188644

11 years agoARM: make sure we keep inline asm operands tied.
Tim Northover [Sun, 18 Aug 2013 18:06:03 +0000 (18:06 +0000)]
ARM: make sure we keep inline asm operands tied.

When patching inlineasm nodes to use GPRPair for 64-bit values, we
were dropping the information that two operands were tied, which
effectively broke the live-interval of vregs affected.

llvm-svn: 188643

11 years agoRevert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not...
David Blaikie [Sun, 18 Aug 2013 17:59:12 +0000 (17:59 +0000)]
Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""

This reverts commit r188600.

r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.

llvm-svn: 188642

11 years agoRemove throw() from Stmt::operator new so the compiler will omit the null check on...
Craig Topper [Sun, 18 Aug 2013 17:45:38 +0000 (17:45 +0000)]
Remove throw() from Stmt::operator new so the compiler will omit the null check on the result since ASTContext allocator won't return null.

llvm-svn: 188641

11 years agoDebugInfo: Avoid duplicating types that may be created during the process of creating...
David Blaikie [Sun, 18 Aug 2013 17:36:19 +0000 (17:36 +0000)]
DebugInfo: Avoid duplicating types that may be created during the process of creating their context

A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).

There are other ways we could consider addressing this (see FIXME).

llvm-svn: 188640

11 years agoDebugInfo: Don't emit vbase 'containing types' for context chain limited types
David Blaikie [Sun, 18 Aug 2013 16:55:33 +0000 (16:55 +0000)]
DebugInfo: Don't emit vbase 'containing types' for context chain limited types

Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)

llvm-svn: 188639

11 years agoInitHeaderSearch.cpp: [Cygwin] Add 4.7.3.
NAKAMURA Takumi [Sun, 18 Aug 2013 15:03:03 +0000 (15:03 +0000)]
InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.

llvm-svn: 188638

11 years agoAVX-512: Added VMOVD, VMOVQ, VMOVSS, VMOVSD instructions.
Elena Demikhovsky [Sun, 18 Aug 2013 13:08:57 +0000 (13:08 +0000)]
AVX-512: Added VMOVD, VMOVQ, VMOVSS, VMOVSD instructions.

llvm-svn: 188637

11 years agoMake expression allocation methods use a 'const' reference to the ASTContext since...
Craig Topper [Sun, 18 Aug 2013 10:09:15 +0000 (10:09 +0000)]
Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference.

llvm-svn: 188636

11 years agoIt appears that glibc 2.13 has the same thread descriptor size as 2.11,
Chandler Carruth [Sun, 18 Aug 2013 10:04:51 +0000 (10:04 +0000)]
It appears that glibc 2.13 has the same thread descriptor size as 2.11,
bump up the inflection point to 2.14. If someone can tell me how to
actually figure out value for this, that would be awesome.

Anyways, this takes me to one ASan failure, one LSan failure, and three
TSan failures for 'check-all' on Linux.

llvm-svn: 188635

11 years agoMake more of the lowering helpers static. Also use MVT instead of EVT in a couple...
Craig Topper [Sun, 18 Aug 2013 08:53:01 +0000 (08:53 +0000)]
Make more of the lowering helpers static. Also use MVT instead of EVT in a couple places.

llvm-svn: 188629

11 years agoRevert r188369 (and r188455) which breaks the build on at least some
Chandler Carruth [Sun, 18 Aug 2013 08:47:06 +0000 (08:47 +0000)]
Revert r188369 (and r188455) which breaks the build on at least some
Linux systems. I've replied on the original commit thread with details
of the problem.

llvm-svn: 188628

11 years agodocs: command guide: cleanups, no text changes
Dmitri Gribenko [Sun, 18 Aug 2013 08:32:32 +0000 (08:32 +0000)]
docs: command guide: cleanups, no text changes

llvm-svn: 188627

11 years agoRemove unused stdio.h includes
Dmitri Gribenko [Sun, 18 Aug 2013 08:29:51 +0000 (08:29 +0000)]
Remove unused stdio.h includes

llvm-svn: 188626

11 years agolibclang: cleanup unused includes in public header
Dmitri Gribenko [Sun, 18 Aug 2013 07:57:43 +0000 (07:57 +0000)]
libclang: cleanup unused includes in public header

llvm-svn: 188625

11 years agoRename "polly-test" in the document and script.
Logan Chien [Sun, 18 Aug 2013 07:33:28 +0000 (07:33 +0000)]
Rename "polly-test" in the document and script.

The Makefile rule "polly-test" has been renamed to
"check-polly" in r182171.  This CL updates the document and
the automatic build script.

llvm-svn: 188624

11 years agoFix a use-after-free found in libclang when doing code completion. The
Chandler Carruth [Sun, 18 Aug 2013 07:20:52 +0000 (07:20 +0000)]
Fix a use-after-free found in libclang when doing code completion. The
loop processing the candidates can cause new declerations to be added to
the context, invalidating lookup_result. To avoid that, make a copy of
the list of declarations to iterate over.

I don't have a way to check in a test case for this as it involves
a giant pile of source code and a generated PCH file used to accelerate
code completion, all of this running under ASan.

llvm-svn: 188623

11 years agoDebugInfo: don't require full definitions for friend classes
David Blaikie [Sun, 18 Aug 2013 04:50:23 +0000 (04:50 +0000)]
DebugInfo: don't require full definitions for friend classes

Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).

llvm-svn: 188622

11 years ago{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
NAKAMURA Takumi [Sun, 18 Aug 2013 03:48:57 +0000 (03:48 +0000)]
{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.

llvm-svn: 188621

11 years agoMakefile.rules: Avoid -fomit-frame-pointer also on cygwin due to PR14646.
NAKAMURA Takumi [Sun, 18 Aug 2013 03:38:40 +0000 (03:38 +0000)]
Makefile.rules: Avoid -fomit-frame-pointer also on cygwin due to PR14646.

llvm-svn: 188620

11 years agoMakefile.rules: Simplify nested if(s) on OmitFramePointer.
NAKAMURA Takumi [Sun, 18 Aug 2013 02:46:21 +0000 (02:46 +0000)]
Makefile.rules: Simplify nested if(s) on OmitFramePointer.

llvm-svn: 188619

11 years agoPort the detection of zlib from the main autoconf system to the sample
Chandler Carruth [Sun, 18 Aug 2013 01:55:15 +0000 (01:55 +0000)]
Port the detection of zlib from the main autoconf system to the sample
project's autoconf. This is the last of the missing optional checks used
by libSupport that seemed to be missing from the sample project, but
I could easily have missed some as this was done by inspection when
Craig asked me to add the terminfo support.

llvm-svn: 188618

11 years agoAdd support for linking librt and using clock_gettime to the sample
Chandler Carruth [Sun, 18 Aug 2013 01:46:34 +0000 (01:46 +0000)]
Add support for linking librt and using clock_gettime to the sample
autoconf setup.

llvm-svn: 188617

11 years agoUpdate the sample project autoconf setup to include support for
Chandler Carruth [Sun, 18 Aug 2013 01:43:57 +0000 (01:43 +0000)]
Update the sample project autoconf setup to include support for
detecting terminfo. Requested by Craig Topper, and probably should be
done much more systematically.

llvm-svn: 188616

11 years agoGo through the really awkward dance required to delete the memory
Chandler Carruth [Sun, 18 Aug 2013 01:20:32 +0000 (01:20 +0000)]
Go through the really awkward dance required to delete the memory
allocated by setupterm. Without this, some folks are seeing leaked
memory whenever this routine is called more than once. Thanks to Craig
Topper for the report.

llvm-svn: 188615

11 years agoFix SCEVExpander creating distinct duplicate PHI entries
Hal Finkel [Sun, 18 Aug 2013 00:16:23 +0000 (00:16 +0000)]
Fix SCEVExpander creating distinct duplicate PHI entries

This fixes SCEVExpander so that it does not create multiple distinct induction
variables for duplicate PHI entries. Specifically, given some code like this:

do.body6:                                         ; preds = %do.body6, %do.body6, %if.then5
  %end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ]
...

Note that it is legal to have multiple entries for a basic block so long as the
associated value is the same. So the above input is okay, but expanding an
AddRec in this loop could produce code like this:

do.body6:                                         ; preds = %do.body6, %do.body6, %if.then5
  %indvar = phi i64 [ %indvar.next, %do.body6 ], [ %indvar.next1, %do.body6 ], [ 0, %if.then5 ]
  %end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ]
...
  %indvar.next = add i64 %indvar, 1
  %indvar.next1 = add i64 %indvar, 1

And this is not legal because there are two PHI entries for %do.body6 each with
a distinct value.

Unfortunately, I don't have an in-tree test case.

llvm-svn: 188614

11 years agoFix endian conditions on Solaris. From Alexander Esilevich.
Joerg Sonnenberger [Sat, 17 Aug 2013 22:32:10 +0000 (22:32 +0000)]
Fix endian conditions on Solaris. From Alexander Esilevich.

llvm-svn: 188613

11 years agoPR16927: Don't assert (or, previously, skip) static data members of enumeration type
David Blaikie [Sat, 17 Aug 2013 20:01:53 +0000 (20:01 +0000)]
PR16927: Don't assert (or, previously, skip) static data members of enumeration type

llvm-svn: 188612

11 years agoRevert "cpp11-migrate: Add a class to support include directives modifications"
Guillaume Papin [Sat, 17 Aug 2013 19:04:56 +0000 (19:04 +0000)]
Revert "cpp11-migrate: Add a class to support include directives modifications"

This reverts commit r188610.

Issue with the absolute include paths not found in the unit tests on the Windows
bots. Needs investigation.

llvm-svn: 188611

11 years agocpp11-migrate: Add a class to support include directives modifications
Guillaume Papin [Sat, 17 Aug 2013 18:48:31 +0000 (18:48 +0000)]
cpp11-migrate: Add a class to support include directives modifications

The IncludeDirectives class helps with detecting and modifying #include
directives. For now it allows the users to add angled-includes in a source file.
This is a start for this class that will evolve in the future to add more
functionality.

llvm-svn: 188610

11 years agoFix the name and the type of the argument for intrinisc
Juergen Ributzka [Sat, 17 Aug 2013 16:40:09 +0000 (16:40 +0000)]
Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.

This fixes bug PR 16581 and rdar:14747994.

llvm-svn: 188609

11 years agoThe vbroadcastsi256 intrinsic does not exactly resemble the GCC
Juergen Ributzka [Sat, 17 Aug 2013 16:38:37 +0000 (16:38 +0000)]
The vbroadcastsi256 intrinsic does not exactly resemble the GCC
builtin. The GCC builtin expects the arguments to be passed by val,
whereas the LLVM intrinsic expects a pointer instead.

This is related to PR 16581 and rdar:14747994.

llvm-svn: 188608

11 years ago+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys...
Anton Yartsev [Sat, 17 Aug 2013 15:43:19 +0000 (15:43 +0000)]
+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys perl ports.

llvm-svn: 188607

11 years agoRecognize NetBSD's terminfo implementation.
Joerg Sonnenberger [Sat, 17 Aug 2013 11:06:00 +0000 (11:06 +0000)]
Recognize NetBSD's terminfo implementation.

llvm-svn: 188606

11 years agoPR 16899: Do not modify the basic block using the iterator, but keep the
Joerg Sonnenberger [Sat, 17 Aug 2013 11:04:47 +0000 (11:04 +0000)]
PR 16899: Do not modify the basic block using the iterator, but keep the
next value. This avoids crashes due to invalidation.

Patch by Joey Gouly.

llvm-svn: 188605

11 years agoFollow-up to the checkin of r188532 -- make sure that
Jason Molenda [Sat, 17 Aug 2013 03:39:52 +0000 (03:39 +0000)]
Follow-up to the checkin of r188532 -- make sure that
we've read the ObjectFile's Symtab before we change the
File addresses in the Sections.

llvm-svn: 188604

11 years agoFix indentation.
Richard Smith [Sat, 17 Aug 2013 00:51:11 +0000 (00:51 +0000)]
Fix indentation.

llvm-svn: 188603

11 years agoRefactor all diagnosing of TypoCorrections through a common function, in
Richard Smith [Sat, 17 Aug 2013 00:46:16 +0000 (00:46 +0000)]
Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.

llvm-svn: 188602

11 years agoRename libIDE to libIndex.
Argyrios Kyrtzidis [Sat, 17 Aug 2013 00:40:41 +0000 (00:40 +0000)]
Rename libIDE to libIndex.

Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.

llvm-svn: 188601

11 years agoRevert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the...
David Blaikie [Sat, 17 Aug 2013 00:06:55 +0000 (00:06 +0000)]
Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"

This reverts commit r188576.

Reverting while I investigate a selfhosting buildbot failure on Darwin.

llvm-svn: 188600

11 years agoR600: Fix possible use of an uninitialized variable
Tom Stellard [Sat, 17 Aug 2013 00:06:51 +0000 (00:06 +0000)]
R600: Fix possible use of an uninitialized variable

Spotted by Nick Lewycky!

llvm-svn: 188599

11 years agoR600: Expand vector FRINT ops
Tom Stellard [Fri, 16 Aug 2013 23:51:33 +0000 (23:51 +0000)]
R600: Expand vector FRINT ops

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188598

11 years agoR600: Expand vector FFLOOR ops
Tom Stellard [Fri, 16 Aug 2013 23:51:29 +0000 (23:51 +0000)]
R600: Expand vector FFLOOR ops

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188597

11 years agoR600: Expand vector float operations for both SI and R600
Tom Stellard [Fri, 16 Aug 2013 23:51:24 +0000 (23:51 +0000)]
R600: Expand vector float operations for both SI and R600

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188596

11 years agoARM: Properly constrain comparison fastisel register classes.
Jim Grosbach [Fri, 16 Aug 2013 23:37:40 +0000 (23:37 +0000)]
ARM: Properly constrain comparison fastisel register classes.

Ongoing 'make the verifier happy' improvements to ARM fast-isel.

rdar://12594152

llvm-svn: 188595

11 years agoARM: Fast-isel register class constrain for extends.
Jim Grosbach [Fri, 16 Aug 2013 23:37:36 +0000 (23:37 +0000)]
ARM: Fast-isel register class constrain for extends.

Properly constrain the operand register class for instructions used
in [sz]ext expansion. Update more tests to use the verifier now that
we're getting the register classes correct.

rdar://12594152

llvm-svn: 188594

11 years agoARM: Fix more fast-isel verifier failures.
Jim Grosbach [Fri, 16 Aug 2013 23:37:31 +0000 (23:37 +0000)]
ARM: Fix more fast-isel verifier failures.

Teach the generic instruction selection helper functions to constrain
the register classes of their input operands. For non-physical register
references, the generic code needs to be careful not to mess that up
when replacing references to result registers. As the comment indicates
for MachineRegisterInfo::replaceRegWith(), it's important to call
constrainRegClass() first.

rdar://12594152

llvm-svn: 188593

11 years agoARM: Clean up fast-isel machine verifier errors.
Jim Grosbach [Fri, 16 Aug 2013 23:37:23 +0000 (23:37 +0000)]
ARM: Clean up fast-isel machine verifier errors.

Lots of machine verifier errors result from using a plain GPR regclass
for incoming argument copies. A more restrictive rGPR class is more
appropriate since it more accurately represents what's happening, plus
it lines up better with isel later on so the verifier is happier.
Reduces the number of ARM fast-isel tests not running with the verifier
enabled by over half.

rdar://12594152

llvm-svn: 188592

11 years agoObjectiveC migrator: Add some more routines
Fariborz Jahanian [Fri, 16 Aug 2013 23:35:05 +0000 (23:35 +0000)]
ObjectiveC migrator: Add some more routines
for future work. No change otherwise.

llvm-svn: 188591

11 years ago[lit] Rewrite TODO list, and elaborate on some things.
Daniel Dunbar [Fri, 16 Aug 2013 23:30:23 +0000 (23:30 +0000)]
[lit] Rewrite TODO list, and elaborate on some things.

 - If anyone is interested in lit's feature set, I'd appreciate any comments on
   the elaborated items.

llvm-svn: 188590

11 years ago[typo] An LLVM.
Daniel Dunbar [Fri, 16 Aug 2013 23:30:19 +0000 (23:30 +0000)]
[typo] An LLVM.

llvm-svn: 188589

11 years agoDon't reject attribute used in an "extern const" variable definition.
Rafael Espindola [Fri, 16 Aug 2013 23:18:50 +0000 (23:18 +0000)]
Don't reject attribute used in an "extern const" variable definition.

Before this patch we would warn and drop the attribute in
extern const char test3[] __attribute__((used)) = "";

llvm-svn: 188588

11 years agoUse the number of parameters in the actual method or function to determine the CallEf...
Ted Kremenek [Fri, 16 Aug 2013 23:14:22 +0000 (23:14 +0000)]
Use the number of parameters in the actual method or function to determine the CallEffects size.

llvm-svn: 188587

11 years agoFix a subtle difference between running clang vs llc for mips16.
Reed Kotler [Fri, 16 Aug 2013 23:05:18 +0000 (23:05 +0000)]
Fix a subtle difference between running clang vs llc for mips16.
This regards how mips16 is viewed. It's not really a target type but
there has always been a target for it in the td files. It's more properly
-mcpu=mips32 -mattr=+mips16 . This is how clang treats it but we have
always had the -mcpu=mips16 which I probably should delete now but it will
require updating all the .ll test cases for mips16. In this case it changed
how we decide if we have a count bits instruction and whether instruction
lowering should then expand ctlz. Now that we have dual mode compilation,
-mattr=+mips16 really just indicates the inital processor mode that
we are compiling for. (It is also possible to have -mcpu=64 -mattr=+mips16
but as far as I know, nobody has even built such a processor, though there
is an architecture manual for this).

llvm-svn: 188586

11 years agoDebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the...
David Blaikie [Fri, 16 Aug 2013 22:52:07 +0000 (22:52 +0000)]
DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines

Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.

llvm-svn: 188585

11 years agoActually, use GNU inline asm for cpuid with clang
Reid Kleckner [Fri, 16 Aug 2013 22:42:42 +0000 (22:42 +0000)]
Actually, use GNU inline asm for cpuid with clang

Clang doesn't support the MSVC __cpuid intrinsic yet, and fixing that is
blocked on some fairly complicated issues.

llvm-svn: 188584

11 years agoI'm told that != is not ==
Chris Lattner [Fri, 16 Aug 2013 22:29:44 +0000 (22:29 +0000)]
I'm told that != is not ==

llvm-svn: 188583

11 years agoallow != to compare PointerUnion, we already support ==.
Chris Lattner [Fri, 16 Aug 2013 22:09:02 +0000 (22:09 +0000)]
allow != to compare PointerUnion, we already support ==.

llvm-svn: 188582

11 years agoRetainCountChecker: Replace some loops with std:: algorithms.
Benjamin Kramer [Fri, 16 Aug 2013 21:57:14 +0000 (21:57 +0000)]
RetainCountChecker: Replace some loops with std:: algorithms.

llvm-svn: 188581

11 years agoReplace some DenseMap keys with simpler structures that don't need another DenseMapIn...
Benjamin Kramer [Fri, 16 Aug 2013 21:57:06 +0000 (21:57 +0000)]
Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.

llvm-svn: 188580

11 years agoAdd difference_type to ImmutableMap/Set iterators so they have a complete set of...
Benjamin Kramer [Fri, 16 Aug 2013 21:55:56 +0000 (21:55 +0000)]
Add difference_type to ImmutableMap/Set iterators so they have a complete set of typedefs.

llvm-svn: 188579

11 years agoRevert r188574. Turns out it isn't needed.
Ted Kremenek [Fri, 16 Aug 2013 21:54:22 +0000 (21:54 +0000)]
Revert r188574.  Turns out it isn't needed.

llvm-svn: 188578

11 years agoDebugInfo: Allow the addition of other (such as static data) members to a record...
David Blaikie [Fri, 16 Aug 2013 20:42:14 +0000 (20:42 +0000)]
DebugInfo: Allow the addition of other (such as static data) members to a record type after construction

Plus a type cleanup & minor fix to enumerate members of declarations.

llvm-svn: 188577

11 years agoDebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable...
David Blaikie [Fri, 16 Aug 2013 20:40:29 +0000 (20:40 +0000)]
DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class

This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.

llvm-svn: 188576

11 years agoDebugInfo: Contrain the record type parameter for CollectRecordFields
David Blaikie [Fri, 16 Aug 2013 20:40:25 +0000 (20:40 +0000)]
DebugInfo: Contrain the record type parameter for CollectRecordFields

This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.

llvm-svn: 188575

11 years agoNeed summary info. about arguments to
Fariborz Jahanian [Fri, 16 Aug 2013 20:23:36 +0000 (20:23 +0000)]
Need summary info. about arguments to
CF functions coming from static analyzer API.

llvm-svn: 188574

11 years ago[PowerPC] Preparatory refactoring for making prologue and epilogue
Bill Schmidt [Fri, 16 Aug 2013 20:05:04 +0000 (20:05 +0000)]
[PowerPC] Preparatory refactoring for making prologue and epilogue
safe on PPC32 SVR4 ABI

[Patch and following text by Mark Minich; committing on his behalf.]

There are FIXME's in PowerPC/PPCFrameLowering.cpp, method
PPCFrameLowering::emitPrologue() related to "negative offsets of R1"
on PPC32 SVR4. They're true, but the real issue is that on PPC32 SVR4
(and any ABI without a Red Zone), no spills may be made until after
the stackframe is claimed, which also includes the LR spill which is
at a positive offset. The same problem exists in emitEpilogue(),
though there's no FIXME for it. I intend to fix this issue, making
LLVM-compiled code finally safe for use on SVR4/EABI/e500 32-bit
platforms (including in particular, OS-free embedded systems & kernel
code, where interrupts may share the same stack as user code).

In preparation for making these changes, to make the diffs for the
functional changes less cluttered, I am providing the non-functional
refactorings in two stages:

Stage 1 does some minor fluffy refactorings to pull multiple method
calls up into a single bool, creating named bools for repeated uses of
obscure logic, moving some code up earlier because either stage 2 or
my final version will require it earlier, and rewording/adding some
comments. My stage 1 changes can be characterized as primarily fluffy
cleanup, the purpose of which may be unclear until the stage 2 or
final changes are made.

My stage 2 refactorings combine the separate PPC32 & PPC64 logic,
which is currently performed by largely duplicate code, into a single
flow, with the differences handled by a group of constants initialized
early in the methods.

This submission is for my stage 1 changes. There should be no
functional changes whatsoever; this is a pure refactoring.

llvm-svn: 188573

11 years agoFixed RuntimeDyldELF absolute relocations.
Richard Mitton [Fri, 16 Aug 2013 18:54:26 +0000 (18:54 +0000)]
Fixed RuntimeDyldELF absolute relocations.

If an ELF relocation is pointed at an absolute address, it will have a symbol ID of zero.
RuntimeDyldELF::processRelocationRef was not previously handling this case, and was instead trying to handle it as a section-relative fixup.

I think this is the right fix here, but my elf-fu is poor on some of the more exotic platforms, so I'd appreciate it if anyone with greater knowledge could verify this.

llvm-svn: 188572

11 years agoThread safety analysis: new test case
DeLesley Hutchins [Fri, 16 Aug 2013 18:28:00 +0000 (18:28 +0000)]
Thread safety analysis: new test case

llvm-svn: 188571

11 years agoTest commit.
Richard Mitton [Fri, 16 Aug 2013 18:18:31 +0000 (18:18 +0000)]
Test commit.

llvm-svn: 188570

11 years agoIntroduce the clangIDE library.
Argyrios Kyrtzidis [Fri, 16 Aug 2013 18:17:55 +0000 (18:17 +0000)]
Introduce the clangIDE library.

Libclang has a lot of functionality that is inaccessible.
The purpose of clangIDE is to move most of the functionality of libclang to it so we
can expose it and have libclang be more of a thin C wrapper over clangIDE.

Start by moving the USR generation functionality into clangIDE.

llvm-svn: 188569

11 years agoTest commit.
Richard Mitton [Fri, 16 Aug 2013 18:09:06 +0000 (18:09 +0000)]
Test commit.

llvm-svn: 188568

11 years ago[tests] Another attempt to workaround broken misched-copy.s test on some buildbots.
Daniel Dunbar [Fri, 16 Aug 2013 18:01:18 +0000 (18:01 +0000)]
[tests] Another attempt to workaround broken misched-copy.s test on some buildbots.

llvm-svn: 188567

11 years agoSwitching to using a helper function instead of manually converting the string to...
Aaron Ballman [Fri, 16 Aug 2013 17:53:28 +0000 (17:53 +0000)]
Switching to using a helper function instead of manually converting the string to UTF-8.

llvm-svn: 188566

11 years agoRemoving unused functionality.
Aaron Ballman [Fri, 16 Aug 2013 17:33:57 +0000 (17:33 +0000)]
Removing unused functionality.

llvm-svn: 188565

11 years agoFileCheck: Fix stray quote in CHECK-LABEL error message.
Stephen Lin [Fri, 16 Aug 2013 17:29:01 +0000 (17:29 +0000)]
FileCheck: Fix stray quote in CHECK-LABEL error message.

llvm-svn: 188564

11 years agoInstCombine: Use isAllOnesValue() instead of explicit -1.
Jim Grosbach [Fri, 16 Aug 2013 17:03:36 +0000 (17:03 +0000)]
InstCombine: Use isAllOnesValue() instead of explicit -1.

llvm-svn: 188563

11 years agoclang-format utils/TableGen/TableGen.cpp.
Rafael Espindola [Fri, 16 Aug 2013 16:46:27 +0000 (16:46 +0000)]
clang-format utils/TableGen/TableGen.cpp.

I have a patch that edits the file. Running clang-format first makes the patch
a lot easier to review.

llvm-svn: 188562

11 years agoRefactor ArgumentAdaptativeMatcher matchers to remove the template from their declara...
Samuel Benzaquen [Fri, 16 Aug 2013 16:19:42 +0000 (16:19 +0000)]
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.

Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1402

llvm-svn: 188560

11 years agoR600/SI: Add pattern for xor of i1
Michel Danzer [Fri, 16 Aug 2013 16:19:31 +0000 (16:19 +0000)]
R600/SI: Add pattern for xor of i1

Fixes two recent piglit regressions with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188559

11 years agoR600/SI: Fix broken encoding of DS_WRITE_B32
Michel Danzer [Fri, 16 Aug 2013 16:19:24 +0000 (16:19 +0000)]
R600/SI: Fix broken encoding of DS_WRITE_B32

The logic in SIInsertWaits::getHwCounts() only really made sense for SMRD
instructions, and trying to shoehorn it into handling DS_WRITE_B32 caused
it to corrupt the encoding of that by clobbering the first operand with
the second one.

Undo that damage and only apply the SMRD logic to that.

Fixes some derivates related piglit regressions with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188558

11 years agoReverted test commit (r188556)
Daniel Sanders [Fri, 16 Aug 2013 15:27:12 +0000 (15:27 +0000)]
Reverted test commit (r188556)

llvm-svn: 188557

11 years agoTest commit. Just a blank line
Daniel Sanders [Fri, 16 Aug 2013 15:26:36 +0000 (15:26 +0000)]
Test commit. Just a blank line

llvm-svn: 188556

11 years agoR600: Allocate memoperand in the MachienFunction so it doesn't leak.
Benjamin Kramer [Fri, 16 Aug 2013 14:48:09 +0000 (14:48 +0000)]
R600: Allocate memoperand in the MachienFunction so it doesn't leak.

llvm-svn: 188555

11 years agoUpdating function comments; no functional changes intended.
Aaron Ballman [Fri, 16 Aug 2013 14:33:07 +0000 (14:33 +0000)]
Updating function comments; no functional changes intended.

llvm-svn: 188554

11 years agoPassing false instead of 0; no functional change intended.
Aaron Ballman [Fri, 16 Aug 2013 13:42:41 +0000 (13:42 +0000)]
Passing false instead of 0; no functional change intended.

llvm-svn: 188553

11 years agoPassing false instead of 0; no functional change intended.
Aaron Ballman [Fri, 16 Aug 2013 13:34:39 +0000 (13:34 +0000)]
Passing false instead of 0; no functional change intended.

llvm-svn: 188552

11 years agoWhen initializing the PIC global base register on ARM/ELF add pc to fix the address.
Benjamin Kramer [Fri, 16 Aug 2013 12:52:08 +0000 (12:52 +0000)]
When initializing the PIC global base register on ARM/ELF add pc to fix the address.

This unbreaks PIC with fast isel on ELF targets (PR16717). The output matches
what GCC and SDag do for PIC but may not cover all of the many flavors of PIC
that exist.

llvm-svn: 188551

11 years agoTweak Replacement comparisons
Edwin Vane [Fri, 16 Aug 2013 12:18:53 +0000 (12:18 +0000)]
Tweak Replacement comparisons

* Introduce operator< to replace Replacement::Less
* Make operator== and operator< on Replacements non-member functions
* Change order of comparisons in operator< to do string comparisons last

llvm-svn: 188550

11 years agoAdd support for Thumb2 literal loads with negative zero offset
Mihai Popa [Fri, 16 Aug 2013 12:03:00 +0000 (12:03 +0000)]
Add support for Thumb2 literal loads with negative zero offset

Thumb2 literal loads use an offset encoding which allows for
negative zero. This fixes parsing and encoding so that #-0
is correctly processed. The parser represents #-0 as INT32_MIN.

llvm-svn: 188549

11 years agoFix Thumb2 aliasing complementary instructions taking modified immediates
Mihai Popa [Fri, 16 Aug 2013 11:55:44 +0000 (11:55 +0000)]
Fix Thumb2 aliasing complementary instructions taking modified immediates

There are many Thumb instructions which take 12-bit immediates encoded in a special
8-byte value + 4-byte rotator form. Not all numbers are represented, and it's legal
to transform an assembly instruction to be able to encode the immediate.

For example: AND and BIC are complementary instructions; one can switch the AND
to a BIC as long as the immediate is complemented.

The intent is to switch one instruction into its complementary one when the immediate
cannot be encoded in the form requested in the original assembly and when the
complementary immediate is encodable.

The patch addresses two issues:
1. definition of t2SOImmNot immediate - it has to check that the orignal value is
not encoded naturally
2. t2AND and t2BIC instruction aliases which should use the Thumb2 SOImm operand
rather than the ARM one.

llvm-svn: 188548

11 years ago[SystemZ] Use SRST to implement strlen and strnlen
Richard Sandiford [Fri, 16 Aug 2013 11:41:43 +0000 (11:41 +0000)]
[SystemZ] Use SRST to implement strlen and strnlen

It would also make sense to use it for memchr; I'm working on that now.

llvm-svn: 188547

11 years ago[SystemZ] Use MVST to implement strcpy and stpcpy
Richard Sandiford [Fri, 16 Aug 2013 11:29:37 +0000 (11:29 +0000)]
[SystemZ] Use MVST to implement strcpy and stpcpy

llvm-svn: 188546

11 years ago[ASan/RTL] Disable colored reporting on Windows
Timur Iskhodzhanov [Fri, 16 Aug 2013 11:26:26 +0000 (11:26 +0000)]
[ASan/RTL] Disable colored reporting on Windows

llvm-svn: 188545