summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* For PR950:Reid Spencer2006-12-315-38/+36
| | | | | | | | | | | | | This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. llvm-svn: 32785
* For PR950:Reid Spencer2006-12-235-47/+63
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* switch more statistics over to STATISTIC, eliminating static ctors. Also,Chris Lattner2006-12-198-27/+23
| | | | | | delete some dead ones. llvm-svn: 32694
* Added an automatic cast to "std::ostream*" etc. from OStream. We then canBill Wendling2006-12-171-1/+6
| | | | | | | rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. llvm-svn: 32636
* Replace CastInst::createInferredCast calls with more accurate castReid Spencer2006-12-131-9/+8
| | | | | | creation calls. llvm-svn: 32521
* Fix the casting for the computation of the Malloc size.Reid Spencer2006-12-121-3/+3
| | | | llvm-svn: 32477
* Change inferred getCast into specific getCast. Passes all tests.Reid Spencer2006-12-122-4/+9
| | | | llvm-svn: 32469
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-072-4/+3
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-068-11/+11
| | | | | | is 'unsigned'. llvm-svn: 32279
* For PR950:Reid Spencer2006-11-274-16/+32
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Remove #include <iostream> and use llvm_* streams instead.Bill Wendling2006-11-263-40/+37
| | | | llvm-svn: 31925
* Do not convert massive blocks on phi nodes into select statements. InsteadChris Lattner2006-11-181-0/+27
| | | | | | | only do these transformations if there are a small number of phi's. This speeds up Ptrdist/ks from 2.35s to 2.19s on my mac pro. llvm-svn: 31853
* Remove redundant <cmath>.Jim Laskey2006-11-081-1/+0
| | | | llvm-svn: 31561
* For PR950:Reid Spencer2006-11-082-2/+4
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* Unbreak VC++ build.Jeff Cohen2006-11-051-3/+3
| | | | llvm-svn: 31464
* For PR786:Reid Spencer2006-11-024-8/+2
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* generalize the fix for PR977 to also fixChris Lattner2006-10-311-28/+26
| | | | | | Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll llvm-svn: 31317
* Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.llChris Lattner2006-10-311-1/+8
| | | | llvm-svn: 31315
* Fix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.Chris Lattner2006-10-291-1/+1
| | | | llvm-svn: 31284
* add option to isCriticalEdgeChris Lattner2006-10-281-3/+12
| | | | llvm-svn: 31258
* Expose a smarter way to break critical edges.Chris Lattner2006-10-281-5/+24
| | | | llvm-svn: 31256
* For PR950:Reid Spencer2006-10-206-26/+27
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.Chris Lattner2006-10-201-23/+40
| | | | llvm-svn: 31061
* This case isn't implemented yet. It seems unlikely to be needed, but if itChris Lattner2006-10-041-4/+2
| | | | | | ever is, we want to get an assert instead of silent bad codegen. llvm-svn: 30716
* Fix PR932 and Analysis/Dominators/2006-10-02-BreakCritEdges.ll:Chris Lattner2006-10-031-15/+112
| | | | | | | The critical edge block dominates the dest block if the destblock dominates all edges other than the one incoming from the critical edge. llvm-svn: 30696
* simplify codeChris Lattner2006-09-281-1/+1
| | | | llvm-svn: 30656
* Be far more careful when splitting a loop header, either to form a preheaderChris Lattner2006-09-231-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or when splitting loops with a common header into multiple loops. In particular the old code would always insert the preheader before the old loop header. This is disasterous in cases where the loop hasn't been rotated. For example, it can produce code like: .. outside the loop... jmp LBB1_2 #bb13.outer LBB1_1: #bb1 movsd 8(%esp,%esi,8), %xmm1 mulsd (%edi), %xmm1 addsd %xmm0, %xmm1 addl $24, %edi incl %esi jmp LBB1_3 #bb13 LBB1_2: #bb13.outer leal (%edx,%eax,8), %edi pxor %xmm1, %xmm1 xorl %esi, %esi LBB1_3: #bb13 movapd %xmm1, %xmm0 cmpl $4, %esi jl LBB1_1 #bb1 Note that the loop body is actually LBB1_1 + LBB1_3, which means that the loop now contains an uncond branch WITHIN it to jump around the inserted loop header (LBB1_2). Doh. This patch changes the preheader insertion code to insert it in the right spot, producing this code: ... outside the loop, fall into the header ... LBB1_1: #bb13.outer leal (%edx,%eax,8), %esi pxor %xmm0, %xmm0 xorl %edi, %edi jmp LBB1_3 #bb13 LBB1_2: #bb1 movsd 8(%esp,%edi,8), %xmm0 mulsd (%esi), %xmm0 addsd %xmm1, %xmm0 addl $24, %esi incl %edi LBB1_3: #bb13 movapd %xmm0, %xmm1 cmpl $4, %edi jl LBB1_2 #bb1 Totally crazy, no branch in the loop! :) llvm-svn: 30587
* Teach UpdateDomInfoForRevectoredPreds to handle revectored preds that are notChris Lattner2006-09-231-91/+49
| | | | | | | | reachable, making it general purpose enough for use by InsertPreheaderForLoop. Eliminate custom dominfo updating code in InsertPreheaderForLoop, using UpdateDomInfoForRevectoredPreds instead. llvm-svn: 30586
* Second half of the fix for Transforms/Inline/inline_cleanup.llChris Lattner2006-09-131-2/+28
| | | | | | | This folds unconditional branches that are often produced by code specialization. llvm-svn: 30307
* Implement the first half of Transforms/Inline/inline_cleanup.llChris Lattner2006-09-131-1/+9
| | | | llvm-svn: 30303
* Fix Duraid's changes to work when TLI is null. This fixes the failingChris Lattner2006-09-051-3/+7
| | | | | | lowerinvoke regtests. llvm-svn: 30115
* add setJumpBufSize() and setJumpBufAlignment() to target-lowering.Duraid Madina2006-09-041-10/+10
| | | | | | | Call these from your backend to enjoy setjmp/longjmp goodness, see lib/Target/IA64/IA64ISelLowering.cpp for an example llvm-svn: 30095
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-279-9/+9
| | | | llvm-svn: 29925
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-277-7/+7
| | | | llvm-svn: 29911
* Don't attempt to split subloops out of a loop with a huge number of backedges.Chris Lattner2006-08-121-8/+19
| | | | | | | | | Not only will this take huge amounts of compile time, the resultant loop nests won't be useful for optimization. This reduces loopsimplify time on Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll from ~32s to ~0.4s with a debug build of llvm on a 2.7Ghz G5. llvm-svn: 29647
* Reimplement the loopsimplify code which deletes edges from unreachableChris Lattner2006-08-121-29/+53
| | | | | | | | | | | | | | | | | | | blocks that target loop blocks. Before, the code was run once per loop, and depended on the number of predecessors each block in the loop had. Unfortunately, scanning preds can be really slow when huge numbers of phis exist or when phis with huge numbers of inputs exist. Now, the code is run once per function and scans successors instead of preds, which is far faster. In addition, the new code is simpler and is goto free, woo. This change speeds up a nasty testcase Duraid provided me from taking hours to taking ~72s with a debug build. The functionality this implements is already tested in the testsuite as Transforms/CodeExtractor/2004-03-13-LoopExtractorCrash.ll. llvm-svn: 29644
* Fix PR867 (and maybe 868) and testcsae:Chris Lattner2006-08-031-6/+25
| | | | | | Transforms/SimplifyCFG/2006-08-03-Crash.ll llvm-svn: 29515
* Add special check to avoid isLoop call. Simple, but doesn't seem to speedChris Lattner2006-08-021-2/+2
| | | | | | up lcssa much in practice. llvm-svn: 29465
* Replace the SSA update code in LCSSA with a bottom-up approach instead of a topChris Lattner2006-08-021-125/+95
| | | | | | | | | | | | | | | | | down approach, inspired by discussions with Tanya. This approach is significantly faster, because it does not need dominator frontiers and it does not insert extraneous unused PHI nodes. For example, on 252.eon, in a release-asserts build, this speeds up LCSSA (which is the slowest pass in gccas) from 9.14s to 0.74s on my G5. This code is also slightly smaller and significantly simpler than the old code. Amusingly, in a normal Release build (which includes the "assert(L->isLCSSAForm());" assertion), asserting that the result of LCSSA is in LCSSA form is actually slower than the LCSSA transformation pass itself on 252.eon. I will see if Loop::isLCSSAForm can be sped up next. llvm-svn: 29463
* Add some adviceChris Lattner2006-07-275-0/+1230
| | | | llvm-svn: 29324
* silence warnings in a release buildChris Lattner2006-07-181-1/+1
| | | | llvm-svn: 29189
* eliminate some ugly code, using ConstantExpr::getWithOperands instead.Chris Lattner2006-07-141-35/+4
| | | | llvm-svn: 29149
* Handle instructions in the map, but that map to a null pointer.Chris Lattner2006-07-121-1/+2
| | | | | | This unbreaks smg2000. llvm-svn: 29127
* In addition to deleting calls, the inliner can constant fold them as well.Chris Lattner2006-07-121-2/+4
| | | | | | | Handle this case, which doesn't require a new callgraph edge. This fixes a crash compiling MallocBench/gs. llvm-svn: 29121
* Change the callgraph representation to store the callsite along with theChris Lattner2006-07-121-37/+46
| | | | | | | | | | | target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll llvm-svn: 29120
* Fix typo in the comment.Owen Anderson2006-07-091-1/+1
| | | | llvm-svn: 29078
* Add a fix for an issue where LCSSA would fail to insert undef's in some cornerOwen Anderson2006-07-091-14/+21
| | | | | | | cases. Ideally, this issue will go away in the future as LCSSA gets smarter about which Phi nodes it inserts. llvm-svn: 29076
* Use hidden visibility to make symbols in an anonymous namespace getChris Lattner2006-06-283-3/+6
| | | | | | dropped. This shrinks libllvmgcc.dylib another 67K llvm-svn: 28975
* Use the PotDoms map to memoize 'dominating value' lookup. With this patch,Chris Lattner2006-06-141-17/+14
| | | | | | | LCSSA is still the slowest pass when gccas'ing 252.eon, but now it only takes 39s instead of 289s. :) llvm-svn: 28776
* Fix another instance where PHI nodes need special treatment.Owen Anderson2006-06-131-0/+6
| | | | llvm-svn: 28774
OpenPOWER on IntegriCloud