Andreas Zwinkau [Wed, 18 May 2011 12:41:45 +0000 (14:41 +0200)]
fix opt/jumpthreading7
Andreas Zwinkau [Tue, 17 May 2011 11:25:41 +0000 (13:25 +0200)]
code placement fixes gcse
GCSEing nodes into unreachable blocks is ok now. The
verifier does not check the cfg, when irg is floating.
Code placement fixes and pins the irg after gcse.
Nodes in unreachable blocks are moved into the first block
after the start block.
Reachability checks in place_late are converted into asserts,
because after place_early, there are no unreachable blocks anymore.
reverts
c64fe29 and
318579c
but also fixes opt/unreachable_block
Andreas Zwinkau [Mon, 16 May 2011 12:39:16 +0000 (14:39 +0200)]
Code reuse
Andreas Zwinkau [Mon, 16 May 2011 11:56:08 +0000 (13:56 +0200)]
Do not gcse unreachable code
During global CSE we now ignore nodes in unreachable blocks,
otherwise cse could pick the wrong representative node
and use unreachable nodes in reachable code.
Andreas Zwinkau [Fri, 13 May 2011 16:30:11 +0000 (18:30 +0200)]
Delay exchange until all nodes are created
add_block_cf_input breaks, if the block has two Bad inputs
Andreas Zwinkau [Fri, 13 May 2011 11:14:20 +0000 (13:14 +0200)]
ldstop must deactivate edges after changes
Skipping Loads might lead to dead code, which is still reference by
out edges.
Michael Beck [Tue, 10 May 2011 19:43:44 +0000 (21:43 +0200)]
Removed C99 features, adopt to Firm style.
Michael Beck [Tue, 10 May 2011 19:34:22 +0000 (21:34 +0200)]
Remove kept Bad AFTER dead blocks are deleted to ensure no Bad ist kept.
Michael Beck [Tue, 10 May 2011 19:18:32 +0000 (21:18 +0200)]
Moved some helper functions from irgopt to irtools for reuse.
Christoph Mallon [Tue, 10 May 2011 06:27:49 +0000 (08:27 +0200)]
Remove unused variables, squelch warning about unused parameter.
Christoph Mallon [Tue, 10 May 2011 06:27:11 +0000 (08:27 +0200)]
Use simple assignment instead of memcpy() when possible.
Matthias Braun [Fri, 6 May 2011 19:12:54 +0000 (21:12 +0200)]
simplify unreachable code elimination:
only set block/phi inputs to bad to kill unreachable code, all other
code will be dead and removed anyway
Matthias Braun [Fri, 6 May 2011 18:46:12 +0000 (20:46 +0200)]
fix iredges EDGE_KIND_BLOCK not updating correctly when exchanging blocks
Matthias Braun [Fri, 6 May 2011 18:45:10 +0000 (20:45 +0200)]
fix cfg_dumper omitting bads
Matthias Braun [Fri, 6 May 2011 18:12:52 +0000 (20:12 +0200)]
iredges: remove unnecessary skip_Proj
Matthias Braun [Fri, 6 May 2011 12:46:40 +0000 (14:46 +0200)]
irdom: do not count bad predecessors as control flow
Andreas Zwinkau [Mon, 9 May 2011 09:12:15 +0000 (11:12 +0200)]
Remove obsolete loopinfo invalidation
Andreas Zwinkau [Mon, 9 May 2011 09:04:37 +0000 (11:04 +0200)]
Implicit set_irg_loopinfo_inconsistent
Andreas Zwinkau [Mon, 9 May 2011 08:52:41 +0000 (10:52 +0200)]
Remove obsolete outs invalidation
Andreas Zwinkau [Mon, 9 May 2011 08:50:45 +0000 (10:50 +0200)]
Implicit set_irg_outs_inconsistent
when calling exchange, set_irn_n, or set_irn_in.
fixes backend/inconsistent_outs test case
Christoph Mallon [Fri, 6 May 2011 17:24:25 +0000 (19:24 +0200)]
Remove extra dash from assert graph filenames.
Andreas Zwinkau [Fri, 6 May 2011 16:43:38 +0000 (18:43 +0200)]
Reenable asserts
They were commented out in commit
c4686a6b
Andreas Zwinkau [Fri, 6 May 2011 11:38:54 +0000 (13:38 +0200)]
Use mode from type instead of return value
Also bugfix: The second case used uninitialized memory for the Bad's mode.
Andreas Zwinkau [Fri, 6 May 2011 09:13:34 +0000 (11:13 +0200)]
Fix ack/t7
Some Bads were not maintained in cfopt
Andreas Zwinkau [Fri, 6 May 2011 08:52:33 +0000 (10:52 +0200)]
remove Bads makes outs inconsistent
Andreas Zwinkau [Fri, 6 May 2011 08:33:46 +0000 (10:33 +0200)]
Adapt cfopt to Bads with modes
Andreas Zwinkau [Thu, 5 May 2011 17:10:50 +0000 (19:10 +0200)]
Revert "fix opt/loop_without_phi"
This reverts commit
bcaf3e7900158f4fd3c64dda9ff2d11d652ec474,
because the removed assert now holds again.
Andreas Zwinkau [Thu, 5 May 2011 14:48:24 +0000 (16:48 +0200)]
beabi requires out edges
Andreas Zwinkau [Thu, 5 May 2011 14:00:04 +0000 (16:00 +0200)]
optimize_graph_df removes all Bads now
Andreas Zwinkau [Thu, 5 May 2011 11:54:35 +0000 (13:54 +0200)]
cfopt maintains Bads now
Matthias Braun [Fri, 6 May 2011 07:39:43 +0000 (09:39 +0200)]
fix compilation in non-debug mode, remove unused #define
Matthias Braun [Thu, 5 May 2011 14:10:01 +0000 (16:10 +0200)]
opt_inline: fix uninitialized memory usage
Matthias Braun [Thu, 5 May 2011 13:31:58 +0000 (15:31 +0200)]
verify that all blocks can be found by walk_block_graph
This also ensures the invariant that at least 1 block in an endless
loop is kept.
Matthias Braun [Thu, 5 May 2011 13:30:56 +0000 (15:30 +0200)]
ircfscc: remove is_outermost_StartBlock check - it was broken and apparently unnecessary
Matthias Braun [Thu, 5 May 2011 11:24:02 +0000 (13:24 +0200)]
little cleanup, avoid unnecessary optimize_graph_df
Matthias Braun [Wed, 4 May 2011 11:48:18 +0000 (13:48 +0200)]
give Bad nodes a mode
Matthias Braun [Thu, 5 May 2011 11:22:48 +0000 (13:22 +0200)]
mark outs as inconsistent when end node is changed
Matthias Braun [Thu, 5 May 2011 09:31:58 +0000 (11:31 +0200)]
optimize_graph_df: iterate marking of unreachable blocks to guarantee that all unreachable code is killed
Christoph Mallon [Thu, 5 May 2011 16:47:40 +0000 (18:47 +0200)]
Prevent endless recursion in if-conv in endless loops.
Sebastian Buchwald [Thu, 5 May 2011 14:32:41 +0000 (16:32 +0200)]
A function that (indirectly) calls itself is not const/pure.
This fixes opt/fehler186.c and ack/test2.c.
Christoph Mallon [Thu, 5 May 2011 14:55:23 +0000 (16:55 +0200)]
Fix embarrassing typo in fp-vrp.
Christoph Mallon [Thu, 5 May 2011 14:20:37 +0000 (16:20 +0200)]
Use the bound of ==-Confirms in fixpoint vrp.
Christoph Mallon [Thu, 5 May 2011 11:58:36 +0000 (13:58 +0200)]
Remove pointless local variables.
Andreas Zwinkau [Thu, 5 May 2011 09:26:07 +0000 (11:26 +0200)]
fix opt/loop_without_phi
Memory loops without Phis can occur in unreachable code.
Make ldstopt handle this by ignorance.
Andreas Zwinkau [Thu, 5 May 2011 08:15:19 +0000 (10:15 +0200)]
fix opt/gcse_no_end
jump threading must also copy Keep edges to keep End reachable.
Matthias Braun [Wed, 4 May 2011 23:40:23 +0000 (01:40 +0200)]
cfopt: fix countless bugs introduced when changing unreachable code elimination
Matthias Braun [Wed, 4 May 2011 21:16:38 +0000 (23:16 +0200)]
fix cfopt not marking all possible blocks as removable after the latest changes
Matthias Braun [Wed, 4 May 2011 14:42:33 +0000 (16:42 +0200)]
fix unreachable code elimination failing for blocks with only 1 input
Christoph Mallon [Wed, 4 May 2011 13:58:59 +0000 (15:58 +0200)]
Consider that unreachble blocks might have no bitinfo.
Christoph Mallon [Wed, 4 May 2011 13:38:40 +0000 (15:38 +0200)]
Assert monotonicity in set_bitinfo().
Christoph Mallon [Wed, 4 May 2011 13:26:18 +0000 (15:26 +0200)]
Ensure that the result of a node is undefined if any of its operands is undefined (except for phis) or if its block is unreachble.
Christoph Mallon [Wed, 4 May 2011 12:54:28 +0000 (14:54 +0200)]
Consider that unreachble blocks might have no bitinfo.
Christoph Mallon [Wed, 4 May 2011 12:35:00 +0000 (14:35 +0200)]
Correctly handle the case that unreachble blocks are not necessarily replaced before the nodes they contain.
Christoph Mallon [Wed, 4 May 2011 10:42:05 +0000 (12:42 +0200)]
Model (un)reachable block info with bottom/top, not false/true.
Christoph Mallon [Tue, 3 May 2011 17:38:43 +0000 (19:38 +0200)]
Initially mark the end block as reachable and set the bad node to bottom (i.e. undefined).
Christoph Mallon [Tue, 3 May 2011 11:50:42 +0000 (13:50 +0200)]
Fetch traval false/true once in transfer() for better readability.
Matthias Braun [Wed, 4 May 2011 08:54:13 +0000 (10:54 +0200)]
always compute doms in optimize_graph_df instead of hoping for them to be available
Michael Beck [Tue, 3 May 2011 14:25:52 +0000 (16:25 +0200)]
Amend combo fix.
One more condition is needed to ensure monotony.
Michael Beck [Tue, 3 May 2011 09:52:11 +0000 (11:52 +0200)]
Fixed combo by fixing an old artefact from the older libFirm Cmp nodes.
In older libFirm version, Cmp computes top, true or bottom.
Now Cmp computes true or false, so the monotony fix must be upgraded.
This fixes opt/combo_paper.c
Michael Beck [Tue, 3 May 2011 09:49:41 +0000 (11:49 +0200)]
BugFix: mode_b lowering might create new control flow (if ir_create_cond_set() is used), so invalidate analysis data.
Michael Beck [Tue, 3 May 2011 09:48:58 +0000 (11:48 +0200)]
BugFix: Always invalidate loop-info if data flow was changed.
Matthias Braun [Mon, 2 May 2011 12:04:43 +0000 (14:04 +0200)]
fix lower_mode_b: phi inputs may be bad
Matthias Braun [Mon, 2 May 2011 09:06:33 +0000 (11:06 +0200)]
also do unreachable code elimination during gcse
Matthias Braun [Fri, 29 Apr 2011 17:15:55 +0000 (19:15 +0200)]
improve robustness of CFG verifier for strange cases with Tuples
Matthias Braun [Fri, 29 Apr 2011 16:34:28 +0000 (18:34 +0200)]
enqueue users of Bad as well in optimize_graph_df
Matthias Braun [Fri, 29 Apr 2011 16:18:55 +0000 (18:18 +0200)]
only calculate dominance if CFG verification was fine to avoid crashs/endless loops
Matthias Braun [Fri, 29 Apr 2011 15:52:14 +0000 (17:52 +0200)]
cleanup/partly rewrite code_placement algo
Michael Beck [Sat, 30 Apr 2011 23:21:37 +0000 (01:21 +0200)]
Further push size_t.
Michael Beck [Sat, 30 Apr 2011 23:11:49 +0000 (01:11 +0200)]
C99 feature removed.
Christoph Mallon [Fri, 29 Apr 2011 11:50:24 +0000 (13:50 +0200)]
Add simple transfer function for Confirm in fp-vrp.
Matthias Braun [Fri, 29 Apr 2011 11:11:58 +0000 (13:11 +0200)]
do not kill unreachable code in gcse
Christoph Mallon [Fri, 29 Apr 2011 10:52:53 +0000 (12:52 +0200)]
Improve and correct fp-vrp transformation.
- Set modified flag when unreachble nodes are removed.
- Remove trivially unreachble blocks, which have no bitinfo.
- Consider that unreachble blockes are replaced by Bad before the nodes they contain.
Christoph Mallon [Thu, 28 Apr 2011 12:56:27 +0000 (14:56 +0200)]
Clean up in ifconv a bit.
Matthias Braun [Thu, 28 Apr 2011 14:51:02 +0000 (16:51 +0200)]
add libfirmprof helper library
Matthias Braun [Thu, 28 Apr 2011 14:47:06 +0000 (16:47 +0200)]
improve firm profiler (based on patch by Steven Schäfer)
Matthias Braun [Thu, 28 Apr 2011 08:27:58 +0000 (10:27 +0200)]
dump postdom info in vcg graphs
Matthias Braun [Wed, 27 Apr 2011 16:50:50 +0000 (18:50 +0200)]
fix an intrinsic lower not reporting changes
Matthias Braun [Wed, 27 Apr 2011 16:19:56 +0000 (18:19 +0200)]
fix lower_copyB not invalidating irn_outs
Matthias Braun [Wed, 27 Apr 2011 14:49:16 +0000 (16:49 +0200)]
improve fp-vrp unreachable code handling
Matthias Braun [Thu, 21 Apr 2011 13:58:53 +0000 (15:58 +0200)]
Simplify handling of unreachable code
See http://www.libfirm.org/Unreachable_Code for details
Matthias Braun [Thu, 28 Apr 2011 08:47:51 +0000 (10:47 +0200)]
Verify that each Cond has a true/false/default Proj
Matthias Braun [Wed, 27 Apr 2011 11:47:30 +0000 (13:47 +0200)]
add cfg verifier ensuring 1 cfop per block and only 1 user for each mode_X node
Matthias Braun [Wed, 27 Apr 2011 11:46:56 +0000 (13:46 +0200)]
add unknown_jump opflag for the special case of a jump where we can't directly influence the destination and can't predict/change them
Matthias Braun [Wed, 27 Apr 2011 11:41:13 +0000 (13:41 +0200)]
remove obsolete #defines
Matthias Braun [Wed, 27 Apr 2011 11:34:45 +0000 (13:34 +0200)]
cleanup/reformat irop_t.h
Matthias Braun [Wed, 27 Apr 2011 11:22:31 +0000 (13:22 +0200)]
verify that the predecessor of a block is a cfop
Matthias Braun [Tue, 26 Apr 2011 17:24:37 +0000 (19:24 +0200)]
little cleanup in block walker code
Matthias Braun [Tue, 26 Apr 2011 17:24:07 +0000 (19:24 +0200)]
make verifier a bit less strict for out-edges to dead code
Matthias Braun [Tue, 26 Apr 2011 10:28:54 +0000 (12:28 +0200)]
fix warnings
Matthias Braun [Thu, 21 Apr 2011 09:30:00 +0000 (11:30 +0200)]
slight cleanup of ifconv code
Sebastian Buchwald [Thu, 28 Apr 2011 08:13:05 +0000 (10:13 +0200)]
Fixed size_t related warning.
Andreas Zwinkau [Tue, 26 Apr 2011 15:25:54 +0000 (17:25 +0200)]
Better fix for opt/ldst.c
This avoids a Load without ProjM, instead of handling this case.
Reverts the previous commit.
Andreas Zwinkau [Tue, 26 Apr 2011 12:04:00 +0000 (14:04 +0200)]
Fix opt/ldst.c
A Load might not have a ProjM
Michael Beck [Mon, 25 Apr 2011 21:00:28 +0000 (23:00 +0200)]
BugFix: fixed broken refactoring, associated link cannot be used for chains.
The associated link combinaes onbe lowered awith one unlowered type,
it cannot be used for chains of unlowered types.
Removes the get_type_[un]lowered() API and restores the
get_associated_type() API.
However, the whole concept of lowered types should be replaced by type
attributes ...
This fixes the asserts in stabs debug output.
Michael Beck [Mon, 25 Apr 2011 21:01:27 +0000 (23:01 +0200)]
Slightly improved type dumper.
Michael Beck [Sun, 24 Apr 2011 13:54:52 +0000 (15:54 +0200)]
Fixed some size_t related warnings.
Michael Beck [Sun, 24 Apr 2011 13:14:21 +0000 (15:14 +0200)]
Fixed the "naive and wrong regex stubs", so it has the right signature and returns the right value/error code now.
Michael Beck [Sun, 24 Apr 2011 12:53:34 +0000 (14:53 +0200)]
Switch irg index to type size_t, making the API more consistent.
Andreas Zwinkau [Thu, 21 Apr 2011 12:24:18 +0000 (14:24 +0200)]
Fix opt/jumpthreading4.c
Sebastian Buchwald [Wed, 20 Apr 2011 16:34:49 +0000 (18:34 +0200)]
The constructor initializes the array.