summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Go back to the interpreter main loop after performing intrinsic lowering,Brian Gaeke2004-04-231-0/+1
| | | | | | | | because 1) the first instruction might not be a call site, and 2) CS and SF.Caller were not getting set to point to the new call site anyway (resulting in a crash on e.g. call %llvm.memset). llvm-svn: 13122
* Use emitWordAt() to emit forward-branch fixups.Brian Gaeke2004-04-231-1/+1
| | | | llvm-svn: 13120
* Emit SPARC machine code a word at a time instead of a byte at a time.Brian Gaeke2004-04-231-1/+5
| | | | | | Use emitWordAt() to emit forward-branch fixups. llvm-svn: 13119
* Implement emitWordAt() for the JIT emitter.Brian Gaeke2004-04-231-0/+5
| | | | llvm-svn: 13118
* Implement emitWordAt() for the debug emitter and the file printer emitter. (IBrian Gaeke2004-04-231-0/+7
| | | | | | | am not so sure about the file printer emitter, but the debug emitter change should be harmless.) llvm-svn: 13117
* Clarify the logic: the flag is renamed to `deleteFn' to signify it will deleteMisha Brukman2004-04-221-11/+11
| | | | | | the function instead of isolating it. This also means the condition is reversed. llvm-svn: 13112
* Add a flag to choose between isolating a function or deleting the function fromMisha Brukman2004-04-221-6/+29
| | | | | | | the Module. The default behavior keeps functionality as before: the chosen function is the one that remains. llvm-svn: 13111
* Disable a previous patch that was causing indvars to loop infinitely :(Chris Lattner2004-04-221-0/+2
| | | | llvm-svn: 13108
* Fix an extremely serious thinko I made in revision 1.60 of this file.Chris Lattner2004-04-221-16/+25
| | | | llvm-svn: 13106
* Implement a todo, rewriting all possible scev expressions inside of theChris Lattner2004-04-211-8/+18
| | | | | | | | loop. This eliminates the extra add from the previous case, but it's not clear that this will be a performance win overall. Tommorows test results will tell. :) llvm-svn: 13103
* This code really wants to iterate over the OPERANDS of an instruction, notChris Lattner2004-04-211-3/+2
| | | | | | | | over its USES. If it's dead it doesn't have any uses! :) Thanks to the fabulous and mysterious Bill Wendling for pointing this out. :) llvm-svn: 13102
* Implement a fixme. The helps loops that have induction variables of differentChris Lattner2004-04-211-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | types in them. Instead of creating an induction variable for all types, it creates a single induction variable and casts to the other sizes. This generates this code: no_exit: ; preds = %entry, %no_exit %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=4] *** %j.0.0 = cast uint %indvar to short ; <short> [#uses=1] %indvar = cast uint %indvar to int ; <int> [#uses=1] %tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1] store short %j.0.0, short* %tmp.7 %inc.0 = add int %indvar, 1 ; <int> [#uses=2] %tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1] %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1] br bool %tmp.2, label %no_exit, label %loopexit instead of: no_exit: ; preds = %entry, %no_exit %indvar = phi ushort [ %indvar.next, %no_exit ], [ 0, %entry ] ; <ushort> [#uses=2] *** %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3] %indvar = cast uint %indvar to int ; <int> [#uses=1] %indvar = cast ushort %indvar to short ; <short> [#uses=1] %tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1] store short %indvar, short* %tmp.7 %inc.0 = add int %indvar, 1 ; <int> [#uses=2] %tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1] %indvar.next = add uint %indvar, 1 *** %indvar.next = add ushort %indvar, 1 br bool %tmp.2, label %no_exit, label %loopexit This is an improvement in register pressure, but probably doesn't happen that often. The more important fix will be to get rid of the redundant add. llvm-svn: 13101
* Fix an incredibly nasty iterator invalidation problem. I am too spoiled by ↵Chris Lattner2004-04-211-18/+38
| | | | | | | | | ilists :) Eventually it would be nice if CallGraph maintained an ilist of CallGraphNode's instead of a vector of pointers to them, but today is not that day. llvm-svn: 13100
* I'm allergic to the word `stuff'.Misha Brukman2004-04-211-1/+1
| | | | llvm-svn: 13096
* Make SparcV9RegInfo::getRegType() return the right answer for registersBrian Gaeke2004-04-211-5/+6
| | | | | | | | | of IntCC, FloatCC, and Special types. Make SparcV9RegInfo::getRegClassIDOfRegType() return the right answer if you ask for the class corresponding to SpecialRegType. llvm-svn: 13095
* Include cerrno (gcc-3.4 fix)Alkis Evlogimenos2004-04-211-0/+1
| | | | llvm-svn: 13091
* Fix typeoChris Lattner2004-04-211-1/+1
| | | | llvm-svn: 13089
* REALLY fix PR324: don't delete linkonce functions until after the SCC traversalChris Lattner2004-04-202-7/+33
| | | | | | is done, which avoids invalidating iterators in the SCC traversal routines llvm-svn: 13088
* Pass the callgraph not the moduleChris Lattner2004-04-201-2/+2
| | | | llvm-svn: 13087
* Add the ability for SCC passes to initialize and finalize themselvesChris Lattner2004-04-201-6/+3
| | | | llvm-svn: 13084
* Fix PR325Chris Lattner2004-04-201-1/+1
| | | | llvm-svn: 13081
* Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llxChris Lattner2004-04-201-3/+7
| | | | llvm-svn: 13080
* Make it legal to ask for the type of a specialregBrian Gaeke2004-04-201-0/+2
| | | | llvm-svn: 13078
* Add support for the select instructionChris Lattner2004-04-202-2/+24
| | | | llvm-svn: 13076
* Make it legal to request a load or store of %fsr.Brian Gaeke2004-04-191-0/+2
| | | | llvm-svn: 13073
* Regularize include guards and remove some excess whitespace.Brian Gaeke2004-04-191-4/+2
| | | | llvm-svn: 13071
* Tighten up SparcV9FloatCCRegClass::getRegName()'s assertion - if you ask it forBrian Gaeke2004-04-191-2/+1
| | | | | | | the name of %fsr (as the comment in SparcV9RegClassInfo.h used to suggest) you would walk off the end of the FloatCCRegName array. llvm-svn: 13070
* Regularize include guards, remove some excess whitespace and fix some comments.Brian Gaeke2004-04-191-14/+11
| | | | | | Remove the extra %fsr register from SparcV9FloatCCRegClass. llvm-svn: 13069
* Initial checkin of a simple loop unswitching pass. It still needs work,Chris Lattner2004-04-191-0/+357
| | | | | | but it's a start, and seems to do it's basic job. llvm-svn: 13068
* It's not just a printer, it's actually an analysis tooChris Lattner2004-04-191-1/+1
| | | | llvm-svn: 13064
* Remove code to update loop depthsChris Lattner2004-04-191-10/+1
| | | | llvm-svn: 13058
* Add #includeChris Lattner2004-04-191-0/+1
| | | | llvm-svn: 13057
* Move isLoopInvariant to the Loop classChris Lattner2004-04-181-10/+2
| | | | llvm-svn: 13051
* Add new methodChris Lattner2004-04-181-0/+8
| | | | llvm-svn: 13050
* Correct rewriting of exit blocks after my last patchChris Lattner2004-04-181-3/+8
| | | | llvm-svn: 13048
* Fix computation of exit blocksChris Lattner2004-04-181-2/+2
| | | | llvm-svn: 13047
* Loop exit sets are no longer explicitly held, they are dynamically computed ↵Chris Lattner2004-04-181-3/+6
| | | | | | on demand. llvm-svn: 13046
* Change the ExitBlocks list from being explicitly contained in the LoopChris Lattner2004-04-186-153/+37
| | | | | | | structure to being dynamically computed on demand. This makes updating loop information MUCH easier. llvm-svn: 13045
* Reduce the unrolling limitChris Lattner2004-04-181-1/+1
| | | | llvm-svn: 13040
* If the preheader of the loop was the entry block of the function, make sureChris Lattner2004-04-181-2/+7
| | | | | | | | that the exit block of the loop becomes the new entry block of the function. This was causing a verifier assertion on 252.eon. llvm-svn: 13039
* Be much more careful about how we update instructions outside of the loopChris Lattner2004-04-181-9/+15
| | | | | | | using instructions inside of the loop. This should fix the MishaTest failure from last night. llvm-svn: 13038
* Implement methodChris Lattner2004-04-181-0/+12
| | | | llvm-svn: 13036
* After unrolling our single basic block loop, fold it into the preheader and exitChris Lattner2004-04-181-2/+43
| | | | | | | | | | | | | block. The primary motivation for doing this is that we can now unroll nested loops. This makes a pretty big difference in some cases. For example, in 183.equake, we are now beating the native compiler with the CBE, and we are a lot closer with LLC. I'm now going to play around a bit with the unroll factor and see what effect it really has. llvm-svn: 13034
* Fix a bug: this does not preserve the CFG!Chris Lattner2004-04-181-4/+20
| | | | | | While we're at it, add support for updating loop information correctly. llvm-svn: 13033
* Add a new method, add a check missing that caused a segfault if a loop didn'tChris Lattner2004-04-181-0/+14
| | | | | | have a canonical indvar llvm-svn: 13032
* Initial checkin of a simple loop unroller. This pass is extremely basic andChris Lattner2004-04-181-0/+247
| | | | | | | | limited. Even in it's extremely simple state (it can only *fully* unroll single basic block loops that execute a constant number of times), it already helps improve performance a LOT on some benchmarks, particularly with the native code generators. llvm-svn: 13028
* Make the tail duplication threshold accessible from the command line instead ↵Chris Lattner2004-04-181-1/+5
| | | | | | of hardcoded llvm-svn: 13025
* Fix a memory leak. We leaked the vector holding the entries in switch tables.Chris Lattner2004-04-171-0/+1
| | | | llvm-svn: 13023
* Add the ability to compute exit values for complex loop using unanalyzableChris Lattner2004-04-171-52/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | operations. This allows us to compile this testcase: int main() { int h = 1; do h = 3 * h + 1; while (h <= 256); printf("%d\n", h); return 0; } into this: int %main() { entry: call void %__main( ) %tmp.6 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %.str_1, long 0, long 0), int 364 ) ; <int> [#uses=0] ret int 0 } This testcase was taken directly from 256.bzip2, believe it or not. This code is not as general as I would like. Next up is to refactor it a bit to handle more cases. llvm-svn: 13019
* If the loop executes a constant number of times, try a bit harder to replaceChris Lattner2004-04-171-2/+5
| | | | | | exit values. llvm-svn: 13018
OpenPOWER on IntegriCloud