mirror of https://github.com/exaloop/codon.git
parent
0a08303870
commit
0bec6e2627
230
CMakeLists.txt
230
CMakeLists.txt
|
@ -161,61 +161,61 @@ set(CODON_HPPFILES
|
|||
codon/parser/visitors/typecheck/typecheck.h
|
||||
codon/parser/visitors/typecheck/ctx.h
|
||||
codon/parser/visitors/visitor.h
|
||||
codon/sir/analyze/analysis.h
|
||||
codon/sir/analyze/dataflow/capture.h
|
||||
codon/sir/analyze/dataflow/cfg.h
|
||||
codon/sir/analyze/dataflow/dominator.h
|
||||
codon/sir/analyze/dataflow/reaching.h
|
||||
codon/sir/analyze/module/global_vars.h
|
||||
codon/sir/analyze/module/side_effect.h
|
||||
codon/sir/attribute.h
|
||||
codon/sir/base.h
|
||||
codon/sir/const.h
|
||||
codon/sir/dsl/codegen.h
|
||||
codon/sir/dsl/nodes.h
|
||||
codon/sir/flow.h
|
||||
codon/sir/func.h
|
||||
codon/sir/instr.h
|
||||
codon/sir/llvm/gpu.h
|
||||
codon/sir/llvm/llvisitor.h
|
||||
codon/sir/llvm/llvm.h
|
||||
codon/sir/llvm/optimize.h
|
||||
codon/sir/module.h
|
||||
codon/sir/sir.h
|
||||
codon/sir/transform/cleanup/canonical.h
|
||||
codon/sir/transform/cleanup/dead_code.h
|
||||
codon/sir/transform/cleanup/global_demote.h
|
||||
codon/sir/transform/cleanup/replacer.h
|
||||
codon/sir/transform/folding/const_fold.h
|
||||
codon/sir/transform/folding/const_prop.h
|
||||
codon/sir/transform/folding/folding.h
|
||||
codon/sir/transform/folding/rule.h
|
||||
codon/sir/transform/lowering/imperative.h
|
||||
codon/sir/transform/lowering/pipeline.h
|
||||
codon/sir/transform/manager.h
|
||||
codon/sir/transform/parallel/openmp.h
|
||||
codon/sir/transform/parallel/schedule.h
|
||||
codon/sir/transform/pass.h
|
||||
codon/sir/transform/pythonic/dict.h
|
||||
codon/sir/transform/pythonic/io.h
|
||||
codon/sir/transform/pythonic/list.h
|
||||
codon/sir/transform/pythonic/str.h
|
||||
codon/sir/transform/rewrite.h
|
||||
codon/sir/types/types.h
|
||||
codon/sir/util/cloning.h
|
||||
codon/sir/util/context.h
|
||||
codon/sir/util/format.h
|
||||
codon/sir/util/inlining.h
|
||||
codon/sir/util/irtools.h
|
||||
codon/sir/util/iterators.h
|
||||
codon/sir/util/matching.h
|
||||
codon/sir/util/operator.h
|
||||
codon/sir/util/outlining.h
|
||||
codon/sir/util/packs.h
|
||||
codon/sir/util/side_effect.h
|
||||
codon/sir/util/visitor.h
|
||||
codon/sir/value.h
|
||||
codon/sir/var.h
|
||||
codon/cir/analyze/analysis.h
|
||||
codon/cir/analyze/dataflow/capture.h
|
||||
codon/cir/analyze/dataflow/cfg.h
|
||||
codon/cir/analyze/dataflow/dominator.h
|
||||
codon/cir/analyze/dataflow/reaching.h
|
||||
codon/cir/analyze/module/global_vars.h
|
||||
codon/cir/analyze/module/side_effect.h
|
||||
codon/cir/attribute.h
|
||||
codon/cir/base.h
|
||||
codon/cir/const.h
|
||||
codon/cir/dsl/codegen.h
|
||||
codon/cir/dsl/nodes.h
|
||||
codon/cir/flow.h
|
||||
codon/cir/func.h
|
||||
codon/cir/instr.h
|
||||
codon/cir/llvm/gpu.h
|
||||
codon/cir/llvm/llvisitor.h
|
||||
codon/cir/llvm/llvm.h
|
||||
codon/cir/llvm/optimize.h
|
||||
codon/cir/module.h
|
||||
codon/cir/cir.h
|
||||
codon/cir/transform/cleanup/canonical.h
|
||||
codon/cir/transform/cleanup/dead_code.h
|
||||
codon/cir/transform/cleanup/global_demote.h
|
||||
codon/cir/transform/cleanup/replacer.h
|
||||
codon/cir/transform/folding/const_fold.h
|
||||
codon/cir/transform/folding/const_prop.h
|
||||
codon/cir/transform/folding/folding.h
|
||||
codon/cir/transform/folding/rule.h
|
||||
codon/cir/transform/lowering/imperative.h
|
||||
codon/cir/transform/lowering/pipeline.h
|
||||
codon/cir/transform/manager.h
|
||||
codon/cir/transform/parallel/openmp.h
|
||||
codon/cir/transform/parallel/schedule.h
|
||||
codon/cir/transform/pass.h
|
||||
codon/cir/transform/pythonic/dict.h
|
||||
codon/cir/transform/pythonic/io.h
|
||||
codon/cir/transform/pythonic/list.h
|
||||
codon/cir/transform/pythonic/str.h
|
||||
codon/cir/transform/rewrite.h
|
||||
codon/cir/types/types.h
|
||||
codon/cir/util/cloning.h
|
||||
codon/cir/util/context.h
|
||||
codon/cir/util/format.h
|
||||
codon/cir/util/inlining.h
|
||||
codon/cir/util/irtools.h
|
||||
codon/cir/util/iterators.h
|
||||
codon/cir/util/matching.h
|
||||
codon/cir/util/operator.h
|
||||
codon/cir/util/outlining.h
|
||||
codon/cir/util/packs.h
|
||||
codon/cir/util/side_effect.h
|
||||
codon/cir/util/visitor.h
|
||||
codon/cir/value.h
|
||||
codon/cir/var.h
|
||||
codon/util/common.h
|
||||
extra/jupyter/jupyter.h
|
||||
codon/compiler/jit_extern.h)
|
||||
|
@ -272,52 +272,52 @@ set(CODON_CPPFILES
|
|||
codon/parser/visitors/typecheck/op.cpp
|
||||
codon/parser/visitors/typecheck/error.cpp
|
||||
codon/parser/visitors/visitor.cpp
|
||||
codon/sir/attribute.cpp
|
||||
codon/sir/analyze/analysis.cpp
|
||||
codon/sir/analyze/dataflow/capture.cpp
|
||||
codon/sir/analyze/dataflow/cfg.cpp
|
||||
codon/sir/analyze/dataflow/dominator.cpp
|
||||
codon/sir/analyze/dataflow/reaching.cpp
|
||||
codon/sir/analyze/module/global_vars.cpp
|
||||
codon/sir/analyze/module/side_effect.cpp
|
||||
codon/sir/base.cpp
|
||||
codon/sir/const.cpp
|
||||
codon/sir/dsl/nodes.cpp
|
||||
codon/sir/flow.cpp
|
||||
codon/sir/func.cpp
|
||||
codon/sir/instr.cpp
|
||||
codon/sir/llvm/gpu.cpp
|
||||
codon/sir/llvm/llvisitor.cpp
|
||||
codon/sir/llvm/optimize.cpp
|
||||
codon/sir/module.cpp
|
||||
codon/sir/transform/cleanup/canonical.cpp
|
||||
codon/sir/transform/cleanup/dead_code.cpp
|
||||
codon/sir/transform/cleanup/global_demote.cpp
|
||||
codon/sir/transform/cleanup/replacer.cpp
|
||||
codon/sir/transform/folding/const_fold.cpp
|
||||
codon/sir/transform/folding/const_prop.cpp
|
||||
codon/sir/transform/folding/folding.cpp
|
||||
codon/sir/transform/lowering/imperative.cpp
|
||||
codon/sir/transform/lowering/pipeline.cpp
|
||||
codon/sir/transform/manager.cpp
|
||||
codon/sir/transform/parallel/openmp.cpp
|
||||
codon/sir/transform/parallel/schedule.cpp
|
||||
codon/sir/transform/pass.cpp
|
||||
codon/sir/transform/pythonic/dict.cpp
|
||||
codon/sir/transform/pythonic/io.cpp
|
||||
codon/sir/transform/pythonic/list.cpp
|
||||
codon/sir/transform/pythonic/str.cpp
|
||||
codon/sir/types/types.cpp
|
||||
codon/sir/util/cloning.cpp
|
||||
codon/sir/util/format.cpp
|
||||
codon/sir/util/inlining.cpp
|
||||
codon/sir/util/irtools.cpp
|
||||
codon/sir/util/matching.cpp
|
||||
codon/sir/util/outlining.cpp
|
||||
codon/sir/util/side_effect.cpp
|
||||
codon/sir/util/visitor.cpp
|
||||
codon/sir/value.cpp
|
||||
codon/sir/var.cpp
|
||||
codon/cir/attribute.cpp
|
||||
codon/cir/analyze/analysis.cpp
|
||||
codon/cir/analyze/dataflow/capture.cpp
|
||||
codon/cir/analyze/dataflow/cfg.cpp
|
||||
codon/cir/analyze/dataflow/dominator.cpp
|
||||
codon/cir/analyze/dataflow/reaching.cpp
|
||||
codon/cir/analyze/module/global_vars.cpp
|
||||
codon/cir/analyze/module/side_effect.cpp
|
||||
codon/cir/base.cpp
|
||||
codon/cir/const.cpp
|
||||
codon/cir/dsl/nodes.cpp
|
||||
codon/cir/flow.cpp
|
||||
codon/cir/func.cpp
|
||||
codon/cir/instr.cpp
|
||||
codon/cir/llvm/gpu.cpp
|
||||
codon/cir/llvm/llvisitor.cpp
|
||||
codon/cir/llvm/optimize.cpp
|
||||
codon/cir/module.cpp
|
||||
codon/cir/transform/cleanup/canonical.cpp
|
||||
codon/cir/transform/cleanup/dead_code.cpp
|
||||
codon/cir/transform/cleanup/global_demote.cpp
|
||||
codon/cir/transform/cleanup/replacer.cpp
|
||||
codon/cir/transform/folding/const_fold.cpp
|
||||
codon/cir/transform/folding/const_prop.cpp
|
||||
codon/cir/transform/folding/folding.cpp
|
||||
codon/cir/transform/lowering/imperative.cpp
|
||||
codon/cir/transform/lowering/pipeline.cpp
|
||||
codon/cir/transform/manager.cpp
|
||||
codon/cir/transform/parallel/openmp.cpp
|
||||
codon/cir/transform/parallel/schedule.cpp
|
||||
codon/cir/transform/pass.cpp
|
||||
codon/cir/transform/pythonic/dict.cpp
|
||||
codon/cir/transform/pythonic/io.cpp
|
||||
codon/cir/transform/pythonic/list.cpp
|
||||
codon/cir/transform/pythonic/str.cpp
|
||||
codon/cir/types/types.cpp
|
||||
codon/cir/util/cloning.cpp
|
||||
codon/cir/util/format.cpp
|
||||
codon/cir/util/inlining.cpp
|
||||
codon/cir/util/irtools.cpp
|
||||
codon/cir/util/matching.cpp
|
||||
codon/cir/util/outlining.cpp
|
||||
codon/cir/util/side_effect.cpp
|
||||
codon/cir/util/visitor.cpp
|
||||
codon/cir/value.cpp
|
||||
codon/cir/var.cpp
|
||||
codon/util/common.cpp
|
||||
extra/jupyter/jupyter.cpp)
|
||||
add_library(codonc SHARED ${CODON_HPPFILES})
|
||||
|
@ -440,22 +440,22 @@ FetchContent_MakeAvailable(googletest)
|
|||
enable_testing()
|
||||
set(CODON_TEST_CPPFILES
|
||||
test/main.cpp
|
||||
test/sir/analyze/dominator.cpp
|
||||
test/sir/analyze/reaching.cpp
|
||||
test/sir/base.cpp
|
||||
test/sir/constant.cpp
|
||||
test/sir/flow.cpp
|
||||
test/sir/func.cpp
|
||||
test/sir/instr.cpp
|
||||
test/sir/module.cpp
|
||||
test/sir/transform/manager.cpp
|
||||
test/sir/types/types.cpp
|
||||
test/sir/util/matching.cpp
|
||||
test/sir/value.cpp
|
||||
test/sir/var.cpp
|
||||
test/cir/analyze/dominator.cpp
|
||||
test/cir/analyze/reaching.cpp
|
||||
test/cir/base.cpp
|
||||
test/cir/constant.cpp
|
||||
test/cir/flow.cpp
|
||||
test/cir/func.cpp
|
||||
test/cir/instr.cpp
|
||||
test/cir/module.cpp
|
||||
test/cir/transform/manager.cpp
|
||||
test/cir/types/types.cpp
|
||||
test/cir/util/matching.cpp
|
||||
test/cir/value.cpp
|
||||
test/cir/var.cpp
|
||||
test/types.cpp)
|
||||
add_executable(codon_test ${CODON_TEST_CPPFILES})
|
||||
target_include_directories(codon_test PRIVATE test/sir
|
||||
target_include_directories(codon_test PRIVATE test/cir
|
||||
"${gc_SOURCE_DIR}/include")
|
||||
target_link_libraries(codon_test fmt codonc codonrt gtest_main)
|
||||
target_compile_definitions(codon_test
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "analysis.h"
|
||||
|
||||
#include "codon/sir/transform/manager.h"
|
||||
#include "codon/cir/transform/manager.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "capture.h"
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
|||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/analyze/dataflow/reaching.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/side_effect.h"
|
||||
#include "codon/cir/analyze/dataflow/reaching.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/side_effect.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
|||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/analyze/dataflow/dominator.h"
|
||||
#include "codon/sir/analyze/dataflow/reaching.h"
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/analyze/dataflow/dominator.h"
|
||||
#include "codon/cir/analyze/dataflow/reaching.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "cfg.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "codon/sir/dsl/codegen.h"
|
||||
#include "codon/sir/dsl/nodes.h"
|
||||
#include "codon/cir/dsl/codegen.h"
|
||||
#include "codon/cir/dsl/nodes.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
|||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/cir.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
|
||||
#define DEFAULT_VISIT(x) \
|
||||
void visit(const x *v) override { defaultInsert(v); }
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "dominator.h"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/analyze/dataflow/cfg.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/analyze/dataflow/cfg.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "reaching.h"
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/analyze/dataflow/cfg.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/analyze/dataflow/cfg.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,6 +1,8 @@
|
|||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "global_vars.h"
|
||||
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,10 @@
|
|||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,13 @@
|
|||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "side_effect.h"
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/analyze/dataflow/capture.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/cir/analyze/dataflow/capture.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,11 @@
|
|||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/util/side_effect.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/util/side_effect.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "attribute.h"
|
||||
|
||||
#include "codon/sir/func.h"
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/cir/func.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include <fmt/ostream.h>
|
||||
|
||||
namespace codon {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace util {
|
|||
class CloneVisitor;
|
||||
}
|
||||
|
||||
/// Base for SIR attributes.
|
||||
/// Base for CIR attributes.
|
||||
struct Attribute {
|
||||
virtual ~Attribute() noexcept = default;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "base.h"
|
||||
|
||||
#include "codon/sir/types/types.h"
|
||||
#include "codon/sir/util/format.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/types/types.h"
|
||||
#include "codon/cir/util/format.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include "codon/cir/var.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/attribute.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/attribute.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
#include "codon/util/common.h"
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ostream.h>
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/cir/const.h"
|
||||
#include "codon/cir/dsl/nodes.h"
|
||||
#include "codon/cir/flow.h"
|
||||
#include "codon/cir/func.h"
|
||||
#include "codon/cir/instr.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/types/types.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include "codon/cir/var.h"
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "const.h"
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/value.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
||||
|
||||
/// SIR constant base. Once created, constants are immutable.
|
||||
/// CIR constant base. Once created, constants are immutable.
|
||||
class Const : public AcceptorExtend<Const, Value> {
|
||||
private:
|
||||
/// the type
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "codon/sir/llvm/llvm.h"
|
||||
#include "codon/sir/types/types.h"
|
||||
#include "codon/cir/llvm/llvm.h"
|
||||
#include "codon/cir/types/types.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "nodes.h"
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "codon/sir/base.h"
|
||||
#include "codon/sir/const.h"
|
||||
#include "codon/sir/instr.h"
|
||||
#include "codon/sir/util/side_effect.h"
|
||||
#include "codon/cir/base.h"
|
||||
#include "codon/cir/const.h"
|
||||
#include "codon/cir/instr.h"
|
||||
#include "codon/cir/util/side_effect.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "flow.h"
|
||||
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include <fmt/ostream.h>
|
||||
|
||||
namespace codon {
|
|
@ -1,14 +1,14 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include "codon/sir/base.h"
|
||||
#include "codon/sir/transform/parallel/schedule.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/base.h"
|
||||
#include "codon/cir/transform/parallel/schedule.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include "codon/cir/var.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,15 +1,15 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "func.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/parser/common.h"
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
#include "codon/cir/var.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,15 +1,15 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/flow.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/flow.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include "codon/cir/var.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
||||
|
||||
/// SIR function
|
||||
/// CIR function
|
||||
class Func : public AcceptorExtend<Func, Var> {
|
||||
private:
|
||||
/// unmangled (source code) name of the function
|
||||
|
@ -32,7 +32,7 @@ protected:
|
|||
public:
|
||||
static const char NodeId;
|
||||
|
||||
/// Constructs an unrealized SIR function.
|
||||
/// Constructs an unrealized CIR function.
|
||||
/// @param name the function's name
|
||||
explicit Func(std::string name = "")
|
||||
: AcceptorExtend(nullptr, true, false, std::move(name)), generator(false),
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "instr.h"
|
||||
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,20 +1,20 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "codon/sir/flow.h"
|
||||
#include "codon/sir/types/types.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/flow.h"
|
||||
#include "codon/cir/types/types.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include "codon/cir/var.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
||||
|
||||
/// SIR object representing an "instruction," or discrete operation in the context of a
|
||||
/// CIR object representing an "instruction," or discrete operation in the context of a
|
||||
/// block.
|
||||
class Instr : public AcceptorExtend<Instr, Value> {
|
||||
public:
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "gpu.h"
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "codon/sir/llvm/llvm.h"
|
||||
#include "codon/cir/llvm/llvm.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "llvisitor.h"
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
|||
#include "codon/compiler/memory_manager.h"
|
||||
#include "codon/parser/common.h"
|
||||
#include "codon/runtime/lib.h"
|
||||
#include "codon/sir/dsl/codegen.h"
|
||||
#include "codon/sir/llvm/optimize.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/dsl/codegen.h"
|
||||
#include "codon/cir/llvm/optimize.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/util/common.h"
|
||||
|
||||
namespace codon {
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/dsl/plugins.h"
|
||||
#include "codon/sir/llvm/llvm.h"
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/llvm/llvm.h"
|
||||
#include "codon/cir/cir.h"
|
||||
#include "codon/util/common.h"
|
||||
|
||||
#include <string>
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "optimize.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/llvm/gpu.h"
|
||||
#include "codon/cir/llvm/gpu.h"
|
||||
#include "codon/util/common.h"
|
||||
#include "llvm/CodeGen/CommandFlags.h"
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "codon/dsl/plugins.h"
|
||||
#include "codon/sir/llvm/llvm.h"
|
||||
#include "codon/cir/llvm/llvm.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "module.h"
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include "codon/parser/cache.h"
|
||||
#include "codon/sir/func.h"
|
||||
#include "codon/cir/func.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
|||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "codon/sir/func.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/func.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include "codon/cir/var.h"
|
||||
#include "codon/util/common.h"
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ostream.h>
|
||||
|
@ -25,7 +25,7 @@ class TypecheckVisitor;
|
|||
|
||||
namespace ir {
|
||||
|
||||
/// SIR object representing a program.
|
||||
/// CIR object representing a program.
|
||||
class Module : public AcceptorExtend<Module, Node> {
|
||||
public:
|
||||
static const std::string VOID_NAME;
|
||||
|
@ -128,7 +128,7 @@ private:
|
|||
public:
|
||||
static const char NodeId;
|
||||
|
||||
/// Constructs an SIR module.
|
||||
/// Constructs an CIR module.
|
||||
/// @param name the module name
|
||||
explicit Module(const std::string &name = "");
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "canonical.h"
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
|||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/analyze/module/side_effect.h"
|
||||
#include "codon/sir/transform/rewrite.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/matching.h"
|
||||
#include "codon/cir/analyze/module/side_effect.h"
|
||||
#include "codon/cir/transform/rewrite.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/matching.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/sir/transform/rewrite.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
#include "codon/cir/transform/rewrite.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "dead_code.h"
|
||||
|
||||
#include "codon/sir/analyze/module/side_effect.h"
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/cir/analyze/module/side_effect.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "global_demote.h"
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "replacer.h"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "codon/sir/types/types.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/sir/var.h"
|
||||
#include "codon/cir/types/types.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include "codon/cir/var.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "const_fold.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
|
||||
#define BINOP(o) \
|
||||
[](auto x, auto y) -> auto{ return x o y; }
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "codon/sir/transform/folding/rule.h"
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/folding/rule.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "const_prop.h"
|
||||
|
||||
#include "codon/sir/analyze/dataflow/reaching.h"
|
||||
#include "codon/sir/analyze/module/global_vars.h"
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/cir/analyze/dataflow/reaching.h"
|
||||
#include "codon/cir/analyze/module/global_vars.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "folding.h"
|
||||
|
||||
#include "codon/sir/transform/folding/const_fold.h"
|
||||
#include "codon/sir/transform/folding/const_prop.h"
|
||||
#include "codon/cir/transform/folding/const_fold.h"
|
||||
#include "codon/cir/transform/folding/const_prop.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/cleanup/canonical.h"
|
||||
#include "codon/sir/transform/cleanup/dead_code.h"
|
||||
#include "codon/sir/transform/cleanup/global_demote.h"
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/cleanup/canonical.h"
|
||||
#include "codon/cir/transform/cleanup/dead_code.h"
|
||||
#include "codon/cir/transform/cleanup/global_demote.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,13 +1,13 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/sir/transform/rewrite.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
#include "codon/cir/transform/rewrite.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "imperative.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/matching.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/matching.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "pipeline.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/matching.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/matching.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,26 +1,26 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "manager.h"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/analyze/dataflow/capture.h"
|
||||
#include "codon/sir/analyze/dataflow/cfg.h"
|
||||
#include "codon/sir/analyze/dataflow/dominator.h"
|
||||
#include "codon/sir/analyze/dataflow/reaching.h"
|
||||
#include "codon/sir/analyze/module/global_vars.h"
|
||||
#include "codon/sir/analyze/module/side_effect.h"
|
||||
#include "codon/sir/transform/folding/folding.h"
|
||||
#include "codon/sir/transform/lowering/imperative.h"
|
||||
#include "codon/sir/transform/lowering/pipeline.h"
|
||||
#include "codon/sir/transform/manager.h"
|
||||
#include "codon/sir/transform/parallel/openmp.h"
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/sir/transform/pythonic/dict.h"
|
||||
#include "codon/sir/transform/pythonic/io.h"
|
||||
#include "codon/sir/transform/pythonic/list.h"
|
||||
#include "codon/sir/transform/pythonic/str.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/analyze/dataflow/capture.h"
|
||||
#include "codon/cir/analyze/dataflow/cfg.h"
|
||||
#include "codon/cir/analyze/dataflow/dominator.h"
|
||||
#include "codon/cir/analyze/dataflow/reaching.h"
|
||||
#include "codon/cir/analyze/module/global_vars.h"
|
||||
#include "codon/cir/analyze/module/side_effect.h"
|
||||
#include "codon/cir/transform/folding/folding.h"
|
||||
#include "codon/cir/transform/lowering/imperative.h"
|
||||
#include "codon/cir/transform/lowering/pipeline.h"
|
||||
#include "codon/cir/transform/manager.h"
|
||||
#include "codon/cir/transform/parallel/openmp.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
#include "codon/cir/transform/pythonic/dict.h"
|
||||
#include "codon/cir/transform/pythonic/io.h"
|
||||
#include "codon/cir/transform/pythonic/list.h"
|
||||
#include "codon/cir/transform/pythonic/str.h"
|
||||
#include "codon/util/common.h"
|
||||
|
||||
namespace codon {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "codon/sir/analyze/analysis.h"
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/analyze/analysis.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "openmp.h"
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
|||
#include <limits>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "codon/sir/transform/parallel/schedule.h"
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/outlining.h"
|
||||
#include "codon/cir/transform/parallel/schedule.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/outlining.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "schedule.h"
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/cir.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <sstream>
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/cir/value.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "pass.h"
|
||||
|
||||
#include "codon/sir/transform/manager.h"
|
||||
#include "codon/cir/transform/manager.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "dict.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/matching.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/matching.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "io.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "str.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/transform/pass.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/transform/pass.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
|||
#include <utility>
|
||||
|
||||
#include "codon/parser/cache.h"
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/iterators.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/sir/value.h"
|
||||
#include "codon/cir/module.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/iterators.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
#include "codon/cir/value.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace codon {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
|||
#include <vector>
|
||||
|
||||
#include "codon/parser/ast.h"
|
||||
#include "codon/sir/base.h"
|
||||
#include "codon/sir/util/packs.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/base.h"
|
||||
#include "codon/cir/util/packs.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ostream.h>
|
||||
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
types::Type *getTypeValue() const { return value.typeValue; }
|
||||
};
|
||||
|
||||
/// Type from which other SIR types derive. Generally types are immutable.
|
||||
/// Type from which other CIR types derive. Generally types are immutable.
|
||||
class Type : public ReplaceableNodeBase<Type> {
|
||||
private:
|
||||
ast::types::TypePtr astType;
|
||||
|
@ -332,7 +332,7 @@ private:
|
|||
Value *doConstruct(std::vector<Value *> args) override;
|
||||
};
|
||||
|
||||
/// Type associated with a SIR function.
|
||||
/// Type associated with a CIR function.
|
||||
class FuncType : public AcceptorExtend<FuncType, Type> {
|
||||
public:
|
||||
using const_iterator = std::vector<Type *>::const_iterator;
|
||||
|
@ -403,7 +403,7 @@ private:
|
|||
std::vector<Type *> doGetUsedTypes() const override { return {base}; }
|
||||
};
|
||||
|
||||
/// Type of a pointer to another SIR type
|
||||
/// Type of a pointer to another CIR type
|
||||
class PointerType : public AcceptorExtend<PointerType, DerivedType> {
|
||||
public:
|
||||
static const char NodeId;
|
||||
|
@ -418,7 +418,7 @@ private:
|
|||
bool doIsAtomic() const override { return false; }
|
||||
};
|
||||
|
||||
/// Type of an optional containing another SIR type
|
||||
/// Type of an optional containing another CIR type
|
||||
class OptionalType : public AcceptorExtend<OptionalType, DerivedType> {
|
||||
public:
|
||||
static const char NodeId;
|
||||
|
@ -433,7 +433,7 @@ private:
|
|||
bool doIsAtomic() const override { return getBase()->isAtomic(); }
|
||||
};
|
||||
|
||||
/// Type of a generator yielding another SIR type
|
||||
/// Type of a generator yielding another CIR type
|
||||
class GeneratorType : public AcceptorExtend<GeneratorType, DerivedType> {
|
||||
public:
|
||||
static const char NodeId;
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "cloning.h"
|
||||
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/cir.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -8,8 +8,8 @@ namespace codon {
|
|||
namespace ir {
|
||||
namespace util {
|
||||
|
||||
/// Base for SIR visitor contexts.
|
||||
template <typename Frame> class SIRContext {
|
||||
/// Base for CIR visitor contexts.
|
||||
template <typename Frame> class CIRContext {
|
||||
private:
|
||||
std::vector<Frame> frames;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include <algorithm>
|
||||
#include <fmt/format.h>
|
||||
|
@ -6,8 +6,8 @@
|
|||
#include <sstream>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "codon/sir/util/format.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/util/format.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,12 +1,12 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "inlining.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "irtools.h"
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "matching.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/cir.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
|
||||
#define VISIT(x) \
|
||||
void visit(const x *v) override { \
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/sir/util/visitor.h"
|
||||
#include "codon/cir/cir.h"
|
||||
#include "codon/cir/util/visitor.h"
|
||||
|
||||
#define LAMBDA_VISIT(x) \
|
||||
virtual void handle(codon::ir::x *v) {} \
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "outlining.h"
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
|||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include "codon/sir/util/cloning.h"
|
||||
#include "codon/sir/util/irtools.h"
|
||||
#include "codon/sir/util/operator.h"
|
||||
#include "codon/cir/util/cloning.h"
|
||||
#include "codon/cir/util/irtools.h"
|
||||
#include "codon/cir/util/operator.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "side_effect.h"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "visitor.h"
|
||||
|
||||
#include "codon/sir/sir.h"
|
||||
#include "codon/cir/cir.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -89,7 +89,7 @@ class FlowInstr;
|
|||
|
||||
namespace util {
|
||||
|
||||
/// Base for SIR visitors
|
||||
/// Base for CIR visitors
|
||||
class Visitor {
|
||||
protected:
|
||||
virtual void defaultVisit(codon::ir::Node *) {
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>
|
||||
// Copyright (C) 2022-2023 Exaloop Inc. <https://exaloop.io>
|
||||
|
||||
#include "value.h"
|
||||
|
||||
#include "codon/sir/instr.h"
|
||||
#include "codon/sir/module.h"
|
||||
#include "codon/cir/instr.h"
|
||||
#include "codon/cir/module.h"
|
||||
|
||||
namespace codon {
|
||||
namespace ir {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue