Goose  Diff

Differences From Artifact [4677647f45]:

  • File bs/llr/helpers.cpp — part of check-in [8a8e76084e] at 2019-03-02 21:01:51 on branch trunk — Function calls are now eagerly evaluated during parsing. (user: achavasse size: 403) [more...]

To Artifact [e7464b7a31]:

  • File bs/llr/helpers.cpp — part of check-in [59b1c58c70] at 2019-08-01 20:25:33 on branch trunk —
    • CFGs keep track of the number of temporaries that they use
    • Temporaries indices are updated when appending a CFG to another, to avoid collisions
    • Phi now stores its result into a new temporary, instead of returning it directly (Phi has to be at the beginning of a basic block so we can't attach it directly to a value)
    (user: achavasse size: 1033)

13
14
15
16
17
18
19
























20
    bool CanValueBeEagerlyEvaluated( const ir::Value& val )
    {
        if( val.isConstant() )
            return true;

        return val.llr()->canBeEagerlyEvaluated();
    }
























}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    bool CanValueBeEagerlyEvaluated( const ir::Value& val )
    {
        if( val.isConstant() )
            return true;

        return val.llr()->canBeEagerlyEvaluated();
    }

    void BumpTemporariesIndices( uint32_t offset, const ptr< BasicBlock >& pBB )
    {
        for( auto&& instr : *pBB )
            BumpTemporariesIndices( offset, instr );
    }

    void BumpTemporariesIndices( uint32_t offset, Instruction& instr )
    {
        visit( [&]( auto&& ins )
        {
            BumpTemporariesIndices( offset, ins );
        }, instr.content() );
    }

    void BumpTemporariesIndices( uint32_t offset, CreateTemporary& ct )
    {
        ct.bumpTemporayIndices( offset );
    }

    void BumpTemporariesIndices( uint32_t offset, Phi& p )
    {
        p.bumpTemporayIndices( offset );
    }
}