summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* minor code cleanups, allow constant folding sinf/cosf.Chris Lattner2008-03-301-20/+26
| | | | llvm-svn: 48961
* Cosmetic changes.Evan Cheng2008-03-291-24/+3
| | | | llvm-svn: 48947
* change iterator invalidation avoidance to just move the iterator backwardChris Lattner2008-03-291-18/+25
| | | | | | | | | | | | | | | | | | | | | when something changes, instead of moving forward. This allows us to simplify memset lowering, inserting the memset at the end of the range of stuff we're touching instead of at the start. This, in turn, allows us to make use of the addressing instructions already used in the function instead of inserting our own. For example, we now codegen: %tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2] call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 ) instead of: %tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1] %ptroffset = getelementptr i8* %tmp20, i64 -7 ; <i8*> [#uses=1] call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 ) llvm-svn: 48940
* make the common case of a single store (which clearly shouldn't be turnedChris Lattner2008-03-291-3/+12
| | | | | | into a memset!) faster by avoiding an allocation of an std::list node. llvm-svn: 48939
* give form-memset a significantly more sane heuristic, enable it by default.Chris Lattner2008-03-291-7/+49
| | | | llvm-svn: 48937
* 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. llvm-svn: 48936
* Fix a tokenfactor node to use the load chain rather than theDan Gohman2008-03-281-1/+1
| | | | | | load value. This fixes PR2177. llvm-svn: 48932
* Backing out 48911 for now. It's breaking stuff.Evan Cheng2008-03-281-12/+8
| | | | llvm-svn: 48922
* ifdef out a dead function. Should this be removed?Chris Lattner2008-03-281-0/+2
| | | | llvm-svn: 48916
* Rename getAnyLoad to getLoad is suggested by Evan.Duncan Sands2008-03-282-17/+17
| | | | llvm-svn: 48914
* New entry.Evan Cheng2008-03-281-0/+44
| | | | llvm-svn: 48912
* Load from stub is already re-materializable.Evan Cheng2008-03-281-8/+12
| | | | llvm-svn: 48911
* Update example to new syntax.Nick Lewycky2008-03-281-2/+8
| | | | llvm-svn: 48910
* make memset inference significantly more powerful: it can now handle Chris Lattner2008-03-281-82/+184
| | | | | | | | | | memsets that initialize "structs of arrays" and other store sequences that are not sequential. This is still only enabled if you pass -form-memset-from-stores. The flag is not heavily tested and I haven't analyzed the perf regressions when -form-memset-from-stores is passed either, but this causes no make check regressions. llvm-svn: 48909
* New entry.Evan Cheng2008-03-281-0/+2
| | | | llvm-svn: 48908
* 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. llvm-svn: 48894
* 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. llvm-svn: 48893
* PHI->removeIncomingValue may remove PHInode.Devang Patel2008-03-271-1/+2
| | | | | | Increment iterator in advance. llvm-svn: 48890
* Fix spelling. Thanks, Duncan! :-)Roman Levenstein2008-03-271-1/+1
| | | | llvm-svn: 48873
* 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. llvm-svn: 48872
* Code clean up.Evan Cheng2008-03-271-14/+16
| | | | llvm-svn: 48856
* Allow certain lea instructions to be rematerialized.Evan Cheng2008-03-273-35/+68
| | | | llvm-svn: 48855
* Remove an unused command line option.Evan Cheng2008-03-271-6/+0
| | | | llvm-svn: 48854
* Fix a memory bug: increment an iterator of a deleted machine instr.Evan Cheng2008-03-271-2/+7
| | | | llvm-svn: 48853
* Expose ExecutionEngine::getTargetData() to c and ocaml bindings.Erick Tryzelaar2008-03-271-0/+4
| | | | llvm-svn: 48851
* Fix a bug in Darwin EH: FDE->CIE pointer mustDale Johannesen2008-03-261-13/+9
| | | | | | be relocatable. Describe why .set is needed better. llvm-svn: 48848
* One more coalescer fix wrt deadness propagation.Evan Cheng2008-03-261-14/+22
| | | | llvm-svn: 48837
* 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. llvm-svn: 48833
* Use a linked data structure for the uses lists of an SDNode, just like Roman Levenstein2008-03-269-116/+145
| | | | | | | | | | | | | 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. llvm-svn: 48822
* Fixed some spelling errors. Thanks, Duncan!Roman Levenstein2008-03-261-52/+54
| | | | llvm-svn: 48819
* 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. llvm-svn: 48817
* Fix some SSE4.1 instruction encoding bugs.Evan Cheng2008-03-261-4/+4
| | | | llvm-svn: 48815
* Dead PHI instructions need to be handled specially.Owen Anderson2008-03-261-0/+22
| | | | llvm-svn: 48811
* Use ## for comment delimiter on darwin x86-32, soDale Johannesen2008-03-252-12/+13
| | | | | | | | llvm's output .s files will go through gcc -std=c99 without triggering preprocesser errors. Approach suggested by Daveed Vandevoorde. llvm-svn: 48808
* Smaller function alignment when optimizing for size.Evan Cheng2008-03-253-6/+8
| | | | llvm-svn: 48805
* Rename option -optimizefor-size to -optimize-size.Evan Cheng2008-03-251-1/+1
| | | | llvm-svn: 48804
* Remove some debugging code.Owen Anderson2008-03-251-3/+0
| | | | llvm-svn: 48803
* StrongPHIElimination doesn't support swapping live intervals like the ↵Owen Anderson2008-03-251-9/+6
| | | | | | coalescer does. llvm-svn: 48802
* Add explicit keywords.Dan Gohman2008-03-2516-18/+19
| | | | llvm-svn: 48801
* A quick nm audit turned up several fixed tables and objects that wereDan Gohman2008-03-259-14/+16
| | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. llvm-svn: 48800
* Avoid outputing spaces at the ends of lines.Dan Gohman2008-03-251-4/+4
| | | | llvm-svn: 48797
* Do not align loops if optimizing for size.Devang Patel2008-03-251-1/+1
| | | | llvm-svn: 48794
* Add optimize-for-size knob.Devang Patel2008-03-251-0/+6
| | | | llvm-svn: 48793
* Handle a special case xor undef, undef -> 0. Technically this should be ↵Evan Cheng2008-03-253-2/+15
| | | | | | transformed to undef. But this is such a common idiom (misuse) we are going to handle it. llvm-svn: 48792
* Handle a special case xor undef, undef -> 0. Technically this should be ↵Evan Cheng2008-03-251-1/+6
| | | | | | transformed to undef. But this is such a common idiom (misuse) we are going to handle it. llvm-svn: 48791
* Fix typos.Dan Gohman2008-03-251-3/+3
| | | | llvm-svn: 48779
* Add CMP32mr and friends to the load-unfolding table. AmongDan Gohman2008-03-251-0/+4
| | | | | | | | other things, this allows the scheduler to unfold a load operand in the 2008-01-08-SchedulerCrash.ll testcase, so it now successfully clones the comparison to avoid a pushf+popf. llvm-svn: 48777
* Fix PR2062: Don't build Intrinsics.gen in the source directory. Do it in theBill Wendling2008-03-251-2/+2
| | | | | | object directory. llvm-svn: 48766
* lastRegisterUse() should ignore identity copies. Those will be erased.Evan Cheng2008-03-251-7/+14
| | | | llvm-svn: 48759
* Remove an unneeded test.Evan Cheng2008-03-241-1/+1
| | | | llvm-svn: 48755
OpenPOWER on IntegriCloud