summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Fix a crash compiling 129.compressChris Lattner2005-01-131-6/+109
| | | | llvm-svn: 19533
* Add the LOADABLE_MODULE=1 directive to indicate that this shared library isReid Spencer2005-01-111-0/+1
| | | | | | intended to be a dlopenable module and not a "plain" shared library. llvm-svn: 19456
* Apply feedback from Chris.Jeff Cohen2005-01-101-2/+2
| | | | llvm-svn: 19432
* Fix VS warningsChris Lattner2005-01-082-13/+13
| | | | llvm-svn: 19383
* Fix VS warnings.Chris Lattner2005-01-082-4/+5
| | | | llvm-svn: 19382
* Fix uint64_t -> unsigned VS warnings.Chris Lattner2005-01-082-12/+13
| | | | llvm-svn: 19381
* Silence VS warnings.Chris Lattner2005-01-081-5/+7
| | | | llvm-svn: 19380
* Silence warningsChris Lattner2005-01-082-3/+4
| | | | llvm-svn: 19379
* Add more missing createXxxPass functions.Jeff Cohen2005-01-083-0/+9
| | | | llvm-svn: 19370
* Convert tabs to spacesMisha Brukman2005-01-071-3/+2
| | | | llvm-svn: 19320
* Add missing createXxxPass functionsJeff Cohen2005-01-074-0/+20
| | | | llvm-svn: 19319
* Add missing includeJeff Cohen2005-01-071-0/+1
| | | | llvm-svn: 19315
* Put createLoopUnswitchPass() into proper namespaceJeff Cohen2005-01-061-1/+1
| | | | llvm-svn: 19306
* Add missing includeJeff Cohen2005-01-061-0/+1
| | | | llvm-svn: 19305
* This is a bulk commit that implements the following primary improvements:Chris Lattner2005-01-011-78/+268
| | | | | | | | | | | | | | | | | | | | | | * We can now fold cast instructions into select instructions that have at least one constant operand. * We now optimize expressions more aggressively based on bits that are known to be zero. These optimizations occur a lot in code that uses bitfields even in simple ways. * We now turn more cast-cast sequences into AND instructions. Before we would only do this if it if all types were unsigned. Now only the middle type needs to be unsigned (guaranteeing a zero extend). * We transform sign extensions into zero extensions in several cases. This corresponds to these test/Regression/Transforms/InstCombine testcases: 2004-11-22-Missed-and-fold.ll and.ll: test28-29 cast.ll: test21-24 and-or-and.ll cast-cast-to-and.ll zeroext-and-reduce.ll llvm-svn: 19220
* Implement SimplifyCFG/DeadSetCC.llChris Lattner2005-01-011-0/+8
| | | | | | | | SimplifyCFG is one of those passes that we use for final cleanup: it should not rely on other passes to clean up its garbage. This fixes the "why are trivially dead setcc's in the output of gccas" problem. llvm-svn: 19212
* Fix PR491 and testcase ↵Chris Lattner2004-12-291-1/+2
| | | | | | Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll llvm-svn: 19180
* Adjust to new interfacesChris Lattner2004-12-151-2/+3
| | | | llvm-svn: 18958
* Constant exprs are not efficiently negatable in practice. This disablesChris Lattner2004-12-141-4/+3
| | | | | | turning X - (constantexpr) into X + (-constantexpr) among other things. llvm-svn: 18935
* Fix link error in PPC optimized build of 'opt'.Brian Gaeke2004-12-131-0/+1
| | | | llvm-svn: 18913
* Get rid of getSizeOf, using ConstantExpr::getSizeOf instead.Chris Lattner2004-12-131-20/+33
| | | | | | | | | | | do not insert a prototype for malloc of: void* malloc(uint): on 64-bit u targets this is not correct. Instead of prototype it as void *malloc(...), and pass the correct intptr_t through the "...". Finally, fix Regression/CodeGen/SparcV9/2004-12-13-MallocCrash.ll, by not forming constantexpr casts from pointer to uint. llvm-svn: 18908
* Change indentation of a whole bunch of code, no real changes here.Chris Lattner2004-12-121-105/+105
| | | | llvm-svn: 18843
* More substantial simplifications and speedups. This makes ADCE about 20% fasterChris Lattner2004-12-121-97/+43
| | | | | | in some cases. llvm-svn: 18842
* More minor microoptimizationsChris Lattner2004-12-121-6/+4
| | | | llvm-svn: 18841
* Remove some more set operationsChris Lattner2004-12-121-6/+2
| | | | llvm-svn: 18840
* Reduce number of set operations.Chris Lattner2004-12-121-2/+1
| | | | llvm-svn: 18839
* Optimize div/rem + select combinations more.Chris Lattner2004-12-121-24/+89
| | | | | | In particular, implement div.ll:test10 and rem.ll:test4. llvm-svn: 18838
* Properly implement copying of a global, fixing the 255.vortex & povrayChris Lattner2004-12-121-2/+25
| | | | | | failures from last night. llvm-svn: 18832
* Simplify code and do not invalidate iterators.Chris Lattner2004-12-121-46/+9
| | | | | | | This fixes a crash compiling TimberWolfMC that was exposed due to recent optimizer changes. llvm-svn: 18831
* Though the previous xform applies to literally dozens (hundreds?) of variablesChris Lattner2004-12-121-1/+2
| | | | | | | | | | | | | | | | | | | | in SPEC, the subsequent optimziations that we are after don't play with with FP values, so disable this xform for them. Really we just don't want stuff like: double G; (always 0 or 412312.312) = G; turning into: bool G_b; = G_b ? 412312.312 : 0; We'd rather just do the load. -Chris llvm-svn: 18819
* If a variable can only hold two values, and is not already a bool, shrink itChris Lattner2004-12-121-22/+78
| | | | | | | | | | down to actually BE a bool. This allows simple value range propagation stuff work harder, deleting comparisons in bzip2 in some hot loops. This implements GlobalOpt/integer-bool.ll, which is the essence of the loop condition distilled into a testcase. llvm-svn: 18817
* If one side of and/or is known to be 0/-1, it doesn't matterChris Lattner2004-12-111-0/+37
| | | | | | | | if the other side is overdefined. This allows us to fold conditions like: if (X < Y || Y > Z) in some cases. llvm-svn: 18807
* Only cound if we actually made a change.Chris Lattner2004-12-111-3/+6
| | | | llvm-svn: 18800
* The split bb is really the exit of the old functionChris Lattner2004-12-111-2/+2
| | | | llvm-svn: 18799
* Two bug fixes:Chris Lattner2004-12-111-17/+27
| | | | | | | | | | | | | | | | | 1. Actually increment the Statistic for the GV elim optzn 2. When resolving undef branches, only resolve branches in executable blocks, avoiding marking a bunch of completely dead blocks live. This has a big impact on the quality of the generated code. With this patch, we positively rip up vortex, compiling Ut_MoveBytes to a single memcpy call. In vortex we get this: 12 ipsccp - Number of globals found to be constant 986 ipsccp - Number of arguments constant propagated 1378 ipsccp - Number of basic blocks unreachable 8919 ipsccp - Number of instructions removed llvm-svn: 18796
* Do not delete the entry block to a function.Chris Lattner2004-12-111-1/+5
| | | | llvm-svn: 18795
* Implement Transforms/SCCP/ipsccp-gvar.ll, by tracking values stored toChris Lattner2004-12-111-12/+85
| | | | | | non-address-taken global variables. llvm-svn: 18790
* Fix a bug where we could delete dead invoke instructions with uses.Chris Lattner2004-12-111-0/+26
| | | | | | | In functions where we fully constant prop the return value, replace all ret instructions with 'ret undef'. llvm-svn: 18786
* Implement SCCP/ipsccp-conditional.ll, by totally deleting dead blocks.Chris Lattner2004-12-101-2/+29
| | | | llvm-svn: 18781
* Fix SCCP/2004-12-10-UndefBranchBug.llChris Lattner2004-12-101-3/+51
| | | | llvm-svn: 18776
* Fix Regression/Transforms/SimplifyCFG/2004-12-10-SimplifyCFGCrash.ll,Chris Lattner2004-12-101-14/+13
| | | | | | and the failure on make_dparser last night. llvm-svn: 18766
* This is the initial implementation of IPSCCP, as requested by Brian.Chris Lattner2004-12-101-63/+273
| | | | | | | | | This implements SCCP/ipsccp-basic.ll, rips apart Olden/mst (as described in PR415), and does other nice things. There is still more to come with this, but it's a start. llvm-svn: 18752
* note to self: Do not check in debugging code!Chris Lattner2004-12-091-1/+0
| | | | llvm-svn: 18693
* Implement trivial sinking for load instructions. This causes us to sink 567 ↵Chris Lattner2004-12-091-1/+11
| | | | | | loads in spec llvm-svn: 18692
* Do extremely simple sinking of instructions when they are only used in aChris Lattner2004-12-081-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | successor block. This turns cases like this: x = a op b if (c) { use x } into: if (c) { x = a op b use x } This triggers 3965 times in spec, and is tested by Regression/Transforms/InstCombine/sink_instruction.ll This appears to expose a bug in the X86 backend for 177.mesa, which I'm looking in to. llvm-svn: 18677
* Fix this regression and remove the XFAIL from this test.Alkis Evlogimenos2004-12-081-3/+5
| | | | llvm-svn: 18674
* Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.llChris Lattner2004-12-081-1/+2
| | | | llvm-svn: 18670
* Add support for compilers without argument dependent name lookup, contributedChris Lattner2004-12-081-1/+1
| | | | | | by Bjørn Wennberg llvm-svn: 18627
* Remove unneeded class qualifier, contributed by Bjørn WennbergChris Lattner2004-12-081-1/+1
| | | | llvm-svn: 18625
* For PR387:\Reid Spencer2004-12-071-0/+3
| | | | | | Add doInitialization method to avoid overloaded virtuals llvm-svn: 18602
OpenPOWER on IntegriCloud