[PPL-devel] [GIT] ppl/ppl(floating_point): Removed unnecessary temporaries from affine_image.
Fabio Bossi
bossi at cs.unipr.it
Thu Sep 17 11:28:50 CEST 2009
Module: ppl/ppl
Branch: floating_point
Commit: 453985a4ec00db64b013edc7965bd193809da9fe
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=453985a4ec00db64b013edc7965bd193809da9fe
Author: Fabio Bossi <bossi at cs.unipr.it>
Date: Thu Sep 17 11:32:08 2009 +0200
Removed unnecessary temporaries from affine_image.
---
src/Octagonal_Shape.templates.hh | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh
index 67148c2..3eac070 100644
--- a/src/Octagonal_Shape.templates.hh
+++ b/src/Octagonal_Shape.templates.hh
@@ -5103,26 +5103,23 @@ Octagonal_Shape<T>::affine_image(Variable var,
PPL_DIRTY_TEMP(N, b_ub);
assign_r(b_ub, b.upper(), ROUND_NOT_NEEDED);
- PPL_DIRTY_TEMP(N, b_lb);
- assign_r(b_lb, b.lower(), ROUND_NOT_NEEDED);
PPL_DIRTY_TEMP(N, b_mlb);
- neg_assign_r(b_mlb, b_lb, ROUND_NOT_NEEDED);
+ neg_assign_r(b_mlb, b.lower(), ROUND_NOT_NEEDED);
if (t == 0) {
// Case 1: lf = [lb;ub];
forget_all_octagonal_constraints(var_id);
mul_2exp_assign_r(b_mlb, b_mlb, 1, ROUND_UP);
- PPL_DIRTY_TEMP(N, two_ub);
- mul_2exp_assign_r(two_ub, b_ub, 1, ROUND_UP);
+ mul_2exp_assign_r(b_ub, b_ub, 1, ROUND_UP);
// Add the constraint `var >= lb && var <= ub'.
- add_octagonal_constraint(n_var+1, n_var, two_ub);
+ add_octagonal_constraint(n_var+1, n_var, b_ub);
add_octagonal_constraint(n_var, n_var+1, b_mlb);
PPL_ASSERT(OK());
return;
}
// true if b = [0;0].
- bool is_b_zero = (b_lb == 0 && b_ub == 0);
+ bool is_b_zero = (b_mlb == 0 && b_ub == 0);
if (t == 1) {
// The one and only non-zero homogeneous coefficient in `lf'.
More information about the PPL-devel
mailing list