aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* More soft fp fixes.Evan Cheng2008-04-011-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49016 91177308-0d34-0410-b5e6-96231b3b80d8
* Pasto.Evan Cheng2008-04-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49014 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Evan Cheng2008-04-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49013 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak ARM / Thumb soft FP support.Evan Cheng2008-04-011-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49012 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit exception handling info for functions which areDale Johannesen2008-03-313-17/+26
| | | | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006 91177308-0d34-0410-b5e6-96231b3b80d8
* It's not safe to fold a load from GV stub or constantpool into a two-address ↵Evan Cheng2008-03-311-2/+3
| | | | | | use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49002 91177308-0d34-0410-b5e6-96231b3b80d8
* Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.Evan Cheng2008-03-312-4/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48995 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a DAGCombiner optimization to respect volatile qualification.Dan Gohman2008-03-311-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48994 91177308-0d34-0410-b5e6-96231b3b80d8
* The support for remat of instructions with a register operand is hackish, to ↵Evan Cheng2008-03-311-18/+7
| | | | | | say the least. Since the register operand guaranteed to be PIC base and that it is already live at all uses, we are making sure it will not be spilled after its uses are rematerialized for both performance and correctness reasons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48976 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for ↵Owen Anderson2008-03-311-1/+1
| | | | | | pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48973 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "Control reaches the end of non-void function" warnings, Chris Lattner2008-03-301-0/+1
| | | | | | | patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963 91177308-0d34-0410-b5e6-96231b3b80d8
* Cosmetic changes.Evan Cheng2008-03-291-24/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48947 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unneeded code for LiveInterval joining, and fix a bug in the Phi ↵Owen Anderson2008-03-291-58/+25
| | | | | | | | | elimination algorithm where we were accidentally reasoning about the source rather than the destination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48936 91177308-0d34-0410-b5e6-96231b3b80d8
* ifdef out a dead function. Should this be removed?Chris Lattner2008-03-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48916 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getAnyLoad to getLoad is suggested by Evan.Duncan Sands2008-03-282-17/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48914 91177308-0d34-0410-b5e6-96231b3b80d8
* New entry.Evan Cheng2008-03-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48908 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement LegalizeTypes support for softfloat LOAD.Duncan Sands2008-03-273-78/+64
| | | | | | | | | In order to handle indexed nodes I had to introduce a new constructor, and since I was there I factorized the code in the various load constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48894 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating chain dependencies from CopyToReg nodes to load and storeDan Gohman2008-03-271-54/+72
| | | | | | | | | | | | | | | | | | | nodes. This doesn't currently have much impact the generated code, but it does produce simpler-looking SelectionDAGs, and consequently simpler-looking ScheduleDAGs, because there are fewer spurious dependencies. In particular, CopyValueToVirtualRegister now uses the entry node as the input chain dependency for new CopyToReg nodes instead of calling getRoot and depending on the most recent memory reference. Also, rename UnorderedChains to PendingExports and pull it up from being a local variable in SelectionDAGISel::BuildSelectionDAG to being a member variable of SelectionDAGISel, so that it doesn't have to be passed around to all the places that need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48893 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling. Thanks, Duncan! :-)Roman Levenstein2008-03-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48873 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed-up the SumOfUnscheduledPredsOfSuccs by introducing a new functionRoman Levenstein2008-03-271-2/+25
| | | | | | | | | | | | called LimitedSumOfUnscheduledPredsOfSuccs. It terminates the computation after a given treshold is reached. This new function is always faster, but brings real wins only on bigger test-cases. The old function SumOfUnscheduledPredsOfSuccs is left in-place for now and therefore a warning about an unused static function is produced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48872 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a memory bug: increment an iterator of a deleted machine instr.Evan Cheng2008-03-271-2/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48853 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in Darwin EH: FDE->CIE pointer mustDale Johannesen2008-03-261-13/+9
| | | | | | | | be relocatable. Describe why .set is needed better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48848 91177308-0d34-0410-b5e6-96231b3b80d8
* One more coalescer fix wrt deadness propagation.Evan Cheng2008-03-261-14/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48837 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid commuting a def MI in order to coalesce a copy instruction away if any ↵Evan Cheng2008-03-262-2/+13
| | | | | | use of the same val# is a copy instruction that has already been coalesced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48833 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a linked data structure for the uses lists of an SDNode, just like Roman Levenstein2008-03-266-108/+137
| | | | | | | | | | | | | | | LLVM Value/Use does and MachineRegisterInfo/MachineOperand does. This allows constant time for all uses list maintenance operations. The idea was suggested by Chris. Reviewed by Evan and Dan. Patch is tested and approved by Dan. On normal use-cases compilation speed is not affected. On very big basic blocks there are compilation speedups in the range of 15-20% or even better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48822 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed some spelling errors. Thanks, Duncan!Roman Levenstein2008-03-261-52/+54
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48819 91177308-0d34-0410-b5e6-96231b3b80d8
* Some improvements related to the computation of isReachable.Roman Levenstein2008-03-261-54/+315
| | | | | | | | | | | | | | | | | | | | | | | | | This fixes Bugzilla #1835 (http://llvm.org/bugs/show_bug.cgi?id=1835). This patched is reviewed by Tanya and Dan. Dan tested and approved it. The reason for the bad performance of the old algorithm is that it is very naive and scans every time all nodes of the DAG in the worst case. This patch introduces a new algorithm based on the paper "Online algorithms for maintaining the topological order of a directed acyclic graph" by David J.Pearce and Paul H.J.Kelly. This is the MNR algorithm. It has a linear time worst-case and performs much better in most situations. The paper can be found here: http://fano.ics.uci.edu/cites/Document/Online-algorithms-for-maintaining-the-topological-order-of-a-directed-acyclic-graph.html The main idea of the new algorithm is to compute the topological ordering of the SNodes in the DAG and to maintain it even after DAG modifications. The topological ordering allows for very fast node reachability checks. Tests on very big input files with tens of thousands of instructions in a BB indicate huge speed-ups (up to 10x compilation time improvement) compared to the old version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48817 91177308-0d34-0410-b5e6-96231b3b80d8
* Dead PHI instructions need to be handled specially.Owen Anderson2008-03-261-0/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48811 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some debugging code.Owen Anderson2008-03-251-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48803 91177308-0d34-0410-b5e6-96231b3b80d8
* StrongPHIElimination doesn't support swapping live intervals like the ↵Owen Anderson2008-03-251-9/+6
| | | | | | coalescer does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48802 91177308-0d34-0410-b5e6-96231b3b80d8
* A quick nm audit turned up several fixed tables and objects that wereDan Gohman2008-03-253-8/+8
| | | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid outputing spaces at the ends of lines.Dan Gohman2008-03-251-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48797 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not align loops if optimizing for size.Devang Patel2008-03-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48794 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle a special case xor undef, undef -> 0. Technically this should be ↵Evan Cheng2008-03-252-1/+9
| | | | | | transformed to undef. But this is such a common idiom (misuse) we are going to handle it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48792 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos.Dan Gohman2008-03-251-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48779 91177308-0d34-0410-b5e6-96231b3b80d8
* lastRegisterUse() should ignore identity copies. Those will be erased.Evan Cheng2008-03-251-7/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48759 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unneeded test.Evan Cheng2008-03-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48755 91177308-0d34-0410-b5e6-96231b3b80d8
* If the coalescer commuted a def MI to allow coalescing, it can changed a ↵Evan Cheng2008-03-241-1/+2
| | | | | | previously coalesced copy into an non-identity copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48752 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion to catch register of illegal class.Evan Cheng2008-03-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48751 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove #include<iostream>, which I was using for debugging.Owen Anderson2008-03-241-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48739 91177308-0d34-0410-b5e6-96231b3b80d8
* APIntify SelectionDAG's EXTRACT_ELEMENT code.Dan Gohman2008-03-241-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48726 91177308-0d34-0410-b5e6-96231b3b80d8
* Be sure to remove intervals after we've joined them. Also, remove some ↵Owen Anderson2008-03-241-46/+18
| | | | | | | | | | duplicated code. With this pass, StrongPHIElim can compile very simple testcases correctly. There's still a ways to go before it's ready for prime time, though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48719 91177308-0d34-0410-b5e6-96231b3b80d8
* Another comments fixingAnton Korobeynikov2008-03-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48683 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAG combiner to commute commutable binary nodes in order to achieve ↵Evan Cheng2008-03-222-0/+31
| | | | | | sdisel CSE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48673 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include <map> in Pass.h, which doesn't need it. This requiresDan Gohman2008-03-213-0/+3
| | | | | | | adding <map> to many files that actually do need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48667 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -view-sunit-dags to support cross-rc-copy nodes.Dan Gohman2008-03-211-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48664 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of kill marker maintainence bug.Evan Cheng2008-03-212-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48653 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new node for holding call argumentDuncan Sands2008-03-215-56/+90
| | | | | | | | | | | | | | | | | | flags. This is needed by the new legalize types infrastructure which wants to expand the 64 bit constants previously used to hold the flags on 32 bit machines. There are two functional changes: (1) in LowerArguments, if a parameter has the zext attribute set then that is marked in the flags; before it was being ignored; (2) PPC had some bogus code for handling two word arguments when using the ELF 32 ABI, which was hard to convert because of the bogusness. As suggested by the original author (Nicolas Geoffray), I've disabled it for the moment. Tested with "make check" and the Ada ACATS testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48640 91177308-0d34-0410-b5e6-96231b3b80d8
* Check even more carefully before applying this DAGCombine transform.Christopher Lamb2008-03-201-13/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48580 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this xform: (sra (shl X, m), result_size) -> (sign_extend (trunc (shl X, ↵Evan Cheng2008-03-201-1/+3
| | | | | | result_size - n - m))) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48578 91177308-0d34-0410-b5e6-96231b3b80d8