Goose  Diff

Differences From Artifact [0ef8091b5d]:

  • File bs/llr/gettemporary.h — part of check-in [70717f6b76] at 2019-11-18 22:09:56 on branch trunk — Refactor the logic and/or operator to directly append new basic blocks into the current CFG, rather than using a special llr instruction that embeds a nested CFG, whose implementation creates a lot of complexity everywhere. (user: achavasse size: 879)

To Artifact [6ee9900398]:

  • File bs/llr/gettemporary.h — part of check-in [238df77134] at 2019-11-19 00:04:49 on branch trunk — cfg: now that we got rid of this crazy system where CFGs could "call" other CFGs that weren't really functions, removed that clumsy cfg index that was needed to identify temporaries everywhere. (user: achavasse size: 737)

1
2
3
4
5
6
7
8
9
10
11
12
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
#ifndef GOOSE_LLR_GETTEMPORARY_H
#define GOOSE_LLR_GETTEMPORARY_H

namespace goose::llr
{
    class GetTemporary
    {
        public:
            template< typename T >
            GetTemporary( T&& type, uint32_t cfgId, uint32_t index ) :
                m_type( forward< T >( type ) ),
                m_cfgId( cfgId ),
                m_index( index )
            {}

            const auto& type() const { return m_type; }
            const auto& cfgId() const { return m_cfgId; }
            const auto& index() const { return m_index; }

            bool canBeExecuted() const
            {
                return true;
            }

            bool canBeEagerlyEvaluated() const
            {
                return false;
            }

        private:
            ir::Term m_type;
            uint32_t m_cfgId = 0;
            uint32_t m_index = 0;
    };
}

#endif









|

<




<














<





1
2
3
4
5
6
7
8
9
10
11

12
13
14
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29

30
31
32
33
34
#ifndef GOOSE_LLR_GETTEMPORARY_H
#define GOOSE_LLR_GETTEMPORARY_H

namespace goose::llr
{
    class GetTemporary
    {
        public:
            template< typename T >
            GetTemporary( T&& type, uint32_t index ) :
                m_type( forward< T >( type ) ),

                m_index( index )
            {}

            const auto& type() const { return m_type; }

            const auto& index() const { return m_index; }

            bool canBeExecuted() const
            {
                return true;
            }

            bool canBeEagerlyEvaluated() const
            {
                return false;
            }

        private:
            ir::Term m_type;

            uint32_t m_index = 0;
    };
}

#endif