Hit a showstopper issue
Dibyendu Majumdar
mobile@majumdar.org.uk
Thu Jan 1 00:00:00 GMT 2015
On 15 June 2015 at 21:54, David Malcolm <dmalcolm@redhat.com> wrote:
> Yes: the IR exposed by the libgccjit API is not SSA-form. The optimizer
> does use SSA-form internally.
>
> I think my opinion at the time was that forcing users to create phi
> nodes was unnecessary work for them; let the API do it automatically,
> internally. I don't know if the loss of this kind of validation is a
> show-stopper; it feels to me more like a fussy API that the user has to
> do extra work to appease. But I could be wrong.
>
In LLVM I hardly ever specify phi-nodes - it constructs them during
optimization when it detects a scenario requiring a phi-node. I just
declare my locals and use them appropriately - but yes one can
explicitly code phi-nodes and to me (who is not so familiar with the
concept) this is painful.
>> In any case a warning about unreachable bocks may be more appropriate
>> than errors.
>
> FWIW I've experimented in the past with turning on warnings about
> uninitialized vars, so maybe we need an API setting for validations,
> with each validation having a tri-state:
> * perform validation, as error
> * perform validate, as warnings to stderr
> * don't validate
>
That makes sense.
Regards
More information about the Jit
mailing list