summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix off-by-one error in traversing an array; this fixes a test.Misha Brukman2009-01-072-3/+1
| | | | | | The error was reported by gcc-4.3.0 during compilation. llvm-svn: 61896
* revert to functionally equivalent formulationGabor Greif2009-01-071-1/+1
| | | | llvm-svn: 61895
* Update some doxygen comments to be more rich. Remove ↵Ted Kremenek2009-01-073-29/+40
| | | | | | StoreManager::GetRegionSVal. llvm-svn: 61894
* use the obvious gettersGabor Greif2009-01-071-3/+3
| | | | llvm-svn: 61893
* Remove redundant 'else's. No functionality change.Dan Gohman2009-01-071-7/+6
| | | | llvm-svn: 61891
* Add empty() methods for register def lists.Dan Gohman2009-01-071-0/+8
| | | | llvm-svn: 61890
* Refactor MemRegionManager instance variable into parent class. No ↵Ted Kremenek2009-01-073-10/+15
| | | | | | functionality change. llvm-svn: 61888
* Fix PR clang/3291Douglas Gregor2009-01-072-4/+16
| | | | llvm-svn: 61886
* Fix printing of member references to avoid displaying implicitly-generated ↵Douglas Gregor2009-01-074-8/+29
| | | | | | member references, e.g., for anonymous struct/unions or implicit 'this' in member functions llvm-svn: 61885
* Minor cleanup for unittest:Misha Brukman2009-01-071-3/+3
| | | | | | | | | * Fixed {copy,assignment} constructor test names * s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/ Patch by Talin. llvm-svn: 61883
* Don't ICE when messaging on 'super' receiver when classFariborz Jahanian2009-01-073-3/+21
| | | | | | of category implementation is undeclared. Issue error instead. llvm-svn: 61882
* Another nasty code gen. bug with trivial fix. Calling classFariborz Jahanian2009-01-072-1/+22
| | | | | | | method on 'super' receiver in a category implementation. Other simpler cases were working by accident. llvm-svn: 61880
* Whitespace - correct formatting.Duncan Sands2009-01-071-2/+2
| | | | llvm-svn: 61879
* Finished semantic analysis of anonymous unions in C++.Douglas Gregor2009-01-0710-69/+170
| | | | | | | | | 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
* Remove alloca tracking from nocapture analysis. Not onlyDuncan Sands2009-01-072-87/+25
| | | | | | | | | | was it not very helpful, it was also wrong! The problem is shown in the testcase: the alloca might be passed to a nocapture callee which dereferences it and returns the original pointer. But because it was a nocapture call we think we don't need to track its uses, but we do. llvm-svn: 61876
* CMake: replace `rm' with portable invocations of cmake.Oscar Fuentes2009-01-072-5/+5
| | | | | | Based on a bug report by Yonggang Luo. llvm-svn: 61875
* Reorder these.Duncan Sands2009-01-071-24/+24
| | | | llvm-svn: 61873
* Use a switch rather than a sequence of "isa" tests.Duncan Sands2009-01-071-16/+32
| | | | llvm-svn: 61872
* ccc: Make proper synthetic arguments in places we have to constructDaniel Dunbar2009-01-073-54/+35
| | | | | | | "fake" options, allowing Tools to be oblivious to whether an argument is real or synthetic. This kills off DerivedArg & a number of FIXMEs. llvm-svn: 61871
* The verifier checks that the aliasee is not null.Duncan Sands2009-01-071-2/+1
| | | | llvm-svn: 61870
* ccc: Change Command to take list of strings for argv instead of ArgDaniel Dunbar2009-01-073-57/+55
| | | | | | | instances; this just complicated things and doesn't seem to provide any benefit. llvm-svn: 61869
* ObjC AST cleanups/simplifications (phase 1).Steve Naroff2009-01-073-217/+85
| | | | | | Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it. llvm-svn: 61866
* Use DeclContext::getLookupContext wherever necessary to ensure that we look ↵Douglas Gregor2009-01-072-7/+10
| | | | | | through transparent contexts llvm-svn: 61861
* Test case for anonymous unions in C++Douglas Gregor2009-01-071-0/+99
| | | | llvm-svn: 61860
* Implement the first half of PR3290: if there is a store of an Chris Lattner2009-01-072-5/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer to a (transitive) bitcast the alloca and if that integer has the full size of the alloca, then it clobbers the whole thing. Handle this by extracting pieces out of the stored integer and filing them away in the SROA'd elements. This triggers fairly frequently because the CFE uses integers to pass small structs by value and the inliner exposes these. For example, in kimwitu++, I see a bunch of these with i64 stores to "%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>" In 176.gcc I see a few i32 stores to "%struct..0anon". In the testcase, this is a difference between compiling test1 to: _test1: subl $12, %esp movl 20(%esp), %eax movl %eax, 4(%esp) movl 16(%esp), %eax movl %eax, (%esp) movl (%esp), %eax addl 4(%esp), %eax addl $12, %esp ret vs: _test1: movl 8(%esp), %eax addl 4(%esp), %eax ret The second half of this will be to handle loads of the same form. llvm-svn: 61853
* Factor a bunch of code out into a helper method.Chris Lattner2009-01-071-148/+156
| | | | llvm-svn: 61852
* use continue to simplify code and reduce nesting, no functionalityChris Lattner2009-01-071-38/+58
| | | | | | change. llvm-svn: 61851
* Get TargetData once up front and cache as an ivar instead ofChris Lattner2009-01-071-45/+38
| | | | | | requerying it all over the place. llvm-svn: 61850
* Use the hasAllZeroIndices predicate to simplify some Chris Lattner2009-01-071-28/+6
| | | | | | code, no functionality change. llvm-svn: 61849
* When determining whether a variable is a file-scoped variable, checkDouglas Gregor2009-01-074-5/+15
| | | | | | | out its lookup context (to see through linkage specifications). Addresses <rdar://problem/6477142>. llvm-svn: 61848
* The coalescer does not coalesce a virtual register to a physical register if ↵Evan Cheng2009-01-074-20/+115
| | | | | | | | | | | | | | any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away: v1024 = EDI // not killed = = EDI One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead. This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions. llvm-svn: 61847
* ccc: Extend ArgList to support indexing into a synthetic arg arrayDaniel Dunbar2009-01-071-3/+28
| | | | | | (for killing off DerivedArg). llvm-svn: 61846
* add a testcase.Chris Lattner2009-01-071-0/+56
| | | | llvm-svn: 61845
* ccc: Refactor so that all accesses to actual input strings go throughDaniel Dunbar2009-01-074-23/+25
| | | | | | the ArgList. llvm-svn: 61844
* Update checker build.Ted Kremenek2009-01-071-1/+1
| | | | llvm-svn: 61843
* Add patterns to match conditional moves with loads foldedDan Gohman2009-01-073-1/+111
| | | | | | | into their left operand, rather than their right. Do this by commuting the operands and inverting the condition. llvm-svn: 61842
* Add load-folding table entries for cmovno too.Dan Gohman2009-01-071-0/+3
| | | | llvm-svn: 61841
* Initial implementation of anonymous unions (and, as a GNU extension,Douglas Gregor2009-01-0711-20/+402
| | | | | | | | | | | | structures and classes) in C++. Covers name lookup and the synthesis and member access for the unnamed objects/fields associated with anonymous unions. Some C++ semantic checks are still missing (anonymous unions can't have function members, static data members, etc.), and there is no support for anonymous structs or unions in C. llvm-svn: 61840
* This commit reflects changes to the retain/release checker motivated by myTed Kremenek2009-01-072-36/+53
| | | | | | | | | | | | | | | | | | | | | | | recent discussions with Thomas Clement and Ken Ferry concerning the "fundamental rule" for Cocoa memory management (http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html). Here is the revised behavior of the checker concerning tracking retain/release counts for objects returned from message expressions involving instance methods: 1) Track the returned object if the return type of the message expression is id<..>, id, or a pointer to *any* object that subclasses NSObject. Such objects are assumed to have a retain count. Previously the checker only tracked objects when the receiver of the message expression was part of the standard Cocoa API (i.e., had class names prefixed with 'NS'). This should significantly expand the amount of checking performed. 2) Consider the object owned if the selector of the message expression contains "alloc", "new", or "copy". Previously we also considered "create", but this doesn't follow from the fundamental rule (discussions with the Cocoa folks confirms this). llvm-svn: 61837
* Define instructions for cmovo and cmovno.Dan Gohman2009-01-073-9/+90
| | | | llvm-svn: 61836
* X86_COND_C and X86_COND_NC are alternate mnemonics forDan Gohman2009-01-077-69/+32
| | | | | | X86_COND_B and X86_COND_AE, respectively. llvm-svn: 61835
* Improve support for type-generic vector intrinsics by teaching TableGen howBob Wilson2009-01-075-6/+100
| | | | | | | | to handle LLVMMatchType intrinsic parameters, and by adding new subclasses of LLVMMatchType to match vector types with integral elements that are either twice as wide or half as wide as the elements of the matched type. llvm-svn: 61834
* ccc (old): Pass -arch through to assembler if given.Daniel Dunbar2009-01-071-7/+10
| | | | llvm-svn: 61833
* Allow Objective-C entities to be declared within a transparent contextDouglas Gregor2009-01-066-8/+21
| | | | | | nested in the translation unit. This fixes <rdar://problem/6476070>. llvm-svn: 61832
* Now that fold-pcmpeqd-0.ll is effectively testing that scheduling helpsDan Gohman2009-01-061-0/+83
| | | | | | | | avoid the need for spilling, add a new testcase that tests that the pcmpeqd used for V_SETALLONES is changed to a constant-pool load as needed. llvm-svn: 61831
* Revert r42653 and forward-port the code that lets INC64_32r beDan Gohman2009-01-062-2/+25
| | | | | | | | | | | | converted to LEA64_32r in x86's convertToThreeAddress. This replaces code like this: movl %esi, %edi inc %edi with this: lea 1(%rsi), %edi which appears to be beneficial. llvm-svn: 61830
* CellSPU:Scott Michel2009-01-067-61/+38
| | | | | | | - Add preliminary support for v2i32; load/store generates the right code but there's a lot work to be done to make this vector type operational. llvm-svn: 61829
* Fix a bug in ComputeLinearIndex computation handling multi-levelDan Gohman2009-01-062-1/+70
| | | | | | | | aggregate types. Don't increment the current index after reaching the end of a struct, as it will already be pointing at one-past-the end. This fixes PR3288. llvm-svn: 61828
* SourceManager: Implement "lazy" creation of MemBuffers for source files.Ted Kremenek2009-01-061-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | - Big Idea: Source files are now mmaped when ContentCache::getBuffer() is first called. While this doesn't change the functionality when lexing regular source files, it can result in source files not being paged in when using PTH. - Performance change: - No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing regular source lexing. - No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using PTH. We do observe, however, a reduction of 279K in memory mapped source code (3% reduction). The majority of pages from Cocoa.h (and friends) are still being pulled in, however, because any literal will cause Preprocessor::getSpelling() to be called (causing the source for the file to get pulled in). The next possible optimization is to cache literal strings in the PTH file to avoid the need for the original header sources entirely. - Right now there is a preprocessor directive to toggle between "lazy" and "eager" creation of MemBuffers. This is not permanent, and is there in the short term to just test additional optimizations. llvm-svn: 61827
* Remove redunant (and incorrect) call to SourceManager::PrintStats(). This ↵Ted Kremenek2009-01-061-3/+0
| | | | | | would be called after a SourceManager was 'cleared', so it printed bogus results. Moreover, these stats are already printed earlier in the code path. llvm-svn: 61825
OpenPOWER on IntegriCloud