summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCSE.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert EXTRACT_SUBREG to COPY when emitting machine instrs.Jakob Stoklund Olesen2010-07-081-0/+22
| | | | | | | | | EXTRACT_SUBREG no longer appears as a machine instruction. Use COPY instead. Add isCopy() checks in many places using isMoveInstr() and isExtractSubreg(). The isMoveInstr hook will be removed later. llvm-svn: 107879
* Detect and handle COPY in many places.Jakob Stoklund Olesen2010-07-031-2/+2
| | | | | | | This code is transitional, it will soon be possible to eliminate isExtractSubreg, isInsertSubreg, and isMoveInstr in most places. llvm-svn: 107547
* Re-apply 105308 with fix.Evan Cheng2010-06-041-7/+13
| | | | llvm-svn: 105502
* Revert 105308.Bob Wilson2010-06-031-1/+4
| | | | llvm-svn: 105399
* Enable machine cse of instructions which define physical registers.Evan Cheng2010-06-021-4/+1
| | | | llvm-svn: 105308
* Make this LookAheadLimit, not the uninitialized LookAheadLeft.Eric Christopher2010-05-211-1/+1
| | | | | | Evan please verify! llvm-svn: 104408
* Allow machine cse to cse instructions which define physical registers. ↵Evan Cheng2010-05-211-27/+81
| | | | | | Controlled by option -machine-cse-phys-defs. llvm-svn: 104385
* Add a utility function for conservatively clearing kill flags, and makeDan Gohman2010-05-131-1/+4
| | | | | | use of it in MachineCSE. llvm-svn: 103726
* Rewrite machine cse to avoid recursion.Evan Cheng2010-04-211-11/+85
| | | | llvm-svn: 101964
* Typo.Evan Cheng2010-04-201-1/+1
| | | | llvm-svn: 101914
* After trivial coalescing, the MI being visited may have become a copy. Avoid ↵Evan Cheng2010-04-021-1/+5
| | | | | | | | adding it to CSE hash table since copies aren't being considered for CSE and they may be deleted. rdar://7819990 llvm-svn: 100170
* dbg_value may end a block.Evan Cheng2010-03-241-4/+4
| | | | llvm-svn: 99378
* Code clean up.Evan Cheng2010-03-231-6/+6
| | | | llvm-svn: 99319
* Fix debug_value handling.Dale Johannesen2010-03-111-2/+6
| | | | llvm-svn: 98224
* Add a couple more heuristics to neuter machine cse some more.Evan Cheng2010-03-101-13/+57
| | | | | | | | | | | 1. Be careful with cse "cheap" expressions. e.g. constant materialization. Only cse them when the common expression is local or in a direct predecessor. We don't want cse of cheap instruction causing other expressions to be spilled. 2. Watch out for the case where the expression doesn't itself uses a virtual register. e.g. lea of frame object. If the common expression itself is used by copies (common for passing addresses to function calls), don't perform the cse. Since these expressions do not use a register, it creates a live range but doesn't close any, we want to be very careful with increasing register pressure. Note these are heuristics so machine cse doesn't make register allocator unhappy. Once we have proper live range splitting and re-materialization support in place, these should be evaluated again. Now machine cse is almost always a win on llvm nightly tests on x86 and x86_64. llvm-svn: 98121
* Allow more cross-rc coalescing.Evan Cheng2010-03-091-10/+13
| | | | llvm-svn: 98048
* Don't do illegal cross-class coalescing.Jakob Stoklund Olesen2010-03-091-1/+1
| | | | llvm-svn: 98044
* - Make the machine cse dumb coalescer (as opposed to the more awesome simpleEvan Cheng2010-03-091-13/+57
| | | | | | | | | coalescer) handle sub-register classes. - Add heuristics to avoid non-profitable cse. Given the current lack of live range splitting, avoid cse when an expression has PHI use and the would be new use is in a BB where the expression wasn't already being used. llvm-svn: 98043
* Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid ↵Evan Cheng2010-03-081-0/+4
| | | | | | cse implicit-def for obvious performance reason. llvm-svn: 98009
* Restrict machine cse to really trivial coalescing. Leave the heavy lifting ↵Evan Cheng2010-03-081-0/+3
| | | | | | to a real coalescer. llvm-svn: 98007
* Don't update physical register def.Evan Cheng2010-03-061-2/+3
| | | | llvm-svn: 97861
* Avoid cse load instructions unless they are known to be invariant loads.Evan Cheng2010-03-041-10/+36
| | | | llvm-svn: 97747
* Look ahead a bit to determine if a physical register def that is not marked ↵Evan Cheng2010-03-041-6/+61
| | | | | | dead is really alive. This is necessary to catch a lot of common cse opportunities for targets like x86. llvm-svn: 97706
* Fix a logic error. An instruction that has a live physical register def ↵Evan Cheng2010-03-031-2/+5
| | | | | | cannot be CSE'ed, but it *can* be used to replace a common subexpression. llvm-svn: 97688
* Re-apply r97667 but with a little bit of thought put into the patch. This ↵Evan Cheng2010-03-031-65/+3
| | | | | | implements a special DenseMapInfo trait for DenseMap<MachineInstr*> that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization. llvm-svn: 97678
* Revert 97667. It broke a bunch of tests.Dan Gohman2010-03-031-0/+63
| | | | llvm-svn: 97673
* Move DenseMapInfo for MachineInstr* to MachineInstr.hEvan Cheng2010-03-031-63/+0
| | | | llvm-svn: 97667
* Machine CSE work in progress. It's doing some CSE now. But implicit def of ↵Evan Cheng2010-03-031-24/+61
| | | | | | physical registers are getting in the way. llvm-svn: 97664
* Work in progress. Finding some cse now.Evan Cheng2010-03-031-4/+88
| | | | llvm-svn: 97635
* Fix typo.Evan Cheng2010-03-021-1/+1
| | | | llvm-svn: 97577
* Add skeleton of a machine level cse pass.Evan Cheng2010-03-021-0/+124
llvm-svn: 97543
OpenPOWER on IntegriCloud