[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sparse
Subject: Re: [PATCH v2 05/13] expression: examine constness of conditionals at evaluation only
From: Luc Van Oostenryck <luc.vanoostenryck () gmail ! com>
Date: 2016-01-26 1:16:30
Message-ID: 20160126011629.GC46188 () macpro ! local
[Download RAW message or body]
On Mon, Jan 25, 2016 at 03:55:09PM +0100, Nicolai Stange wrote:
> Currently, the propagation of expressions' constness flags through
> conditional expressions is done in two steps:
> - Several flags are speculatively set at expression parsing time
> - and possibly cleared again at evaluation time.
>
> Set aside this unfortunate split of code, the early propagation of
> constness flags is not able to recognize constant expressions such as
> 0 ? __builtin_choose_expr(0, 0, 0) : 0
> 0 ? 0 : __builtin_choose_expr(0, 0, 0)
> since the final expression to be thrown into the conditional
> expression is known only after evaluation.
>
> Move the whole calculation of conditional expressions' constness flags
> to the evaluation phase.
>
> Introduce support for tracking arithmetic constness propagation through
> conditional expressions.
Same comments about the description as for the previous patches.
Good otherwise.
Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic