Matthias Braun [Thu, 15 Nov 2012 08:29:39 +0000 (09:29 +0100)]
bedwarf: query backend for pointer size
Also improve doku of machine_size element in backend_params struct.
Christoph Mallon [Wed, 14 Nov 2012 11:59:50 +0000 (12:59 +0100)]
x87: Only use fucompp if one operand happens to be at st(1).
Otherwise the extra effort to get the operands to the right position is not worth it.
Further, this avoids the unnecessary effort when we not going to use fucompp in favor of fucomi anyway.
Christoph Mallon [Wed, 14 Nov 2012 12:20:22 +0000 (13:20 +0100)]
x87: Enable x87_create_fpop() to remove entries other than just the tos.
Christoph Mallon [Wed, 14 Nov 2012 12:15:06 +0000 (13:15 +0100)]
x87: Remove the parameter num from x87_create_fpop().
Christoph Mallon [Wed, 14 Nov 2012 09:49:41 +0000 (10:49 +0100)]
x87: Improve sim_binop(): Only use fxch if both operands are not at tos.
Christoph Mallon [Wed, 14 Nov 2012 09:45:21 +0000 (10:45 +0100)]
x87: Simplify the case when both operands are dead in sim_binop().
Christoph Mallon [Wed, 14 Nov 2012 09:33:20 +0000 (10:33 +0100)]
x87: Fix harmless typo in sim_binop().
The last parameter of x87_create_fpush() is used for debugging only.
Christoph Mallon [Tue, 13 Nov 2012 09:01:42 +0000 (10:01 +0100)]
x87: Simplify x87 code generation.
Do not store up to three registers for an instruction.
Instead only store the explicit register operand and whether the operands are permuted and/or the result is to be placed in the explicit register operand or st0.
Christoph Mallon [Wed, 14 Nov 2012 11:30:22 +0000 (12:30 +0100)]
x87: Simplify sim_Fucom().
Whether the operands are permuted can be deduced by testing op1_idx != 0.
Christoph Mallon [Wed, 14 Nov 2012 12:05:13 +0000 (13:05 +0100)]
x87: Simplify selecting the instruction and popping the operands in sim_Fucom().
Christoph Mallon [Tue, 13 Nov 2012 09:28:36 +0000 (10:28 +0100)]
x87: Do not set x87 attributes, which are not used.
Christoph Mallon [Tue, 13 Nov 2012 09:12:55 +0000 (10:12 +0100)]
Let be_foreach_definition() declare the value variable.
Christoph Mallon [Tue, 13 Nov 2012 08:46:59 +0000 (09:46 +0100)]
Remove the very thin wrapper function arch_register_get_class().
Christoph Mallon [Tue, 13 Nov 2012 08:39:30 +0000 (09:39 +0100)]
Remove the very thin wrapper function arch_register_get_index().
Christoph Mallon [Tue, 13 Nov 2012 08:27:30 +0000 (09:27 +0100)]
Remove the very thin wrapper function arch_register_get_name().
Matthias Braun [Mon, 12 Nov 2012 16:16:54 +0000 (17:16 +0100)]
jumpthreading: when copying kept nodes keep the copies
Matthias Braun [Mon, 12 Nov 2012 16:17:28 +0000 (17:17 +0100)]
make jumpthreading debug message less confusing
Matthias Braun [Mon, 12 Nov 2012 13:44:43 +0000 (14:44 +0100)]
only create jmp/bad when replacing exception throwing loads
Matthias Braun [Mon, 12 Nov 2012 13:14:10 +0000 (14:14 +0100)]
Makefile: cleanup, add -fomit-frame-pointer to optimize
Matthias Braun [Sat, 10 Nov 2012 17:03:10 +0000 (18:03 +0100)]
add coverage build variant to Makefile
Christoph Mallon [Sun, 11 Nov 2012 10:44:24 +0000 (11:44 +0100)]
Merge the (single) pop and non-pop variants of x87 compare operations.
Let a flag and the emitter handle printing the pop variant.
Christoph Mallon [Sun, 11 Nov 2012 10:14:39 +0000 (11:14 +0100)]
Merge the pop and non-pop variants of x87 store operations.
Let a flag and the emitter handle printing the pop variant.
Christoph Mallon [Sun, 11 Nov 2012 09:47:21 +0000 (10:47 +0100)]
Merge the pop and non-pop variants of x87 binary operations.
Let a flag and the emitter handle printing the pop variant.
Christoph Mallon [Sun, 11 Nov 2012 09:07:05 +0000 (10:07 +0100)]
Merge the r and non-r variants of fdiv and fsub.
Let the emitter handle printing the r by checking the assigned registers.
Christoph Mallon [Sat, 10 Nov 2012 20:00:45 +0000 (21:00 +0100)]
Remove unnecessary tests.
out cannot be null.
Christoph Mallon [Sun, 11 Nov 2012 09:13:23 +0000 (10:13 +0100)]
Panic when asked to simulate a vfprem.
Simulating it as normal binop does only work in one special case.
It lacks the reverse form and selecting the second operand register.
So in many cases invalid code was generated silently.
Christoph Mallon [Sat, 10 Nov 2012 19:58:33 +0000 (20:58 +0100)]
Correct some off-by-one errors in ia32_emitf().
Christoph Mallon [Sun, 11 Nov 2012 22:17:00 +0000 (23:17 +0100)]
Implement binary emitter for ia32 bt.
Christoph Mallon [Sun, 11 Nov 2012 22:06:41 +0000 (23:06 +0100)]
Fake a binary emitter for ia32 asm.
Christoph Mallon [Sun, 11 Nov 2012 21:51:02 +0000 (22:51 +0100)]
Implement binary emitter for ia32 fisttp.
Christoph Mallon [Sun, 11 Nov 2012 21:47:12 +0000 (22:47 +0100)]
Implement binary emitter for ia32 popcnt.
Christoph Mallon [Sun, 11 Nov 2012 21:46:53 +0000 (22:46 +0100)]
Implement binary emitter for ia32 bswap.
Christoph Mallon [Sun, 11 Nov 2012 21:46:26 +0000 (22:46 +0100)]
Implement binary emitter for ia32 sbb0.
Christoph Mallon [Sun, 11 Nov 2012 21:45:14 +0000 (22:45 +0100)]
Implement binary emitter for ia32 ffreep.
Christoph Mallon [Sun, 11 Nov 2012 21:44:03 +0000 (22:44 +0100)]
Factorise code for binary emitters of ia32 fp operation with fp register.
Christoph Mallon [Sun, 11 Nov 2012 21:42:49 +0000 (22:42 +0100)]
Simply emit nothing for ia32 Unknown.
Christoph Mallon [Sun, 11 Nov 2012 21:41:58 +0000 (22:41 +0100)]
Implement binary emitters for ia32 bsf and bsr.
Christoph Mallon [Sun, 11 Nov 2012 21:34:58 +0000 (22:34 +0100)]
Factorise code of binary emitters for ia32 unops with 0F prefix.
Christoph Mallon [Sun, 11 Nov 2012 21:32:43 +0000 (22:32 +0100)]
Correct bemit_${OP}() and bemit_${OP}mem().
Christoph Mallon [Sat, 10 Nov 2012 15:43:27 +0000 (16:43 +0100)]
Use edges_reroute_except() instead of edges_reroute() + set_irn_n().
Christoph Mallon [Sat, 10 Nov 2012 14:48:06 +0000 (15:48 +0100)]
Claim that AMD family 12h, 14h and 15h are K10.
Christoph Mallon [Sat, 10 Nov 2012 14:26:17 +0000 (15:26 +0100)]
Fix calculation of x86 CPU family.
It is just the sum of family and extended family.
Matthias Braun [Fri, 9 Nov 2012 17:27:44 +0000 (18:27 +0100)]
convopt: also perform convopt for float nodes
Matthias Braun [Fri, 9 Nov 2012 17:27:28 +0000 (18:27 +0100)]
ia32: allow Minus, Phi in any float mode
Matthias Braun [Fri, 9 Nov 2012 16:40:44 +0000 (17:40 +0100)]
ia32: we can skip float downconvs before stores
Christoph Mallon [Thu, 8 Nov 2012 15:26:00 +0000 (16:26 +0100)]
Remove further keep-edge hacks for endless loops.
Christoph Mallon [Sat, 4 Aug 2012 07:30:15 +0000 (09:30 +0200)]
Remove the unused function get_irn_pred_pos().
Christoph Mallon [Thu, 8 Nov 2012 07:21:09 +0000 (08:21 +0100)]
Remove keep-edge hacks for endless loop.
It is the job of the frontend to keep loops.
These hacks here only worked for some, but not all cases.
In particular a more clever SSA-construction algorithm might not place redundant PhiMs, which would render memory before memory-less loops unkept.
Christoph Mallon [Wed, 7 Nov 2012 07:14:35 +0000 (08:14 +0100)]
Simplify code generator and generated code using C99.
Christoph Mallon [Wed, 7 Nov 2012 06:58:20 +0000 (07:58 +0100)]
Remove redundant assert().
get_irn_op_() checks the same.
Christoph Mallon [Wed, 7 Nov 2012 06:57:38 +0000 (07:57 +0100)]
Fix typos in comments.
Christoph Mallon [Mon, 5 Nov 2012 13:50:18 +0000 (14:50 +0100)]
Inline x87_set_tos() into its only caller.
Christoph Mallon [Sun, 4 Nov 2012 19:35:36 +0000 (20:35 +0100)]
Remove cruft from sim_Copy().
Christoph Mallon [Sun, 4 Nov 2012 14:37:16 +0000 (15:37 +0100)]
Remove redundant assert.
sched_add_after() checks this, too.
Christoph Mallon [Sat, 3 Nov 2012 19:01:38 +0000 (20:01 +0100)]
Remove the unused return value from x87_create_fxch().
Christoph Mallon [Sat, 3 Nov 2012 13:53:34 +0000 (14:53 +0100)]
Get rid of x87_push_dbl() by passing an usable register to x87_create_fpush().
Christoph Mallon [Sat, 3 Nov 2012 12:43:01 +0000 (13:43 +0100)]
Do not add a Proj to the schedule.
I wonder, how long this code was not executed.
Christoph Mallon [Sat, 3 Nov 2012 12:41:00 +0000 (13:41 +0100)]
Use edges_reroute_except() instead of edges_reroute() to avoid fiddling with the memory input of the inserted vfld.
Christoph Mallon [Sat, 3 Nov 2012 12:05:37 +0000 (13:05 +0100)]
Panic when get_irn_Proj_for_mode() does not find a Proj.
Christoph Mallon [Sat, 3 Nov 2012 11:57:53 +0000 (12:57 +0100)]
Remove unnecessary tests.
- The src irn of a edge cannot be null.
- A node cannot be after itself in the schedule, so the later test will fail.
Christoph Mallon [Sat, 3 Nov 2012 11:56:26 +0000 (12:56 +0100)]
Simplify collect_and_rewire_users(): Use get_edge_src_pos() instead of searching for the operand.
Christoph Mallon [Sat, 3 Nov 2012 11:22:18 +0000 (12:22 +0100)]
Replace x87_fxch_shuffle() + sched_add_before() by x87_create_fxch().
Christoph Mallon [Sat, 3 Nov 2012 11:21:07 +0000 (12:21 +0100)]
Simplify inserting the fxchs in x87_shuffle().
Always inserting before the cf node results in the same order as first inserting before the cf node and then inserting after the last inserted node.
Christoph Mallon [Sat, 3 Nov 2012 08:58:58 +0000 (09:58 +0100)]
Pass the value to be pushed to x87_create_fpush().
Before it was calculated from op_idx.
Christoph Mallon [Sat, 3 Nov 2012 08:49:47 +0000 (09:49 +0100)]
Cleanup and use C99.
Christoph Mallon [Sun, 4 Nov 2012 13:56:04 +0000 (14:56 +0100)]
Panic when get_call_result_proj() does not find the Proj.
Christoph Mallon [Sat, 3 Nov 2012 04:16:58 +0000 (05:16 +0100)]
Inline x87_alloc_state() into its only user.
Christoph Mallon [Fri, 2 Nov 2012 18:18:09 +0000 (19:18 +0100)]
Remove unnecessary indirection for the empty x87 state.
Christoph Mallon [Fri, 2 Nov 2012 17:51:28 +0000 (18:51 +0100)]
Remove tos from x87_state.
It is the same as N_ia32_st_REGS - depth.
Christoph Mallon [Fri, 2 Nov 2012 14:18:39 +0000 (15:18 +0100)]
Simplify x87_dump_stack().
Christoph Mallon [Fri, 2 Nov 2012 10:31:43 +0000 (11:31 +0100)]
Add the function x87_get_entry() to retrieve elements of the x87 stack.
Christoph Mallon [Thu, 1 Nov 2012 15:41:35 +0000 (16:41 +0100)]
Only copy the x87 state once per block.
Copy it before x87_kill_deads() instead of after it, so x87_kill_deads() does not need to conditionally copy it.
Christoph Mallon [Thu, 1 Nov 2012 15:34:54 +0000 (16:34 +0100)]
Simplify x87 sim_Return().
Just flush the fp stack, only check for the correct number of fp values in debug builds.
Christoph Mallon [Thu, 1 Nov 2012 15:31:44 +0000 (16:31 +0100)]
Remove stale and unused cruft from x87 simulator.
Christoph Mallon [Mon, 5 Nov 2012 17:04:56 +0000 (18:04 +0100)]
Panic when the x87 simulator encounters and asm node with x87 constraints.
Christoph Mallon [Sun, 4 Nov 2012 19:23:02 +0000 (20:23 +0100)]
Remove stale comments.
Christoph Mallon [Sun, 4 Nov 2012 15:47:25 +0000 (16:47 +0100)]
Remove the unused function be_set_Copy_op().
Christoph Mallon [Sun, 4 Nov 2012 16:01:17 +0000 (17:01 +0100)]
Use be_get_Copy_op().
Christoph Mallon [Sun, 4 Nov 2012 16:22:53 +0000 (17:22 +0100)]
Correct name: OP(OP(x)) = x is involution, not idempotence.
Christoph Mallon [Sat, 3 Nov 2012 07:46:23 +0000 (08:46 +0100)]
Add newline to avoid warning.
Christoph Mallon [Wed, 31 Oct 2012 13:29:33 +0000 (14:29 +0100)]
Simplify test when to stop in push_through_perm().
Christoph Mallon [Wed, 31 Oct 2012 10:24:37 +0000 (11:24 +0100)]
Fix a performance bug in push_through_perm().
Now more than one node can be pushed through a Perm.
After pushing the first node through a Perm, we next inspected the Perm itself (the new schedule predecessor of the moved node), which obviously cannot be pushed through itself.
Christoph Mallon [Tue, 30 Oct 2012 07:10:40 +0000 (08:10 +0100)]
Fix iterating all irgs in gc_irgs().
Do not leave out the last (highest numbered) irg.
Sebastian Buchwald [Mon, 29 Oct 2012 16:54:33 +0000 (17:54 +0100)]
Fixed warning: Made global variable static.
Matthias Braun [Mon, 29 Oct 2012 15:53:41 +0000 (16:53 +0100)]
fix bad input register requirements
some inputs had "no requirement" set instead of the correct one
Matthias Braun [Fri, 28 Sep 2012 08:42:24 +0000 (10:42 +0200)]
beverify: cleanup, use bool for ok/bad return value
Matthias Braun [Fri, 28 Sep 2012 08:36:04 +0000 (10:36 +0200)]
beverify: remove dominance check
irverify already checks the dominance property
Matthias Braun [Mon, 1 Oct 2012 16:38:52 +0000 (18:38 +0200)]
fix output constraints of ia32_IJmp
Matthias Braun [Sun, 30 Sep 2012 15:23:56 +0000 (17:23 +0200)]
fix some missing register constraints
Matthias Braun [Thu, 27 Sep 2012 17:11:49 +0000 (19:11 +0200)]
Set an input requirement for be_Spill, be_Reload frame input
(It was set to NULL in the past to support the STA-architecture, but
that backend is not maintained anymore)
Matthias Braun [Thu, 27 Sep 2012 17:10:46 +0000 (19:10 +0200)]
share common phi code, fix missing phi input reqs
Matthias Braun [Mon, 3 Sep 2012 14:50:34 +0000 (16:50 +0200)]
remove unnecessary options from beprefalloc
They were used to selectively disable parts of the algorithm for
measurements in the paper. We now know that we always want them switched
on so remove the switches to simplify the code.
Matthias Braun [Mon, 3 Sep 2012 14:10:46 +0000 (16:10 +0200)]
change arch_XXX_out functions to use unsigned for pos
Matthias Braun [Mon, 29 Oct 2012 12:52:04 +0000 (13:52 +0100)]
fix some memory leaks in beprefalloc
Matthias Braun [Mon, 29 Oct 2012 12:51:57 +0000 (13:51 +0100)]
deallocate all datastructures when freeing a graph
Matthias Braun [Mon, 29 Oct 2012 12:48:22 +0000 (13:48 +0100)]
make remove_irp_irg API private
Because otherwise we confuse users with free_ir_graph vs.
remove_irp_irg. Change it so that free_ir_graph also removes the graph
from the irp list.
Matthias Braun [Mon, 1 Oct 2012 14:58:49 +0000 (16:58 +0200)]
remove obsolete comment
Christoph Mallon [Sat, 27 Oct 2012 08:21:56 +0000 (10:21 +0200)]
Fix warnings.
Make function definitions prototype declarations.
Christian Helmer [Fri, 26 Oct 2012 11:07:13 +0000 (13:07 +0200)]
removed old divmod handling
Christian Helmer [Thu, 4 Oct 2012 13:28:11 +0000 (15:28 +0200)]
removed unimplemented extension