Commit Graph

52345 Commits

Author SHA1 Message Date
Chris Lattner f3e696bc5a ValueTracker can't assume that an alloca with no specified alignment
will get its preferred alignment.  It has to be careful and cautiously assume
it will just get the ABI alignment.  This prevents instcombine from rounding
up the alignment of a load/store without adjusting the alignment of the alloca.

llvm-svn: 61934
2009-01-08 19:28:38 +00:00
Chris Lattner 8c1cc34d6a one more crash from PR3281, we now diagnose:
llvm-as: t.ll:2:39: function may not return opaque type
  %"bwmoyl" = tail call coldcc opaque @g()
                                      ^
llvm-svn: 61933
2009-01-08 19:05:36 +00:00
Chris Lattner 4f6a38e68c remove some exclusions that don't exist anymore.
llvm-svn: 61932
2009-01-08 19:02:03 +00:00
Chris Lattner a2ed32eb4f this testcase is huge and hasn't regressed ever, I don't think it is worth keeping.
llvm-svn: 61931
2009-01-08 19:01:45 +00:00
Ted Kremenek 6ad2b3ac18 Initialized member variable 'Implicit' in Decl's ctor.
llvm-svn: 61930
2009-01-08 18:54:40 +00:00
Steve Naroff 35c62ae632 This is a large/messy diff that unifies the ObjC AST's with DeclContext.
- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.

llvm-svn: 61929
2009-01-08 17:28:14 +00:00
Devang Patel 65143c537c Add DebugInfo based APIs to record source line info.
llvm-svn: 61928
2009-01-08 17:19:22 +00:00
Misha Brukman 572f2646c2 * Moved author attribution to CREDITS.TXT
* Removed trailing whitespace

llvm-svn: 61927
2009-01-08 16:40:25 +00:00
Misha Brukman da46748ad2 * Alphabetized #includes
* Removed trailing whitespace

llvm-svn: 61926
2009-01-08 15:50:22 +00:00
Zhongxing Xu 550c1c46f9 Add isSubRegionOf() method to SubRegion.
llvm-svn: 61924
2009-01-08 13:17:14 +00:00
Bill Wendling 2a6dad5f0f Some generic clean-ups. Also make the StringMapEntryInitializer specialization apply only to the tests that are actually testing it.
llvm-svn: 61923
2009-01-08 09:31:36 +00:00
Bill Wendling 691c20d8fb * Don't explicitly cast "0" to "void*". This doesn't work well with specialized
StringMapEntryInitializer classes. Leave it for the compiler to figure out what
 the type is and what "0" should be transformed into.

* Un-disable the unit tests which test the StringMapEntryInitializer class.

llvm-svn: 61922
2009-01-08 08:26:46 +00:00
Chris Lattner 55927bdccd the new scalarrepl changes are optimizing away a temporary alloca in
check242, which invalidates this test.  This test is an x86-32 ABI test 
that is trying to be run in a target-independent way, which is not going
to work very well.  Just remove the test.

llvm-svn: 61921
2009-01-08 07:58:23 +00:00
Zhongxing Xu caeab626e4 Fix comment because we could have arbitrary number of overloaded functions with
the same name.

llvm-svn: 61920
2009-01-08 07:37:03 +00:00
Bill Wendling 453b4d5204 80-column violation fix.
llvm-svn: 61919
2009-01-08 07:35:39 +00:00
Chris Lattner 6c2ee50e28 add some more crazy strlen and memcpy stuff I noticed in spec.
llvm-svn: 61918
2009-01-08 07:34:55 +00:00
Chris Lattner 7cb3ae0505 add some notes about strlen craziness in eon.
llvm-svn: 61917
2009-01-08 06:52:57 +00:00
Misha Brukman 669b938d25 Remove extra blank line and space.
llvm-svn: 61916
2009-01-08 06:11:51 +00:00
Chris Lattner c518dfd11b This implements the second half of the fix for PR3290, handling
loads from allocas that cover the entire aggregate.  This handles
some memcpy/byval cases that are produced by llvm-gcc.  This triggers
a few times in kc++ (with std::pair<std::_Rb_tree_const_iterator
<kc::impl_abstract_phylum*>,bool>) and once in 176.gcc (with %struct..0anon).

llvm-svn: 61915
2009-01-08 05:42:05 +00:00
Misha Brukman 017e49897e * Added unittests for StringMap
* Fixed but in StringMap::clear()
* Removed trailing whitespace

Original patch by Talin.

llvm-svn: 61914
2009-01-08 04:48:20 +00:00
Ted Kremenek d5e6e16d0d PTH: Hook up getSpelling() caching in PTHLexer. This results in a nice
performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):

- wall time decreases by 21% (26% speedup overall)
- system time decreases by 35%
- user time decreases by 6%

These reductions are due to not paging source files just to get spellings for
literals. The solution in place doesn't appear to be 100% yet, as we still see
some of the pages for source files getting mapped in. Using -print-stats, we see
that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
Will investigate why the remaining 25% are getting paged in.

With these changes, here's how PTH compares to non-PTH on Cocoa.h:
  -Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
  -fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)

llvm-svn: 61913
2009-01-08 04:30:32 +00:00
Devang Patel 145a7cfa85 Add APIs to record regions and variables.
Again, shamelessly copied from MMI.

llvm-svn: 61912
2009-01-08 02:49:34 +00:00
Ted Kremenek 884a558441 PTH:
- Added stub PTHLexer::getSpelling() that will be used for fetching cached
  spellings from the PTH file.  This doesn't do anything yet.
- Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
  when using a PTHLexer.
- Updated PTHLexer to read the offsets of spelling tables in the PTH file.

llvm-svn: 61911
2009-01-08 02:47:16 +00:00
Ted Kremenek 5423c53b59 Remove debugging variable I forgot to remove in my last commit.
llvm-svn: 61910
2009-01-08 02:44:52 +00:00
Ted Kremenek 17f09da0a4 Cache the "spellings" of string, character, and numeric literals in the PTH
file. For Cocoa.h, this enlarges the PTH file by 310K (4%).

llvm-svn: 61909
2009-01-08 02:44:06 +00:00
Devang Patel fbbe93bf68 Add APIs to manage scope using DebugInfo interface.
This is a shameless copy of similar APIs from MachineModuleInfo. The copy from MMI will be deleted in near future.

llvm-svn: 61908
2009-01-08 02:33:41 +00:00
Misha Brukman 44f27da773 * Fixed spelling of "sentinel"
* Removed trailing whitespace

llvm-svn: 61907
2009-01-08 02:21:23 +00:00
Misha Brukman 93bd1ca55e Use VIM's built-in shorthand for whitespace in regex.
llvm-svn: 61906
2009-01-08 02:17:30 +00:00
Misha Brukman 687501fdd4 Be sure to ignore the end-of-line character when considering trailing
whitespace.

llvm-svn: 61905
2009-01-08 02:16:13 +00:00
Misha Brukman 2879c29274 Removed trailing whitespace.
llvm-svn: 61904
2009-01-08 02:11:55 +00:00
Bob Wilson bf43619131 Fix failure messages in Verifier::PerformTypeCheck. The argument numbers
passed in to this function changed to support multiple return values,
leading to some incorrect argument numbers in the failure messages.
With this change, the ArgNo values used for return values and parameters are
disjoint, and the new IntrinsicParam function translates those ArgNo values
to strings that can be used in the messages.  This also fixes a few places
where PerformTypeCheck did not return false following calls to CheckFailed.

llvm-svn: 61903
2009-01-08 01:56:06 +00:00
Ted Kremenek 352b8bacdc Refactor CacheTokens to use a PTHWriter class that creates and manages most of the PTH generation data structures. No functionality change.
llvm-svn: 61902
2009-01-08 01:17:37 +00:00
Fariborz Jahanian 17290c3638 Objc's compatibility-alias semantics and code
gen issue fix.

llvm-svn: 61901
2009-01-08 01:10:55 +00:00
Oscar Fuentes e0a2cf332c CMake: removed lib/VMCore/DebugInfoBuilder.cpp.
llvm-svn: 61900
2009-01-08 00:18:52 +00:00
Bob Wilson e8a299e90e Assert that VectorType::getTruncatedElementVectorType is not used with
odd bit-width vector elements.  Add a check in the verifier for this also.

llvm-svn: 61899
2009-01-07 23:44:27 +00:00
Chris Lattner 8157cb9ef6 remove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.h
llvm-svn: 61898
2009-01-07 23:25:06 +00:00
Misha Brukman b51cdfadda Fix off-by-one error in traversing an array; this fixes a test.
The error was reported by gcc-4.3.0 during compilation.

llvm-svn: 61896
2009-01-07 23:07:29 +00:00
Gabor Greif 6aa83bd459 revert to functionally equivalent formulation
llvm-svn: 61895
2009-01-07 23:07:22 +00:00
Ted Kremenek f929b0aefe Update some doxygen comments to be more rich. Remove StoreManager::GetRegionSVal.
llvm-svn: 61894
2009-01-07 22:56:17 +00:00
Gabor Greif 6ecd6f43b0 use the obvious getters
llvm-svn: 61893
2009-01-07 22:39:29 +00:00
Dan Gohman 261ee6be57 Remove redundant 'else's. No functionality change.
llvm-svn: 61891
2009-01-07 22:30:55 +00:00
Dan Gohman 9157721904 Add empty() methods for register def lists.
llvm-svn: 61890
2009-01-07 22:28:56 +00:00
Ted Kremenek 682c3a6dd6 Refactor MemRegionManager instance variable into parent class. No functionality change.
llvm-svn: 61888
2009-01-07 22:18:50 +00:00
Douglas Gregor f325278799 Fix PR clang/3291
llvm-svn: 61886
2009-01-07 21:36:02 +00:00
Douglas Gregor f09c2dc8e0 Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions
llvm-svn: 61885
2009-01-07 21:26:07 +00:00
Misha Brukman 204b1d2268 Minor cleanup for unittest:
* Fixed {copy,assignment} constructor test names
* s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/

Patch by Talin.

llvm-svn: 61883
2009-01-07 21:13:53 +00:00
Fariborz Jahanian dd2d75bb52 Don't ICE when messaging on 'super' receiver when class
of category implementation is undeclared. Issue error instead.

llvm-svn: 61882
2009-01-07 21:01:41 +00:00
Fariborz Jahanian 475831bd6e Another nasty code gen. bug with trivial fix. Calling class
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.

llvm-svn: 61880
2009-01-07 20:11:22 +00:00
Duncan Sands 0bcf085845 Whitespace - correct formatting.
llvm-svn: 61879
2009-01-07 20:01:06 +00:00
Douglas Gregor f4d332797b Finished semantic analysis of anonymous unions in C++.
Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.

llvm-svn: 61878
2009-01-07 19:46:03 +00:00