| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
To be meaningful, the IR instructions and their relationships
must obey some constraints. This patch add the framework for
doing this kind of validation.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
The main inner & outer optimization loop must not only
rerun if some CSE changes occured but must do so if any
change occur.
Insure this by testing any of the REPEAT_... flags as loop condition.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Now that unreachable BBs are removed after BB packing it's
not needed to try to removed them again after the main loop.
Remove the unneeded call to kill_unreachable_bbs() after the
main optimization loop.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Normal instruction simplification & CSE must not be done
on dead block (otherwise it's possible to have unsound
situations like having an instruction defining its own
operand with possible infinite loops as consequence).
This is insured by the main optimization loop but not after
BB packing or flow simplification.
Fix this by calling kill_unreachabe_bbs() after BB packing
and flow simplification.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Moving the inner optimization loop into the main one
help to see the real structure of the optimization logic
and facilitate experiments there and any needed changes.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
The code for the inner optimization loop was in the same file
than the one for CSE. Now that the CSE have a well defined
interface, we can move this inner loop together with
the main optimization loop in optimize.c
This move make the code better structured and make it easier
to understand the optimization logic and make any experiment
or needed changes to it.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Currently, the interface for liveness analysis is declared
in the flow.h header file. There is no a real need to move
it to its own file but it's the dual of the previous patch
and help a bit to make the code structure clearer.
Move the prototype for liveness analysis to its own header.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Once linearized, a few essentials optimizations are done
but the logic of the succession of these optimizations
is open-coded at the end of linearize_fn().
Obviously, this logic have nothing to do with the
linearization and moving it to a separate file will help
to clarify this logic and change it when needed.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|