Commit Graph

77882 Commits

Author SHA1 Message Date
Daniel Dunbar 84f22f9da1 Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.
llvm-svn: 95848
2010-02-11 03:16:07 +00:00
Ted Kremenek c162e8e193 Clean up ownership of 'AttributeList' objects in Parser. Apparently
we would just leak them all over the place, with no clear ownership of
these objects at all.  AttributeList objects would get leaked on both
error and non-error paths.

Note: I introduced the usage of llvm::OwningPtr<AttributeList> to
manage these objects, which is particularly useful for methods with
multiple return sites.  In at least one method I used them even when
they weren't strictly necessary because it clarified the ownership
semantics and made the code easier to read.  Should the excessive
'take()' and 'reset()' calls become a performance issue we can always
re-evaluate.

Note+1: I believe I have not introduced any double-frees, but it would
be nice for someone to review this.

This fixes <rdar://problem/7635046>.

llvm-svn: 95847
2010-02-11 02:19:13 +00:00
Eric Christopher 531ea566a6 Add ConstantExpr handling to Intrinsic::objectsize lowering.
Update testcase accordingly now that we can optimize another
section.

llvm-svn: 95846
2010-02-11 01:48:54 +00:00
John McCall 4f7ced69ff Strip attributes and 'inline' off the "previous declaration" of a
template explicit specialization.  Complete an apparently stalled refactor
towards using CheckSpecializationInstantiationRedecl().

llvm-svn: 95845
2010-02-11 01:33:53 +00:00
Devang Patel d0d1fc0221 test case for r95842.
llvm-svn: 95844
2010-02-11 01:31:01 +00:00
Douglas Gregor 4a62bdfb2a Remove another redundant ASTContext parameter
llvm-svn: 95843
2010-02-11 01:30:34 +00:00
Douglas Gregor d505812422 Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.

llvm-svn: 95841
2010-02-11 01:19:42 +00:00
Bill Wendling 7c2005aa6d Fix to get it to compile.
llvm-svn: 95840
2010-02-11 01:15:27 +00:00
Bill Wendling 6034260c43 Don't print out a default newline when emitting the section offset. There are
almost always comments afterwards that need printing.

llvm-svn: 95839
2010-02-11 01:13:02 +00:00
Fariborz Jahanian 13b9782cc0 Diagnose when user provided getter is being used as lvalue
using property dot-syntax. Fixes radar 7628953.

llvm-svn: 95838
2010-02-11 01:11:34 +00:00
Jeffrey Yasskin e0913883b7 Make it possible to create multiple JIT instances at the same time, by removing
the global TheJIT and TheJITResolver variables.  Lazy compilation is supported
by a global map from a stub address to the JITResolver that knows how to
compile it.

Patch by Olivier Meurant!

llvm-svn: 95837
2010-02-11 01:07:39 +00:00
Douglas Gregor 0a5a2216e2 Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.

llvm-svn: 95836
2010-02-11 01:04:33 +00:00
Ted Kremenek da4abf11bf Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>.
llvm-svn: 95834
2010-02-11 00:53:01 +00:00
Douglas Gregor 5c73e918c5 Implement basic AST merging for classes, structs, and unions in C.
llvm-svn: 95833
2010-02-11 00:48:18 +00:00
Jakob Stoklund Olesen 75521cab3e Reuse operand location when updating PHI instructions.
Calling RemoveOperand is very expensive on huge PHI instructions. This makes
early tail duplication run twice as fast on the Firefox JavaScript
interpreter.

llvm-svn: 95832
2010-02-11 00:34:33 +00:00
Jakob Stoklund Olesen 896428d630 Remove duplicate successors from indirectbr instructions before building the machine CFG.
This makes early tail duplication run 60 times faster when compiling the Firefox
JavaScript interpreter, see PR6186.

llvm-svn: 95831
2010-02-11 00:34:18 +00:00
Devang Patel 03936a1880 Ignore dbg info intrinsics.
llvm-svn: 95828
2010-02-11 00:20:49 +00:00
Kevin Enderby 37993197bf Remove the few # TAILCALL comments that snuck in. As they may fail on linux.
llvm-svn: 95827
2010-02-11 00:18:12 +00:00
Kevin Enderby cfd0e5a15e Update the X86 assembler matcher test case now that a few more things match
with some of the recent changes that have gone into llvm-mc.

llvm-svn: 95826
2010-02-11 00:13:43 +00:00
Dan Gohman f684e452ca Add support to llvm-extract for extracting multiple functions and/or
multiple global variables at a time.

llvm-svn: 95825
2010-02-10 23:58:53 +00:00
Mon P Wang 5b77f0dac1 The previous fix of widening divides that trap was too fragile as it depends on custom
lowering and requires that certain types exist in ValueTypes.h.  Modified widening to
check if an op can trap and if so, the widening algorithm will apply only the op on
the defined elements.  It is safer to do this in widening because the optimizer can't
guarantee removing unused ops in some cases.

llvm-svn: 95823
2010-02-10 23:37:45 +00:00
Fariborz Jahanian 989908fbac Generate the objc_read_weak API when calling
a __weak block. Fixes radar 7628591.

llvm-svn: 95822
2010-02-10 23:34:57 +00:00
Charles Davis 42b3842429 Fix a potential null-pointer use, and fix the style of my new function.
Thanks, Anton!

llvm-svn: 95821
2010-02-10 23:26:12 +00:00
Charles Davis bbc0aa5166 Add support for the force_align_arg_pointer attribute. This is an x86-specific
attribute, so it uses Anton's new target-specific attribute support. It's
supposed to ensure that the stack is 16-byte aligned, but since necessary
support is lacking from LLVM, this is a no-op for now.

llvm-svn: 95820
2010-02-10 23:06:52 +00:00
Dale Johannesen af3fe99821 Ignore debug info one more place during coalescing.
llvm-svn: 95819
2010-02-10 23:04:09 +00:00
Dale Johannesen 522f08be0b Allow isDebug inquiry on any MO.
llvm-svn: 95818
2010-02-10 23:03:20 +00:00
Bob Wilson 0f52d0c074 Delete dead PHI machine instructions. These can be created due to type
legalization even when the IR-level optimizer has removed dead phis, such
as when the high half of an i64 value is unused on a 32-bit target.
I had to adjust a few test cases that had dead phis.
This is a partial fix for Radar 7627077.

llvm-svn: 95816
2010-02-10 22:58:57 +00:00
Dale Johannesen 8bba1608bd Skip debug info in a couple of places.
llvm-svn: 95814
2010-02-10 21:47:48 +00:00
Bill Wendling 7742b6406b Use an index instead of pointers into the vector. If the vector resizes, then
the pointer values could be invalid.

llvm-svn: 95813
2010-02-10 21:41:57 +00:00
Chris Lattner c55042c20f hopefully silence a warning on the clang-i386-darwin9 tester.
llvm-svn: 95812
2010-02-10 21:41:43 +00:00
Dale Johannesen 1ccda7b7c4 When I rewrote this loop per Chris' preference I
changed its behavior.  Oops.

llvm-svn: 95811
2010-02-10 21:41:41 +00:00
Chris Lattner a34e96377e add a virtual dtor to MCTargetExpr, hopefully silencing some warnings.
llvm-svn: 95810
2010-02-10 21:37:31 +00:00
Eli Friedman 4d4c6944e9 A few missed optimizations; the last one could have a significant impact on
code with lots of bitfields.

llvm-svn: 95809
2010-02-10 21:26:04 +00:00
Chris Lattner 0d7b5e5d33 work around a gcc bug with -Wuninitialized.
llvm-svn: 95808
2010-02-10 21:22:51 +00:00
Devang Patel 211746a69a Strip new llvm.dbg.value intrinsic.
llvm-svn: 95807
2010-02-10 21:19:56 +00:00
Daniel Dunbar 3e0c9790f2 MC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAIL
x86_32-encoding.s in on expectation of it passing.

llvm-svn: 95806
2010-02-10 21:19:28 +00:00
Douglas Gregor 5fa74c3b1d Move TypedefDecl importer to match the ordering in DeclNodes. No functionality change.
llvm-svn: 95805
2010-02-10 21:10:29 +00:00
Daniel Dunbar df11958895 XFAIL this on linux until I figure out what is happening.
llvm-svn: 95804
2010-02-10 21:01:04 +00:00
Daniel Dunbar d3fda55857 lit: Ignore dot files when scanning for tests (e.g., editor temprary files,
etc.)

llvm-svn: 95803
2010-02-10 21:00:55 +00:00
Daniel Dunbar 5b785ac0a3 MC/AsmMatcher: Tweak conversion function name.
llvm-svn: 95802
2010-02-10 21:00:47 +00:00
Dan Gohman bd11c41b91 Minor whitespace cleanups.
llvm-svn: 95801
2010-02-10 20:42:57 +00:00
Daniel Dunbar d64ce7b611 c-index-test: Add "none" filter, useful for performance testing.
llvm-svn: 95800
2010-02-10 20:42:40 +00:00
Dan Gohman c42c5243a1 Use an AssemblyAnnotatorWriter to clean up IVUsers' debug output.
The "uses=" comments are just clutter in this context.

llvm-svn: 95799
2010-02-10 20:42:37 +00:00
Dan Gohman e34890f921 Add a hook to AssemblyAnnotationWriter to allow custom info comments
to be printed, in place of the familiar "uses=" comments.

llvm-svn: 95798
2010-02-10 20:41:46 +00:00
Dan Gohman e78a922eef Use doxygen comment syntax.
llvm-svn: 95797
2010-02-10 20:23:33 +00:00
Fariborz Jahanian c3bdefa08d Patch to rewrite blocks into unique api names.
Fixes radar 7630551

llvm-svn: 95796
2010-02-10 20:18:25 +00:00
Dan Gohman 97c5902e78 Fix several comments which had previously been "the the" where a
different word was intended.

llvm-svn: 95795
2010-02-10 20:04:19 +00:00
Douglas Gregor bb7930c17e Implement basic support for merging function declarations across
translation units.

llvm-svn: 95794
2010-02-10 19:54:31 +00:00
Kevin Enderby cc152d6159 Replace this file containing 4 tests of x86 32-bit encodings with a file
containing the subset of the full auto generated test case that currently
encodes correctly.  Again it is useful as we bring up the the new encoder
to make sure currently working stuff stays working.

llvm-svn: 95791
2010-02-10 19:13:56 +00:00
Fariborz Jahanian bbf4320390 Provide rewriting suppport for use of __typeof__
in a declaration statement. Fixes radar 7628153.

llvm-svn: 95788
2010-02-10 18:54:22 +00:00