aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in commentsJosh Triplett2007-03-091-2/+2
| | | | Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Add instruction to pseudo user tracking.Christopher Li2007-01-161-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current way of tracking pseudo register user is by keeping a list of the address of the pseudo_t member. This address can be in part of the instruction member, the worse case is in the argument list of the call instruction. As the comment for address_taken() said, using the container to get instruction pointer is wrong. It use to work with instruction that relate to symbol address. But that is not true any more. Even worse, it is very hard to track the pseudo usage other than symbol address. The only reason symbol address used to works for call instruction is because call instruction did not directly use the symbol address. I bit the bullet and just add the instruction pointer to pair with the pseudo user pointer. So it will work with the case that the user instruction is call as well. Testing: I compare the linearize result with/without the patch on a few sparse source file it self. The linearize generate exactly the same result except the symbol address changes. Which is predictable different because the pseudo user structure allocate memory. Singed-Off-By: Christopher Li <sparse@chrisli.org>
* Typo fixesPavel Roskin2006-11-061-1/+1
| | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Josh Triplett <josh@freedesktop.org>
* Add warning for accessing outside of a symbolLinus Torvalds2005-04-071-0/+3
| | | | | | | | This shows that we have some inlining bug where we seem to be corrupting the offsetting of an array. So right now the warnings we get in the kernel seem to be bogus, but this should help find that other bug too, and it doesn't trigger often enough to be too distracting.
* Fix "address_taken()" function to work at least pitifullyLinus Torvalds2005-04-071-2/+14
| | | | | | with the OP_SYMADDR simplifications. It's still wrong. Now it just happens to work in most cases.
* Split OP_SETVAL into OP_SETVAL (fp expressions and labels) and OP_SYMADDRLinus Torvalds2005-04-071-1/+1
| | | | | | | (symbol addresses). They are pretty different. Symbol addresses have special meaning during various phases, from symbol simplification to CSE.
* Much cleaner entrypoint dominance handling: instead of makingLinus Torvalds2005-04-071-7/+0
| | | | | | | | the entry bb magical, just make the OP_ENTRY instruction act like an OP_CALL from a dominance standpoint: it dominates all non-local memory operations. This removes yet another special case.
* Oops. The "entry instruction" changes missed the check for theLinus Torvalds2005-04-071-1/+1
| | | | | | | | entry basic block in memop dominators. This caused the dominator finding to totally misjudge a lot of non-local loads as having no dominators (or thinking they were being completely dominated by a store that just updated them).
* Associate pseudos with the symbol name whose value they got.Linus Torvalds2005-04-071-0/+1
| | | | | | | | | | This is purely for debugging. It's only used to show what symbol a pseudo might be (and I stress "might", since CSE can and does screw it up) associated with. Also print out the def list for a basic block when verbose. It all makes it a bit easier to guess what's up.
* Start using instruction sizes properly.Linus Torvalds2005-04-071-1/+1
| | | | | | | | | | We should drop symbol types by now, and base things on just raw sizes. Anything else just doesn't work from a CSE standpoint. Some things may care about actual types later, notably the type- based alias analysis. Those types still exist in the cast nodes. Also, make the printout be more readable.
* Fix test for entrypoint. Since we can rewrite branchesLinus Torvalds2005-04-071-1/+5
| | | | | to it, it's not correct to assume that a bb without parents is the entrypoint.
* Add "memop" simplification phase.Linus Torvalds2005-04-071-0/+195
It's a bit more simple-minded than the symbol simplification, and it can be more costly. So we start off with the (cheap) symbol simplification algorithm, and then use this new more generic phase later. This allows us to remove extra loads (and, in theory, stores, but the dead store elimination is so simple-minded right now that it's effectively useless).