summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* add testcase for r61051Chris Lattner2008-12-151-0/+42
| | | | llvm-svn: 61052
* enhance heap-sra to apply to fixed sized array allocations, not justChris Lattner2008-12-151-4/+43
| | | | | | variable sized array allocations. llvm-svn: 61051
* Added support for splitting and scalarizing vector shifts.Mon P Wang2008-12-154-0/+41
| | | | llvm-svn: 61050
* Place constructors and destructors into the DeclContext of the class,Douglas Gregor2008-12-159-213/+190
| | | | | | | | | | | | just like all other members, and remove the special variables in CXXRecordDecl to store them. This eliminates a lot of special-case code for constructors and destructors, including ActOnConstructor/ActOnDeclarator and special lookup rules in LookupDecl. The result is far more uniform and manageable. Diagnose the redeclaration of member functions. llvm-svn: 61048
* Use stripPointerCasts.Chris Lattner2008-12-151-7/+2
| | | | llvm-svn: 61047
* minor tweaks for formatting, allow bitcast in ↵Chris Lattner2008-12-151-12/+29
| | | | | | ValueIsOnlyUsedLocallyOrStoredToOneGlobal. llvm-svn: 61046
* refactor some code into a new TryToOptimizeStoreOfMallocToGlobal function.Chris Lattner2008-12-151-62/+66
| | | | | | Use GetElementPtrInst::hasAllZeroIndices where possible. llvm-svn: 61045
* And a test case for my previous patch.Fariborz Jahanian2008-12-151-0/+79
| | | | llvm-svn: 61044
* Code gen. for ivar references; including bitfieldFariborz Jahanian2008-12-159-73/+66
| | | | | | ivars. llvm-svn: 61043
* Preprocessor: Allocate MacroInfo objects using a BumpPtrAllocator instead ↵Ted Kremenek2008-12-154-11/+42
| | | | | | using new/delete. This speeds up -Eonly on Cocoa.h using the regular lexer by 1.8% and the PTHLexer by 3%. llvm-svn: 61042
* add a basic test for heap-sraChris Lattner2008-12-151-0/+34
| | | | llvm-svn: 61041
* Teach basicaa to use the nocapture attribute when possible. When theChris Lattner2008-12-152-6/+30
| | | | | | intrinsics are properly marked nocapture, the fixme should be addressed. llvm-svn: 61040
* Fix regression in handling sizeof(void) in the static analyzer.Ted Kremenek2008-12-152-13/+40
| | | | llvm-svn: 61039
* Removed setRecordForDecl. Added a FIXME.Fariborz Jahanian2008-12-152-1/+3
| | | | llvm-svn: 61038
* Don't double-destroy constructors defined out-of-line. This is aDouglas Gregor2008-12-152-9/+12
| | | | | | | half-solution; the real solution is coming when constructors and destructors are treated like all other functions by ActOnDeclarator. llvm-svn: 61037
* Fix printing of PseudoSourceValues in SDNode graphs.Dan Gohman2008-12-151-5/+3
| | | | llvm-svn: 61036
* Fix a typo in a comment.Dan Gohman2008-12-151-1/+1
| | | | llvm-svn: 61035
* Create new EnumDecl nodes for redeclarations of enums, linking themDouglas Gregor2008-12-156-222/+89
| | | | | | | | | | together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. llvm-svn: 61034
* add some more notes.Chris Lattner2008-12-151-2/+53
| | | | llvm-svn: 61033
* Add a testcase for GCC PR 23455, which lpre handles now. Add someChris Lattner2008-12-153-5/+50
| | | | | | comments about why we're not getting other cases. llvm-svn: 61032
* Update generated files after nocapture syntax change.Nick Lewycky2008-12-153-1343/+1355
| | | | llvm-svn: 61031
* It turns out that "align 1" and unaligned are different. Add a bias to theNick Lewycky2008-12-154-5/+14
| | | | | | | | | | alignment attribute such that 0 means unaligned. This will probably require a rebuild of llvm-gcc because of the change to Attributes.h. If you see many test failures on "make check", please rebuild your llvm-gcc. llvm-svn: 61030
* Added support to LegalizeType for expanding the operands of scalar to vectorMon P Wang2008-12-154-9/+67
| | | | | | | and insert vector element. Modified extract vector element to extend the result to match the expected promoted type. llvm-svn: 61029
* gvn now hoists this load out of the hot non-call path.Chris Lattner2008-12-152-29/+54
| | | | llvm-svn: 61028
* Enable Load PRE. This teaches GVN to push partially redundant loads up theChris Lattner2008-12-151-1/+6
| | | | | | | | | CFG when there is exactly one predecessor where the load is not available. This is designed to not increase code size but still eliminate partially redundant loads. This fires 1765 times on 403.gcc even though it doesn't do critical edge splitting yet (the most common reason for it to fail). llvm-svn: 61027
* if we have a phi translation failure of the start block,Chris Lattner2008-12-151-0/+1
| | | | | | | return *just* a clobber of the start block, not other random stuff as well. llvm-svn: 61026
* Adjust testcase to make it more stable across visitation order changes,Chris Lattner2008-12-151-1/+1
| | | | | | unbreaking it after r61024. llvm-svn: 61025
* Ifdef out some code that I didn't mean to enable by default yet.Owen Anderson2008-12-151-1/+8
| | | | llvm-svn: 61024
* make GVN try to rename inputs to the resultant replaced values, whichChris Lattner2008-12-159-14/+18
| | | | | | | cleans up the generated code a bit. This should have the added benefit of not randomly renaming functions/globals like my previous patch did. :) llvm-svn: 61023
* Implement initial support for PHI translation in memdep. This means thatChris Lattner2008-12-155-44/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memdep keeps track of how PHIs affect the pointer in dep queries, which allows it to eliminate the load in cases like rle-phi-translate.ll, which basically end up being: BB1: X = load P br BB3 BB2: Y = load Q br BB3 BB3: R = phi [P] [Q] load R turning "load R" into a phi of X/Y. In addition to additional exposed opportunities, this makes memdep safe in many cases that it wasn't before (which is required for load PRE) and also makes it substantially more efficient. For example, consider: bb1: // has many predecessors. P = some_operator() load P In this example, previously memdep would scan all the predecessors of BB1 to see if they had something that would mustalias P. In some cases (e.g. test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end up eliminating something. In many other cases though, it would scan and not find anything useful. MemDep now stops at a block if the pointer is defined in that block and cannot be phi translated to predecessors. This causes it to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not scanning tons of stuff that is unlikely to be useful. For example, this speeds up GVN as a whole from 3.928s to 2.448s (60%)!. IMO, scalar GVN should be enhanced to simplify the rle-must-alias pointer base anyway, which would allow the loads to be eliminated. In the future, this should be enhanced to phi translate through geps and bitcasts as well (as indicated by FIXMEs) making memdep even more powerful. llvm-svn: 61022
* Add support for slow-path GVN with full phi construction for scalars. This ↵Owen Anderson2008-12-151-7/+77
| | | | | | | | is disabled for now, as it actually pessimizes code in the abscence of phi translation for load elimination. This slow down GVN a bit, by about 2% on 403.gcc. llvm-svn: 61021
* Fix whitespace in comment.Nick Lewycky2008-12-151-2/+1
| | | | | | | Remove TODO; icmp isn't a binary operator, so this function will never deal with them. llvm-svn: 61020
* Introducing nocapture, a parameter attribute for pointers to indicate that theNick Lewycky2008-12-158-34/+71
| | | | | | | | | | | | | | | | | | | | | | | callee will not introduce any new aliases of that pointer. The attributes had all bits allocated already, so I decided to collapse alignment. Alignment was previously stored as a 16-bit integer from bits 16 to 32 of the attribute, but it was required to be a power of 2. Now it's stored in log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of space. You may have already noticed that you only need four bits to encode a 16-bit power of two, so why five bits? Because the AsmParser accepted 32-bit alignments, even though we couldn't store them (they were silently discarded). Now we can store them in memory, but not in the bitcode. The bitcode format was already storing these as 64-bit VBR integers. So, the bitcode format stays the same, keeping the alignment values stored as 16 bit raw values. There's some hideous code in the reader and writer that deals with this, waiting to be ripped out the moment we run out of bits again and have to replace the parameter attributes table encoding. llvm-svn: 61019
* dont call iterator::end() on every cycle and dont read already-deleted memoryNuno Lopes2008-12-141-3/+4
| | | | llvm-svn: 61015
* silence warning when asserts disabled.Chris Lattner2008-12-141-2/+2
| | | | llvm-svn: 61014
* silence warning when asserts disabled.Chris Lattner2008-12-141-1/+1
| | | | llvm-svn: 61013
* eliminate warning when asserts disabled.Chris Lattner2008-12-141-1/+1
| | | | llvm-svn: 61012
* another random testcase that shouldn't crash gvn and isChris Lattner2008-12-141-0/+18
| | | | | | good for coverage with future changes. llvm-svn: 61011
* Clarify the meaning of the NoAlias response. The plan is to refer to this fromNick Lewycky2008-12-141-10/+14
| | | | | | a future version of LangRef. llvm-svn: 61010
* Generalize GVN's phi construciton routine to work for things other than loads.Owen Anderson2008-12-141-3/+7
| | | | llvm-svn: 61009
* minor WS fix for the previous commitNuno Lopes2008-12-141-3/+2
| | | | llvm-svn: 61008
* fix leakage of CXXSpecialName objects in DeclarationNameTableNuno Lopes2008-12-141-1/+10
| | | | llvm-svn: 61007
* Reapply r60997, this time without forgetting thatDuncan Sands2008-12-143-8/+15
| | | | | | | target constants are allowed to have an illegal type. llvm-svn: 61006
* Fixed HTML validator warning.Misha Brukman2008-12-141-1/+1
| | | | llvm-svn: 61005
* CSS cleanup:Misha Brukman2008-12-141-24/+17
| | | | | | | | * Lowercased all HTML element names * Standardized spacing around { and } * removed class "doc_table_nw": grep finds no uses llvm-svn: 61004
* I think we should getRValueType here. The lvaluetype of an array region is ↵Zhongxing Xu2008-12-141-1/+1
| | | | | | 'pointer to array'. llvm-svn: 61003
* Updated checker build.Ted Kremenek2008-12-141-1/+1
| | | | llvm-svn: 61002
* Temporarily revert r60997. It was causing this failure:Bill Wendling2008-12-133-11/+8
| | | | | | | | | | | | | | | | | | | Running /Users/void/llvm/llvm.src/test/CodeGen/Generic/dg.exp ... FAIL: /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll Failed with exit(1) at line 1 while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll | llc | /usr/bin/grep 68719476738 Assertion failed: ((TypesNeedLegalizing || getTypeAction(VT) == Legal) && "Illegal type introduced after type legalization?"), function HandleOp, file /Users/void/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 493. 0 llc 0x0085392e char const* std::find<char const*, char>(char const*, char const*, char const&) + 98 1 llc 0x00853e63 llvm::sys::PrintStackTraceOnErrorSignal() + 593 2 libSystem.B.dylib 0x96cac09b _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1765097359 4 libSystem.B.dylib 0x96d24ec2 raise + 26 5 libSystem.B.dylib 0x96d3447f abort + 73 6 libSystem.B.dylib 0x96d26063 __assert_rtn + 101 7 llc 0x004f9018 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type llvm::cast<llvm::Sub ... llvm-svn: 61001
* Store the size of the EH stack inside each BreakContinue struct so we know ↵Anders Carlsson2008-12-133-10/+16
| | | | | | when a break/continue won't cross a try block. llvm-svn: 60998
* LegalizeDAG is not supposed to introduce illegalDuncan Sands2008-12-133-8/+11
| | | | | | | types into the DAG if they were not already there. Check this with an assertion. llvm-svn: 60997
OpenPOWER on IntegriCloud