summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Codegen support for the llvm.invariant/lifetime.start/end intrinsics:Duncan Sands2009-11-102-0/+19
| | | | | | just throw them away. llvm-svn: 86678
* Ignore parentheses when check the type of the expr.Zhongxing Xu2009-11-101-1/+1
| | | | llvm-svn: 86677
* Update computeArraySize() to use ComputeMultiple() to determine the array ↵Victor Hernandez2009-11-104-110/+30
| | | | | | size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size llvm-svn: 86676
* Add ComputeMultiple() analysis function that recursively determines if a ↵Victor Hernandez2009-11-102-0/+134
| | | | | | Value V is a multiple of unsigned Base llvm-svn: 86675
* Simple test case for [basic.lookup.udir].John McCall2009-11-101-0/+35
| | | | llvm-svn: 86674
* SizeofPointerChecker: Many false positives have the form 'sizeof *p'. Zhongxing Xu2009-11-101-1/+9
| | | | | | | | This is reasonable because people know what they are doing when they intentionally dereference the pointer. So now we only emit warning when a pointer variable is use literally. llvm-svn: 86673
* optimize testChris Lattner2009-11-101-1/+1
| | | | llvm-svn: 86672
* Add vtable caching to prevent multiple vtables for the same class fromMike Stump2009-11-105-24/+41
| | | | | | | | being generated. Add the most derived vtable pointer to the VTT. llvm-svn: 86671
* unify the code that determines whether it is a good idea to change the typeChris Lattner2009-11-103-29/+38
| | | | | | | of a computation. This fixes some infinite loops when dealing with TD that has no native types. llvm-svn: 86670
* Fix unqualified lookup through using directives.John McCall2009-11-102-83/+192
| | | | | | This is a pretty minimal test case; I'll make a better one later. llvm-svn: 86669
* Simplify.Nick Lewycky2009-11-101-3/+1
| | | | llvm-svn: 86668
* Reapply r86359, "Teach dead store elimination that certain intrinsics write toNick Lewycky2009-11-104-63/+198
| | | | | | | memory just like a store" with bug fixed (partial-overwrite.ll is the regression test). llvm-svn: 86667
* refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.Chris Lattner2009-11-103-165/+181
| | | | llvm-svn: 86666
* When trying to assign a regular string literal to an Objective-C 'id' type ↵Anders Carlsson2009-11-102-3/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or a pointer to an NSString, emit a code insertion hint that turns it into an Objective-C string. For example: @class NSString; @interface Test + (void)test:(NSString *)string; @end void g(NSString *a); void f() { NSString *a = "Foo"; g("Foo"); [Test test:"Foo"]; } will produce t.m:10:17: warning: incompatible pointer types initializing 'char [4]', expected 'NSString *' NSString *a = "Foo"; ^~~~~ @ t.m:11:5: warning: incompatible pointer types passing 'char [4]', expected 'NSString *' g("Foo"); ^~~~~ @ t.m:12:14: warning: incompatible pointer types sending 'char [4]', expected 'NSString *' [Test test:"Foo"]; ^~~~~ @ 3 diagnostics generated. llvm-svn: 86665
* Don't try to emit null fixit hints.Anders Carlsson2009-11-101-0/+7
| | | | llvm-svn: 86664
* Now we can safely use the argument expression's source range.Zhongxing Xu2009-11-101-1/+1
| | | | llvm-svn: 86663
* SizeofPointerChecker: If an explicit type specifier is used, do not issue ↵Zhongxing Xu2009-11-101-0/+5
| | | | | | warnings. llvm-svn: 86662
* Use PP.getLocForEndOfToken as suggested by John.Anders Carlsson2009-11-101-2/+2
| | | | llvm-svn: 86661
* Use the source range of the whole sizeof expression, otherwise it crashes whenZhongxing Xu2009-11-101-1/+1
| | | | | | the argument is not an expression. llvm-svn: 86660
* If a function with a default argument is redefined and the new function also ↵Anders Carlsson2009-11-102-1/+19
| | | | | | has a defualt argument then add a fixit hint that removes the default argument. Fixes PR5444. llvm-svn: 86659
* Update xode project.Anders Carlsson2009-11-101-0/+12
| | | | llvm-svn: 86658
* Add test case for PointerSubChecker.Zhongxing Xu2009-11-101-0/+5
| | | | llvm-svn: 86657
* CMake: Support for building llvm loadable modules.Oscar Fuentes2009-11-103-2/+17
| | | | llvm-svn: 86656
* lit: Start documentation testing architecture.Daniel Dunbar2009-11-101-0/+116
| | | | llvm-svn: 86655
* lit: Add ExampleTests, for testing lit and demonstrating test suite features.Daniel Dunbar2009-11-1026-0/+555
| | | | llvm-svn: 86654
* lit: Fix bug in --show-suites which accidentally override the list of tests.Daniel Dunbar2009-11-101-2/+2
| | | | llvm-svn: 86653
* Refine PointerSubChecker: compare the base region instead of the original Zhongxing Xu2009-11-104-3/+34
| | | | | | region, so that arithmetic within a memory chunk is allowed. llvm-svn: 86652
* Fix PR5445Bruno Cardoso Lopes2009-11-101-1/+1
| | | | llvm-svn: 86651
* Be sure to clear out VCall when we clear out VCalls.Mike Stump2009-11-102-0/+42
| | | | | | Start implementing VTTs. WIP. llvm-svn: 86650
* Rename: StripCasts describes what it does better. Zhongxing Xu2009-11-109-11/+11
| | | | | | getBaseRegion will be used in another method. llvm-svn: 86649
* I misread the parens, not so redundant after all.Chris Lattner2009-11-101-4/+4
| | | | llvm-svn: 86648
* Finish off mangling for the VTT.Mike Stump2009-11-101-0/+8
| | | | llvm-svn: 86647
* make jump threading recursively simplify expressions instead of doing it Chris Lattner2009-11-102-20/+74
| | | | | | | | | | | | | | | | | | | just one level deep. On the testcase we go from getting this: F1: ; preds = %T2 %F = and i1 true, %cond ; <i1> [#uses=1] br i1 %F, label %X, label %Y to a fully threaded: F1: ; preds = %T2 br label %Y This changes gets us to the point where we're forming (too many) switch instructions on doug's strswitch testcase. llvm-svn: 86646
* remove some redundant parens.Chris Lattner2009-11-101-4/+4
| | | | llvm-svn: 86645
* CMake: Remove unnecessary `unset' which was not supported by old cmakeOscar Fuentes2009-11-101-1/+0
| | | | | | releases. llvm-svn: 86644
* Add mangling for the construction vtable.Mike Stump2009-11-102-0/+25
| | | | llvm-svn: 86643
* Remove an unused variable.Dan Gohman2009-11-101-1/+0
| | | | llvm-svn: 86642
* Minor code simplification.Dan Gohman2009-11-101-1/+1
| | | | llvm-svn: 86641
* Trim a bunch of unneeded code from this testcase.Dan Gohman2009-11-101-94/+1
| | | | llvm-svn: 86640
* don't invalidate PN, rewrite of this code is in progress anyway.Chris Lattner2009-11-101-4/+5
| | | | llvm-svn: 86639
* Fix clang's use of DenseMap iterators after r86636 fixed their constness.Jeffrey Yasskin2009-11-106-6/+6
| | | | | | Patch by Victor Zverovich! llvm-svn: 86638
* add a new SimplifyInstruction API, which is like ConstantFoldInstruction, Chris Lattner2009-11-103-7/+30
| | | | | | | | except that the result may not be a constant. Switch jump threading to use it so that it gets things like (X & 0) -> 0, which occur when phi preds are deleted and the remaining phi pred was a zero. llvm-svn: 86637
* Fix DenseMap iterator constness.Jeffrey Yasskin2009-11-1014-61/+76
| | | | | | | | | | | | | | | | | | | This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! llvm-svn: 86636
* factor simplification logic for AND and OR out to InstSimplify from instcombine.Chris Lattner2009-11-103-111/+196
| | | | llvm-svn: 86635
* Fixed to address code review. No functional changes.David Goodwin2009-11-107-23/+40
| | | | llvm-svn: 86634
* Simplify, following MemoryBuffer::getSTDIN API fix.Daniel Dunbar2009-11-101-8/+0
| | | | llvm-svn: 86633
* Switch to getFileOrSTDIN().Daniel Dunbar2009-11-101-4/+1
| | | | llvm-svn: 86632
* Remove some if-0'd code, we can resurrect this if we ever decide to supportDaniel Dunbar2009-11-101-12/+1
| | | | | | continuing after invalid PCH loads. llvm-svn: 86631
* Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a ↵Daniel Dunbar2009-11-104-41/+33
| | | | | | | | lame API. Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs. llvm-svn: 86630
* Move all of the type-printing logic to its own C++ source fileDouglas Gregor2009-11-105-756/+723
| | | | llvm-svn: 86629
OpenPOWER on IntegriCloud