summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* LICM does get dead instructions input to it. Instead of sinking themChris Lattner2010-08-291-1/+12
| | | | | | out of loops, just delete them. llvm-svn: 112451
* use moveBefore instead of remove+insert, it avoids some Chris Lattner2010-08-291-9/+3
| | | | | | | symtab manipulation, so its faster (in addition to being more elegant) llvm-svn: 112450
* revert 112448 for now.Chris Lattner2010-08-291-5/+6
| | | | llvm-svn: 112449
* optimize LICM::hoist to use moveBefore. Correct its updatingChris Lattner2010-08-291-6/+5
| | | | | | | of AST to remove the hoisted instruction from the AST, since it is no longer in the loop. llvm-svn: 112448
* fix some bugs (found by inspection) where LICM would not updateChris Lattner2010-08-291-1/+3
| | | | | | | | | | LICM correctly. When sinking an instruction, it should not add entries for the sunk instruction to the AST, it should remove the entry for the sunk instruction. The blocks being sunk to are not in the loop, so their instructions shouldn't be in the AST (yet)! llvm-svn: 112447
* rework the ownership of subloop alias information: instead ofChris Lattner2010-08-291-16/+25
| | | | | | | | | | keeping them around until the pass is destroyed, keep them around a) just when useful (not for outer loops) and b) destroy them right after we use them. This should reduce memory use and fixes potential bugs where a loop is deleted and another loop gets allocated to the same address. llvm-svn: 112446
* apparently unswitch had the same "Feature". Stop itsChris Lattner2010-08-291-7/+2
| | | | | | claims that it preserves domfrontier if it doesn't really. llvm-svn: 112445
* now that loop passes don't use DomFrontier, there is no reasonChris Lattner2010-08-291-8/+2
| | | | | | | for the unroller to pretend it supports updating it. It still has a horrible hack for DomTree. llvm-svn: 112444
* Make IVUsers iterative instead of recursive.Dan Gohman2010-08-291-78/+89
| | | | | | | This has the side effect of reversing the order of most of IVUser's results. llvm-svn: 112442
* Optionally rerun dedicated-register filtering after applyingDan Gohman2010-08-291-0/+20
| | | | | | | other filtering techniques, as those may allow it to filter out more obviously unprofitable candidates. llvm-svn: 112441
* Fix several areas in LSR to do a better job keeping the mainDan Gohman2010-08-291-50/+106
| | | | | | | | LSRInstance data structures up to date. This fixes some pessimizations caused by stale data which will be exposed in an upcoming change. llvm-svn: 112440
* Refactor the three main groups of code out ofDan Gohman2010-08-291-5/+28
| | | | | | NarrowSearchSpaceUsingHeuristics into separate functions. llvm-svn: 112439
* Delete a bogus check.Dan Gohman2010-08-291-2/+1
| | | | llvm-svn: 112438
* Add some comments.Dan Gohman2010-08-291-4/+13
| | | | llvm-svn: 112437
* Move this debug output into GenerateAllReuseFormula, to declutterDan Gohman2010-08-291-4/+4
| | | | | | the high-level logic. llvm-svn: 112436
* Delete an unused declaration.Dan Gohman2010-08-291-2/+0
| | | | llvm-svn: 112435
* Do one lookup instead of two.Dan Gohman2010-08-291-3/+4
| | | | llvm-svn: 112434
* Restructure the {A,+,B}<L> * {C,+,D}<L> folding so that it foldsDan Gohman2010-08-291-21/+24
| | | | | | | all applicable addrecs before recursing on getMulExpr, instead of recursing on getMulExpr for each one. llvm-svn: 112433
* Batch up subtracts along with adds, when analyzing long chains ofDan Gohman2010-08-291-4/+9
| | | | | | operations. llvm-svn: 112432
* Micro-optimize GroupByComplexity.Dan Gohman2010-08-291-2/+3
| | | | llvm-svn: 112431
* Hold AddRec->getLoop() in a variable, to make the Mul code more consistentDan Gohman2010-08-291-3/+4
| | | | | | with the Add code. llvm-svn: 112430
* Rename a variable, for consistency.Dan Gohman2010-08-291-5/+8
| | | | llvm-svn: 112429
* Use iterators instead of indices.Dan Gohman2010-08-291-2/+2
| | | | llvm-svn: 112428
* Fix lowering of INSERT_VECTOR_ELT in SPU. Kalle Raiskila2010-08-291-3/+4
| | | | | | The IDX was treated as byte index, not element index. llvm-svn: 112422
* Fix whitespaces. No functionality changes.Bill Wendling2010-08-291-26/+25
| | | | llvm-svn: 112421
* licm preserves the cfg, it doesn't have to explicitly say itChris Lattner2010-08-291-1/+1
| | | | | | preserves domfrontier. It does preserve AA though. llvm-svn: 112419
* now that it doesn't use the PromoteMemToReg function, LICM doesn'tChris Lattner2010-08-291-4/+1
| | | | | | | require DomFrontier. Dropping this doesn't actually save any runs of the pass though. llvm-svn: 112418
* completely rewrite the memory promotion algorithm in LICM.Chris Lattner2010-08-291-200/+215
| | | | | | | Among other things, this uses SSAUpdater instead of PromoteMemToReg. llvm-svn: 112417
* Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvmBob Wilson2010-08-292-32/+93
| | | | | | | IR add/sub operations with one or both operands sign- or zero-extended. Auto-upgrade the old intrinsics. llvm-svn: 112416
* use getUniqueExitBlocks instead of a manual set.Chris Lattner2010-08-291-10/+2
| | | | llvm-svn: 112412
* A couple of small missed optimizations.Eli Friedman2010-08-291-0/+52
| | | | llvm-svn: 112411
* reimplement LICM::sink to use SSAUpdater instead of PromoteMemToReg.Chris Lattner2010-08-291-71/+40
| | | | | | This leads to much simpler code. llvm-svn: 112410
* implement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.Chris Lattner2010-08-291-0/+16
| | | | llvm-svn: 112409
* remove dead protoChris Lattner2010-08-291-1/+0
| | | | llvm-svn: 112408
* reduce indentation in LICM::sink by using early exits, useChris Lattner2010-08-291-89/+92
| | | | | | | getUniqueExitBlocks instead of getExitBlocks and a manual set to eliminate dupes. llvm-svn: 112405
* modernize this pass a bit: use efficient set/map and reduce indentation.Chris Lattner2010-08-291-45/+48
| | | | llvm-svn: 112404
* when merging two alias sets, the result set is volatile if eitherChris Lattner2010-08-291-0/+1
| | | | | | | | | of the sets is volatile. We were dropping the volatile bit of the merged in set, leading (luckily) to assertions in cases like PR7535. I cannot produce a testcase that repros with opt, but this is obviously correct. llvm-svn: 112402
* more cleanupChris Lattner2010-08-291-8/+8
| | | | llvm-svn: 112401
* clean this upChris Lattner2010-08-291-51/+53
| | | | llvm-svn: 112400
* - Add a parameter to T2I_bin_irs for those patterns which set the S bit.Bill Wendling2010-08-291-8/+14
| | | | | | - Create T2I_bin_sw_irs to be like T2I_bin_w_irs, but that it sets the S bit. llvm-svn: 112399
* add a bunch more common shuffles to the instprinter.Chris Lattner2010-08-291-6/+178
| | | | llvm-svn: 112397
* Name ANDflag to ANDS, which is less stupid.Bill Wendling2010-08-291-2/+2
| | | | llvm-svn: 112395
* File missing from last commit.Bill Wendling2010-08-291-0/+7
| | | | llvm-svn: 112394
* Create an ARMISD::AND node. This node is exactly like the "ARM::AND" node, butBill Wendling2010-08-293-0/+7
| | | | | | it sets the CPSR register. llvm-svn: 112393
* I have manually decoded the imm field of an insertps one too manyChris Lattner2010-08-285-0/+220
| | | | | | | | | | | | | | | | | times. This patch causes llc and llvm-mc (which both default to verbose-asm) to print out comments after a few common shuffle instructions which indicates the shuffle mask, e.g.: insertps $113, %xmm3, %xmm0 ## xmm0 = zero,xmm0[1,2],xmm3[1] unpcklps %xmm1, %xmm0 ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] pshufd $1, %xmm1, %xmm1 ## xmm1 = xmm1[1,0,0,0] This is carefully factored to keep the information extraction (of the shuffle mask) separate from the printing logic. I plan to move the extraction part out somewhere else at some point for other parts of the x86 backend that want to introspect on the behavior of shuffles. llvm-svn: 112387
* fix the buildvector->insertp[sd] logic to not always create a redundantChris Lattner2010-08-281-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | insertp[sd] $0, which is a noop. Before: _f32: ## @f32 pshufd $1, %xmm1, %xmm2 pshufd $1, %xmm0, %xmm3 addss %xmm2, %xmm3 addss %xmm1, %xmm0 ## kill: XMM0<def> XMM0<kill> XMM0<def> insertps $0, %xmm0, %xmm0 insertps $16, %xmm3, %xmm0 ret after: _f32: ## @f32 movdqa %xmm0, %xmm2 addss %xmm1, %xmm2 pshufd $1, %xmm1, %xmm1 pshufd $1, %xmm0, %xmm3 addss %xmm1, %xmm3 movdqa %xmm2, %xmm0 insertps $16, %xmm3, %xmm0 ret The extra movs are due to a random (poor) scheduling decision. llvm-svn: 112379
* fix the BuildVector -> unpcklps logic to not do pointless shuffles Chris Lattner2010-08-281-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the top elements of a vector are undefined. This happens all the time for X86-64 ABI stuff because only the low 2 elements of a 4 element vector are defined. For example, on: _Complex float f32(_Complex float A, _Complex float B) { return A+B; } We used to produce (with SSE2, SSE4.1+ uses insertps): _f32: ## @f32 movdqa %xmm0, %xmm2 addss %xmm1, %xmm2 pshufd $16, %xmm2, %xmm2 pshufd $1, %xmm1, %xmm1 pshufd $1, %xmm0, %xmm0 addss %xmm1, %xmm0 pshufd $16, %xmm0, %xmm1 movdqa %xmm2, %xmm0 unpcklps %xmm1, %xmm0 ret We now produce: _f32: ## @f32 movdqa %xmm0, %xmm2 addss %xmm1, %xmm2 pshufd $1, %xmm1, %xmm1 pshufd $1, %xmm0, %xmm3 addss %xmm1, %xmm3 movaps %xmm2, %xmm0 unpcklps %xmm3, %xmm0 ret This implements rdar://8368414 llvm-svn: 112378
* improve comments in the unpcklps generating logic, introduceChris Lattner2010-08-281-11/+18
| | | | | | | a new EltStride variable instead of reusing NumElems variable for a non-obvious purpose. No functionality change. llvm-svn: 112377
* Don't cast Win32 FILETIME structs to int64. Patch by Dimitry Andric!Michael J. Spencer2010-08-281-3/+8
| | | | | | | | | | | | | | | According to the Microsoft documentation here: http://msdn.microsoft.com/en-us/library/ms724284%28VS.85%29.aspx this cast used in lib/System/Win32/Path.inc: __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime); should not be done. The documentation says: "Do not cast a pointer to a FILETIME structure to either a ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows." llvm-svn: 112376
* remove the MSIL backend. It isn't maintained, is buggy, has no testcasesChris Lattner2010-08-288-2056/+0
| | | | | | and hasn't kept up with ToT. Approved by Anton. llvm-svn: 112375
OpenPOWER on IntegriCloud