Andreas Zwinkau [Fri, 27 May 2011 13:59:55 +0000 (15:59 +0200)]
cfopt must maintain Bad structure
Sebastian Buchwald [Fri, 27 May 2011 13:44:32 +0000 (15:44 +0200)]
Removed unused variable.
The get_n in the foreach loop is a macro and not a use of the function.
Matthias Braun [Fri, 27 May 2011 12:41:42 +0000 (14:41 +0200)]
merge start-block successor with start-block in backend (necessary after equivalent_node_Block is gone)
Matthias Braun [Fri, 27 May 2011 13:22:17 +0000 (15:22 +0200)]
fix activate_backedges failing for nodes with Deleted block in the identities table
Matthias Braun [Fri, 27 May 2011 11:54:58 +0000 (13:54 +0200)]
implement 'x-(x&y) => x & ~y' localopt
Matthias Braun [Fri, 27 May 2011 08:09:41 +0000 (10:09 +0200)]
implement/refactor x&~x, x|~x, x^~x and x+~x localopts
Christoph Mallon [Fri, 27 May 2011 13:25:03 +0000 (15:25 +0200)]
struct ir_settings_if_conv_t does not exist anymore.
Christoph Mallon [Fri, 27 May 2011 09:04:43 +0000 (11:04 +0200)]
Make the elements of binary_table[] const.
Sebastian Buchwald [Fri, 27 May 2011 11:31:47 +0000 (13:31 +0200)]
Adapted some issues noticed during removal of unused variables.
Sebastian Buchwald [Fri, 27 May 2011 11:29:10 +0000 (13:29 +0200)]
Fixed some warning about unused variables.
Sebastian Buchwald [Wed, 25 May 2011 12:28:13 +0000 (14:28 +0200)]
Fixed some typos.
Andreas Zwinkau [Fri, 27 May 2011 10:12:38 +0000 (12:12 +0200)]
fp-vrp transfer function ignore Bads
Since Bads have modes now the check for mode_X initialized the bitinfo,
which results in incorrect reachability information.
Andreas Zwinkau [Fri, 27 May 2011 08:38:33 +0000 (10:38 +0200)]
edges deactivate fix
Broken with csmith 2.0.0 seed
909842313
in libFirm
1953ce88fe94d589a9b47d2ab8969c21bfb55b3a
Matthias Braun [Sat, 7 May 2011 13:47:01 +0000 (15:47 +0200)]
Do not generate declaration for non-existing arch_get_n_regs()
Matthias Braun [Thu, 26 May 2011 16:37:00 +0000 (18:37 +0200)]
fix ShlD/ShrD not getting generated in some cases
Andreas Zwinkau [Thu, 26 May 2011 13:44:42 +0000 (15:44 +0200)]
Another Bad mode fix
Matthias Braun [Thu, 26 May 2011 11:08:59 +0000 (13:08 +0200)]
convopt: fix potential bug with modulo shifts, improve cost calculation for optimizable conv(shift) combinations
Matthias Braun [Thu, 26 May 2011 11:07:50 +0000 (13:07 +0200)]
add some localopts for shifting over the mode size
Matthias Braun [Wed, 25 May 2011 16:18:07 +0000 (18:18 +0200)]
reindent escape_ana.c in firm style
Andreas Zwinkau [Thu, 26 May 2011 10:49:15 +0000 (12:49 +0200)]
ifconv must remove bads first
Fixes C/unkept_loop.c
Andreas Zwinkau [Thu, 26 May 2011 10:38:52 +0000 (12:38 +0200)]
New API function: remove_bads
The functionality already existed,
but this is necessary at more than on place.
Andreas Zwinkau [Thu, 26 May 2011 08:03:43 +0000 (10:03 +0200)]
simplify merge_env struct
Andreas Zwinkau [Wed, 25 May 2011 08:36:39 +0000 (10:36 +0200)]
reuse is_switch_Cond function
Andreas Zwinkau [Tue, 24 May 2011 14:34:06 +0000 (16:34 +0200)]
Additional cfopt: Cond=>Jmp
Cond
/ \
projA projB => Jmp Bad
\ / \ /
block block
This optimization might produce more empty blocks to remove,
which in turn might enable more Cond=>Jmp opts.
So we need to perform this until nothing changes anymore.
Fixes x86code/cfopt.c
Breaks C/unkept_loop.c, because ifconv cannot handle Bads
Julian Oppermann [Wed, 25 May 2011 14:54:16 +0000 (16:54 +0200)]
Typo.
Andreas Zwinkau [Tue, 24 May 2011 12:32:35 +0000 (14:32 +0200)]
Remove nop optimization
This code does nothing, because the previous commit removed the
equivalent_node_Block function.
Andreas Zwinkau [Mon, 23 May 2011 14:29:39 +0000 (16:29 +0200)]
Remove equivalent_node_Block
Fixes opt/localopts2
Because of Phis blocks cannot be equivalent. The cfopt must do all
block merging.
For example, consider the case where block A has one predecessor
block B, which contains a Jmp. Naively, we might exchange(A,B).
However, A might contain a Phi with one operand, then the graph
is broken afterwards, since we move the Phi into B as well.
Andreas Zwinkau [Wed, 25 May 2011 08:42:16 +0000 (10:42 +0200)]
Remove goto
Andreas Zwinkau [Wed, 25 May 2011 13:20:11 +0000 (15:20 +0200)]
Fix cfopt Bad mode
Andreas Zwinkau [Wed, 25 May 2011 13:18:42 +0000 (15:18 +0200)]
get_Block_cfgpred_block must return mode_BB
Andreas Zwinkau [Wed, 25 May 2011 07:53:17 +0000 (09:53 +0200)]
Fix comment
Matthias Braun [Wed, 25 May 2011 13:31:54 +0000 (15:31 +0200)]
cleanup fragile op handling
- The pns of X_regular and X_except are annotated in the opcode now.
- The memory input is annotated in the opcode now
- only nodes with X_regular, X_except are marked fragile
Matthias Braun [Wed, 25 May 2011 12:37:22 +0000 (14:37 +0200)]
generate n_Node_XXX enums for node inputs
Matthias Braun [Wed, 25 May 2011 12:00:00 +0000 (14:00 +0200)]
Bad,Unknown are no cfopcdes
Matthias Braun [Wed, 25 May 2011 11:34:57 +0000 (13:34 +0200)]
fix warnings
Matthias Braun [Wed, 25 May 2011 10:54:31 +0000 (12:54 +0200)]
fix fehler189.c
Andreas Zwinkau [Mon, 23 May 2011 14:40:02 +0000 (16:40 +0200)]
typo
Matthias Braun [Wed, 11 May 2011 12:36:05 +0000 (14:36 +0200)]
sparc: implement 64bit lowering
Matthias Braun [Mon, 23 May 2011 09:01:10 +0000 (11:01 +0200)]
compiler library entities should be visibility_external
Matthias Braun [Mon, 16 May 2011 11:32:44 +0000 (13:32 +0200)]
lower_dw: Shift lowering without intrinsics
We can still use ia32 ShlD, ShrD functions by matching Or(Shl,Shr)
patterns in the ia32 transformer.
Matthias Braun [Wed, 11 May 2011 15:57:19 +0000 (17:57 +0200)]
lower_dw: huge refactoring, allow custom lowering funcs, fix endianess problems
Matthias Braun [Thu, 12 May 2011 12:18:37 +0000 (14:18 +0200)]
irg_walk_anchors uses visited field, reserve it
Matthias Braun [Mon, 16 May 2011 11:58:29 +0000 (13:58 +0200)]
include irnode_t.h, irgraph_t.h for better performance
Matthias Braun [Tue, 17 May 2011 17:06:39 +0000 (19:06 +0200)]
fix some set_ functions not being marked as FIRM_API
Matthias Braun [Wed, 18 May 2011 12:45:53 +0000 (14:45 +0200)]
fix shiftop optimization failing for negative shift values
Matthias Braun [Wed, 11 May 2011 12:19:16 +0000 (14:19 +0200)]
use irg from block instead of current_ir_graph in backend node constructors
Matthias Braun [Wed, 11 May 2011 12:13:51 +0000 (14:13 +0200)]
add support for backend nodes without attributes
Matthias Braun [Tue, 10 May 2011 17:09:58 +0000 (19:09 +0200)]
lower_dw: add support for Bad nodes
Matthias Braun [Wed, 11 May 2011 14:57:30 +0000 (16:57 +0200)]
sparc: Sub is mode neutral
Matthias Braun [Wed, 11 May 2011 13:52:38 +0000 (15:52 +0200)]
backend: ProjT/Start is an anchor and explicitely transformed
Andreas Zwinkau [Mon, 23 May 2011 11:02:27 +0000 (13:02 +0200)]
Unresolved should_be_same constraint => panic
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.