summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a new MemDep::getNonLocalPointerDependencyChris Lattner2008-12-072-13/+94
| | | | | | | | | method. This will eventually take over load/store dep queries from getNonLocalDependency. For now it works fine, but is incredibly slow because it does no caching. Lets not switch GVN to use it until that is fixed :) llvm-svn: 60649
* push the "pointer case" up the analysis stack a bit. This causes Chris Lattner2008-12-072-51/+89
| | | | | | | duplication of logic (in 2 places) to determine what pointer a load/store touches. This will be addressed in a future commit. llvm-svn: 60648
* make clients have to know how to call getCallSiteDependencyFromChris Lattner2008-12-071-2/+13
| | | | | | instead of making getDependencyFrom do it. llvm-svn: 60647
* a minor grammar fixChris Lattner2008-12-074-7/+7
| | | | llvm-svn: 60646
* Pass the VLA size expr range to the VLA diagsAnders Carlsson2008-12-071-3/+13
| | | | llvm-svn: 60645
* rename some variables for consistencyChris Lattner2008-12-071-6/+6
| | | | llvm-svn: 60644
* I love how using out of scope variables is not an error with GCC, no really ↵Chris Lattner2008-12-071-3/+3
| | | | | | I do. llvm-svn: 60643
* Rename getCallSiteDependency -> getCallSiteDependencyFrom toChris Lattner2008-12-072-9/+8
| | | | | | | | emphasize the scanning and make it more similar to getDependencyFrom llvm-svn: 60642
* a memdep query on a volatile load/store will always returnChris Lattner2008-12-071-11/+10
| | | | | | | | | clobber with the current implementation. Instead of returning a "precise clobber" just return a fuzzy one. This doesn't matter to any clients anyway and should speed up analysis time very very slightly. llvm-svn: 60641
* don't bother touching volatile stores, they will just return clobber onChris Lattner2008-12-071-0/+5
| | | | | | everything interesting anyway. llvm-svn: 60640
* remove the ability to get memdep info for vaarg. I don't think theChris Lattner2008-12-071-6/+9
| | | | | | original impl was correct and noone actually makes the query anyway. llvm-svn: 60639
* Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.Anders Carlsson2008-12-076-16/+71
| | | | llvm-svn: 60638
* make getDependencyFrom private.Chris Lattner2008-12-071-10/+10
| | | | llvm-svn: 60637
* improve a note.Chris Lattner2008-12-071-1/+12
| | | | llvm-svn: 60636
* Setters returning a typedef of 'void' should not cause error.Fariborz Jahanian2008-12-061-1/+2
| | | | | | Bug reported by Chris L. llvm-svn: 60635
* Use of properties declared in protocols in the categoryFariborz Jahanian2008-12-065-8/+106
| | | | | | | via the category's protocol list1s, with appropriate diagnsostics and a test case. llvm-svn: 60634
* some more PRE/GVN/DSE related notes.Chris Lattner2008-12-061-0/+51
| | | | llvm-svn: 60633
* add a note Chris Lattner2008-12-061-0/+15
| | | | llvm-svn: 60632
* Simplify test.Anders Carlsson2008-12-061-3/+4
| | | | llvm-svn: 60631
* Improve error reporting of property and setter/getterFariborz Jahanian2008-12-063-3/+9
| | | | | | type mimatches. llvm-svn: 60630
* Check for correct'void' return type for setter methods.Fariborz Jahanian2008-12-061-1/+1
| | | | llvm-svn: 60629
* Add diagnostics for bitfields.Anders Carlsson2008-12-064-20/+59
| | | | llvm-svn: 60628
* Fix invalid bit-field.Anders Carlsson2008-12-061-1/+1
| | | | llvm-svn: 60627
* Simplify some diagnostics.Anders Carlsson2008-12-062-11/+11
| | | | llvm-svn: 60626
* Changed a 'FIXME' into new comment. Added a test caseFariborz Jahanian2008-12-061-1/+3
| | | | | | testing declaration of properties in categories. llvm-svn: 60625
* some random notes.Chris Lattner2008-12-061-0/+97
| | | | llvm-svn: 60624
* Minor cleanup. Use dyn_cast, not isa/cast pairs. No functionality change.Nick Lewycky2008-12-061-5/+5
| | | | llvm-svn: 60623
* Add bandaid transfer function support for assignments involving ObjCKVCRefExpr.Ted Kremenek2008-12-061-0/+7
| | | | llvm-svn: 60622
* Clean up some ARM GV asm printing out; minor fixes to match what gcc does.Evan Cheng2008-12-066-21/+74
| | | | llvm-svn: 60621
* Patch to diagnose a variety of misuse of propertyFariborz Jahanian2008-12-066-8/+50
| | | | | | | attributes. Example would be, readonly, assign or assign, copy, etc. llvm-svn: 60620
* Reimplement the inner loop of DSE. It now uniformly uses getDependence(),Chris Lattner2008-12-062-84/+51
| | | | | | | | doesn't do its own local caching, and is slightly more aggressive about free/store dse (see testcase). This eliminates the last external client of MemDep::getDependenceFrom(). llvm-svn: 60619
* Add support for calls to dependent names within templates, e.g.,Douglas Gregor2008-12-0612-14/+140
| | | | | | | | | | | | | | | | | | template<typename T> void f(T x) { g(x); // g is a dependent name, so don't even bother to look it up g(); // error: g is not a dependent name } Note that when we see "g(", we build a CXXDependentNameExpr. However, if none of the call arguments are type-dependent, we will force the resolution of the name "g" and replace the CXXDependentNameExpr with its result. GCC actually produces a nice error message when you make this mistake, and even offers to compile your code with -fpermissive. I'll do the former next, but I don't plan to do the latter. llvm-svn: 60618
* Don't use plain %x to print pointer values. I had changed it from %pDan Gohman2008-12-051-1/+2
| | | | | | | | | since %p isn't formatted consistently, but obviously plain %x is wrong. PRIxPTR with a cast to uintptr_t would work here, but that requires inconvenient build-system changes. %lu works on all current and foreseable future hosts. llvm-svn: 60616
* Introduce basic support for dependent types, type-dependentDouglas Gregor2008-12-0518-66/+469
| | | | | | | | | | | | expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. llvm-svn: 60615
* Fix test to pass on Linux.Dale Johannesen2008-12-051-1/+1
| | | | llvm-svn: 60614
* Fixed a comment.Fariborz Jahanian2008-12-051-4/+4
| | | | llvm-svn: 60611
* This test checks for duplicate implementation of the same Fariborz Jahanian2008-12-056-6/+118
| | | | | | | | property. It also checks for duplicate use of the same ivar in two different iproperty implementations. It also caught an error for a test case used in CodeGen :). llvm-svn: 60610
* Forgot a file.Dale Johannesen2008-12-051-0/+6
| | | | llvm-svn: 60609
* Make LoopStrengthReduce smarter about hoisting things out ofDale Johannesen2008-12-056-61/+212
| | | | | | | | | | | loops when they can be subsumed into addressing modes. Change X86 addressing mode check to realize that some PIC references need an extra register. (I believe this is correct for Linux, if not, I'm sure someone will tell me.) llvm-svn: 60608
* Make a few major changes to memdep and its clients:Chris Lattner2008-12-055-183/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Merge the 'None' result into 'Normal', making loads and stores return their dependencies on allocations as Normal. 2. Split the 'Normal' result into 'Clobber' and 'Def' to distinguish between the cases when memdep knows the value is produced from when we just know if may be changed. 3. Move some of the logic for determining whether readonly calls are CSEs into memdep instead of it being in GVN. This still leaves verification that the arguments are hte same to GVN to let it know about value equivalences in different contexts. 4. Change memdep's call/call dependency analysis to use getModRefInfo(CallSite,CallSite) instead of doing something very weak. This only really matters for things like DSA, but someday maybe we'll have some other decent context sensitive analyses :) 5. This reimplements the guts of memdep to handle the new results. 6. This simplifies GVN significantly: a) readonly call CSE is slightly simpler b) I eliminated the "getDependencyFrom" chaining for load elimination and load CSE doesn't have to worry about volatile (they are always clobbers) anymore. c) GVN no longer does any 'lastLoad' caching, leaving it to memdep. 7. The logic in DSE is simplified a bit and sped up. A potentially unsafe case was eliminated. llvm-svn: 60607
* Demangle and pretty-print symbols in internal backtraces. Patch byDan Gohman2008-12-051-0/+44
| | | | | | Wesley Peck, with a few fixes by me. llvm-svn: 60605
* Revert invalid r60393. It causes llvm-gcc bootstrap fails in release builds.Anton Korobeynikov2008-12-051-7/+2
| | | | | | See PR3160 for details llvm-svn: 60604
* This test also requires -mattr=+sse41.Evan Cheng2008-12-051-1/+1
| | | | llvm-svn: 60601
* Make it illegal to call getDependency* on non-memory instructionsChris Lattner2008-12-052-4/+6
| | | | | | like binary operators. llvm-svn: 60600
* Fixed a test case. Added a test case showing property setter'sFariborz Jahanian2008-12-052-0/+21
| | | | | | type mismatch (related to my last patch). llvm-svn: 60599
* (instance/class) Method type checking between class and its implementation.Fariborz Jahanian2008-12-055-24/+88
| | | | | | | (instance/class) Method type checking between category and its implementation. And a test case for all. llvm-svn: 60598
* Representation of template type parameters and non-type templateDouglas Gregor2008-12-0523-27/+448
| | | | | | | | | | | | | | | parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. llvm-svn: 60597
* Reason #3 from 60595 doesn't hold true. If we can fold a PIC load from ↵Evan Cheng2008-12-052-11/+11
| | | | | | constpool into a use, the rewrite happens at time of spill (not in VirtRegMap). Later on, if the GlobalBaseReg is spilled, the spiller can see the use uses GlobalBaseReg and do the right thing. llvm-svn: 60596
* Effectively undo 60461 in PIC mode which simply transform V_SET0 / ↵Evan Cheng2008-12-052-1/+244
| | | | | | | | | | V_SETALLONES into a load from constpool in order to fold into restores. This is not safe to do when PIC base is being used for a number of reasons: 1. GlobalBaseReg may have been spilled. 2. It may not be live at the use. 3. Spiller doesn't know this is happening so it won't prevent GlobalBaseReg from being spilled later (That by itself is a nasty hack. It's needed because we don't insert the reload until later). llvm-svn: 60595
* Fix test/Transforms/GVN/pre-load.llChris Lattner2008-12-052-2/+2
| | | | llvm-svn: 60594
OpenPOWER on IntegriCloud