summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Reapply 122353-122355 with fixes. 122354 was wrong;Dale Johannesen2010-12-213-7/+44
| | | | | | | | the shift type was needed one place, the shift count type another. The transform in 123555 had the same problem. llvm-svn: 122366
* Add some x86 specific dagcombines for conditional increments.Benjamin Kramer2010-12-212-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (add Y, (sete X, 0)) -> cmp X, 1; adc 0, Y (add Y, (setne X, 0)) -> cmp X, 1; sbb -1, Y (sub (sete X, 0), Y) -> cmp X, 1; sbb 0, Y (sub (setne X, 0), Y) -> cmp X, 1; adc -1, Y for unsigned foo(unsigned a, unsigned b) { if (a == 0) b++; return b; } we now get: foo: cmpl $1, %edi movl %esi, %eax adcl $0, %eax ret instead of: foo: testl %edi, %edi sete %al movzbl %al, %eax addl %esi, %eax ret llvm-svn: 122364
* GVN's Expression is not POD-like (it contains a SmallVector). Simplify code ↵Benjamin Kramer2010-12-211-13/+3
| | | | | | while at it. llvm-svn: 122362
* Revert 122353-122355 for the moment, they broke stuff.Dale Johannesen2010-12-213-42/+6
| | | | llvm-svn: 122360
* Simplify EvaluateAsAbsolute now that EvaluateAsRelocatableImpl does allRafael Espindola2010-12-211-19/+5
| | | | | | the folding it can. llvm-svn: 122359
* Don't relax org or align. They change size as the relaxation happens, but theyRafael Espindola2010-12-212-62/+30
| | | | | | | are not actually relaxed. For example, a section with only alignments will never needs relaxation. llvm-svn: 122356
* Add a new transform to DAGCombiner.Dale Johannesen2010-12-212-0/+36
| | | | llvm-svn: 122355
* Get the type of a shift from the shift, not from its shiftDale Johannesen2010-12-212-4/+4
| | | | | | | | count operand. These should be the same but apparently are not always, and this is cleaner anyway. This improves the code in an existing test. llvm-svn: 122354
* Shift by the word size is invalid IR; don't create it.Dale Johannesen2010-12-211-2/+2
| | | | llvm-svn: 122353
* fix some typosChris Lattner2010-12-211-2/+1
| | | | llvm-svn: 122349
* Revert 122341. It breaks some darwin tests.David Greene2010-12-213-50/+2
| | | | llvm-svn: 122346
* Fix indentation, add comment.Stuart Hastings2010-12-211-4/+6
| | | | llvm-svn: 122345
* Visit instructions deterministically. Use a FIFO so as to approximatelyDuncan Sands2010-12-211-11/+21
| | | | | | | visit instructions before their uses, since InstructionSimplify does a better job in that case. All this prompted by Frits van Bommel. llvm-svn: 122343
* Missing logic for nested CALLSEQ_START/END.Stuart Hastings2010-12-211-2/+5
| | | | llvm-svn: 122342
* Fix PR 8199. This patch prepends the build tool dir to LLVM programsDavid Greene2010-12-213-2/+50
| | | | | | | | being tested. This ensures that we test the tools just built and not some random tools that might happen to be in the user's PATH. This makes LLVM testing much more stable and predictable. llvm-svn: 122341
* Tidy up a bit. Trailing whitespace, hard tabs and 80-columns.Jim Grosbach2010-12-214-536/+536
| | | | llvm-svn: 122337
* If an instruction simplifies, try again to simplify any uses of it. This isDuncan Sands2010-12-211-4/+32
| | | | | | | not very important since the pass is only used for testing, but it does make it more realistic. Suggested by Frits van Bommel. llvm-svn: 122336
* MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrongDaniel Dunbar2010-12-213-15/+28
| | | | | | type. llvm-svn: 122334
* Add an additional InstructionSimplify factorization test.Duncan Sands2010-12-211-0/+10
| | | | llvm-svn: 122333
* While I don't think any later transforms can fire, it seems cleaner toDuncan Sands2010-12-212-3/+28
| | | | | | | not assume this (for example in case more transforms get added below it). Suggested by Frits van Bommel. llvm-svn: 122332
* Fix inverted condition noticed by Frits van Bommel.Duncan Sands2010-12-211-3/+3
| | | | llvm-svn: 122331
* Pull a few more simplifications out of instcombine (there are stillDuncan Sands2010-12-213-11/+94
| | | | | | plenty left though!), in particular for multiplication. llvm-svn: 122330
* Fix typo in comment, spotted by Deewiant.Duncan Sands2010-12-211-1/+1
| | | | llvm-svn: 122329
* Teach InstructionSimplify about distributive laws. These transforms fireDuncan Sands2010-12-212-11/+180
| | | | | | | quite often, but don't make much difference in practice presumably because instcombine also knows them and more. llvm-svn: 122328
* Move checking of the recursion limit into the various Thread methods.Duncan Sands2010-12-211-20/+36
| | | | | | No functionality change. llvm-svn: 122327
* Add generic simplification of associative operations, generalizingDuncan Sands2010-12-213-28/+185
| | | | | | | | | | | | a couple of existing transforms. This fires surprisingly often, for example when compiling gcc "(X+(-1))+1->X" fires quite a lot as well as various "and" simplifications (usually with a phi node operand). Most of the time this doesn't make a real difference since the same thing would have been done elsewhere anyway, eg: by instcombine, but there are a few places where this results in simplifications that we were not doing before. llvm-svn: 122326
* Incremental progress towards a new implementation of StrongPHIElimination. MostCameron Zwarich2010-12-211-3/+186
| | | | | | | | | | | | of the problems with my last attempt were in the updating of LiveIntervals rather than the coalescing itself. Therefore, I decided to get that right first by essentially reimplementing the existing PHIElimination using LiveIntervals. It works correctly, with only a few tests failing (which may not be legitimate failures) and no new verifier failures (at least as far as I can tell, I didn't count the number per file). llvm-svn: 122321
* Add ARM-specific DAG combining to cast i64 vector element load/stores to f64.Bob Wilson2010-12-212-5/+133
| | | | | | | | | | | Type legalization splits up i64 values into pairs of i32 values, which leads to poor quality code when inserting or extracting i64 vector elements. If the vector element is loaded or stored, it can be treated as an f64 value and loaded or stored directly from a VPR register. Use the pre-legalization DAG combiner to cast those vector elements to f64 types so that the type legalizer won't mess them up. Radar 8755338. llvm-svn: 122319
* Layout one section until no relaxations are done and then move to the nextRafael Espindola2010-12-212-34/+43
| | | | | | | | | | section. This helps because in practice sections form a dag with debug sections pointing to text sections. Finishing up the text sections first makes the debug section relaxation trivial. llvm-svn: 122314
* Arm and thumb call instructions are also in different orders.Eric Christopher2010-12-211-13/+24
| | | | | | Fixes rdar://8782223 llvm-svn: 122313
* Grammar corrections and some formatting changes.Bill Wendling2010-12-211-200/+201
| | | | llvm-svn: 122312
* rename MVT::Flag to MVT::Glue. "Flag" is a terrible name forChris Lattner2010-12-2138-153/+153
| | | | | | | something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
* If we're not using reg+reg offset we're using reg+imm, set the opcodeEric Christopher2010-12-211-2/+2
| | | | | | | | | to be the one we want to use. bugpoint reduced testcase is a little large, I'll see if I can simplify it down more. Fixes part of rdar://8782207 llvm-svn: 122307
* improve "cannot yet select" errors a trivial amount: nowChris Lattner2010-12-211-1/+1
| | | | | | they are just as useless, but at least a bit more gramatical llvm-svn: 122305
* Fix a copy-pasto. When the tBR_JTr instruction was converted to using theBill Wendling2010-12-211-1/+1
| | | | | | | | | tPseudoInst class, its size was changed from "special" to "2 bytes". This is incorrect because the jump table will no longer be taken into account when calculating branch offsets. <rdar://problem/8782216> llvm-svn: 122303
* Comment cleanups.Bill Wendling2010-12-211-2/+2
| | | | llvm-svn: 122302
* Add EdgeBundles to SplitKit.Jakob Stoklund Olesen2010-12-212-1/+85
| | | | | | | | | Edge bundles is an annotation on the CFG that turns it into a bipartite directed graph where each basic block is connected to an outgoing and an ingoing bundle. These bundles are useful for identifying regions of the CFG for live range splitting. llvm-svn: 122301
* Use IntEqClasses to compute connected components of live intervals.Jakob Stoklund Olesen2010-12-214-56/+20
| | | | llvm-svn: 122296
* Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.Jakob Stoklund Olesen2010-12-215-0/+259
| | | | | | | | | | This implementation already exists as ConnectedVNInfoEqClasses in LiveInterval.cpp, and it seems to be generally useful to have a light-weight way of forming equivalence classes of small integers. IntEqClasses doesn't allow enumeration of the elements in a class. llvm-svn: 122293
* Speculatively revert the use of DenseMap in LazyValueInfo, which may be ↵Owen Anderson2010-12-201-42/+16
| | | | | | causing Linux self-host failures. llvm-svn: 122291
* Attempt to appease the DragonEgg buildbots.Owen Anderson2010-12-201-22/+24
| | | | llvm-svn: 122288
* Revert r122114 (CallbackVH observing use-list changes) because it caused ↵Owen Anderson2010-12-203-45/+1
| | | | | | severe slowdowns on the Linux self-host configuration. llvm-svn: 122279
* Implement feedback from Bruno on making pblendvb an x86-specific ISD node in ↵Nate Begeman2010-12-204-11/+14
| | | | | | | | addition to being an intrinsic, and convert lowering to use it. Hopefully the pattern fragment is doing the right thing with XMM0, looks correct in testing. llvm-svn: 122277
* Update the target feature matrix to reflect some new features in the MBlaze ↵Wesley Peck2010-12-201-4/+4
| | | | | | backend. llvm-svn: 122276
* Convert one of LVI's primary maps to a DenseMap, now that we know are more ↵Owen Anderson2010-12-201-16/+40
| | | | | | assured of iterator stability. llvm-svn: 122273
* Teach the MBlaze disassembler to disassemble special purpose registers.Wesley Peck2010-12-203-10/+89
| | | | llvm-svn: 122269
* Set the value of absolute symbols.Roman Divacky2010-12-202-1/+23
| | | | llvm-svn: 122268
* This is still used and issuing an annoying warning. Don't deprecate something inBill Wendling2010-12-201-3/+3
| | | | | | the library unless *all* uses have been converted over to the new form. llvm-svn: 122267
* Oops, forgot to add the pass itself!Duncan Sands2010-12-201-0/+69
| | | | llvm-svn: 122265
* Add a new convenience pass for testing InstructionSimplify. PreviouslyDuncan Sands2010-12-205-0/+11
| | | | | | | | | it could only be tested indirectly, via instcombine, gvn or some other pass that makes use of InstructionSimplify, which means that testcases had to be carefully contrived to dance around any other transformations that that pass did. llvm-svn: 122264
OpenPOWER on IntegriCloud