Jlm
RvsdgModule.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Nico Reißmann <nico.reissmann@gmail.com>
3  * See COPYING for terms of redistribution.
4  */
5 
7 #include <jlm/util/common.hpp>
8 
9 namespace jlm::llvm
10 {
11 
12 LlvmGraphImport &
14 {
15  // The copy interface is more general that what we support
17  JLM_ASSERT(input == nullptr);
18 
19  return create(
20  *region.graph(),
21  ValueType(),
22  ImportedType(),
23  Name(),
24  linkage(),
26  isConstant(),
27  getAlignment());
28 }
29 
30 std::unique_ptr<rvsdg::RvsdgModule>
32 {
33  return std::make_unique<LlvmRvsdgModule>(
35  TargetTriple(),
36  DataLayout(),
37  Rvsdg().Copy());
38 }
39 
40 }
const std::shared_ptr< const jlm::rvsdg::Type > & ImportedType() const noexcept
Definition: RvsdgModule.hpp:94
const std::shared_ptr< const jlm::rvsdg::Type > & ValueType() const noexcept
Definition: RvsdgModule.hpp:80
bool isConstant() const noexcept
Definition: RvsdgModule.hpp:67
static LlvmGraphImport & create(rvsdg::Graph &graph, std::shared_ptr< const rvsdg::Type > valueType, std::shared_ptr< const rvsdg::Type > importedType, std::string name, Linkage linkage, CallingConvention callingConvention, const bool isConstant, const size_t alignment)
const Linkage & linkage() const noexcept
Definition: RvsdgModule.hpp:50
const CallingConvention & callingConvention() const noexcept
Definition: RvsdgModule.hpp:61
size_t getAlignment() const noexcept
Definition: RvsdgModule.hpp:44
LlvmGraphImport & Copy(rvsdg::Region &region, rvsdg::StructuralInput *input) const override
Definition: RvsdgModule.cpp:13
const util::FilePath & SourceFileName() const noexcept
const std::string & TargetTriple() const noexcept
std::unique_ptr< RvsdgModule > copy() const override
Definition: RvsdgModule.cpp:31
const std::string & DataLayout() const noexcept
const std::string & Name() const noexcept
Definition: graph.hpp:25
rvsdg::Region * region() const noexcept
Definition: node.cpp:151
StructuralInput * input() const noexcept
Definition: region.hpp:69
Represent acyclic RVSDG subgraphs.
Definition: region.hpp:213
Graph * graph() const noexcept
Definition: region.hpp:363
bool IsRootRegion() const noexcept
Definition: region.cpp:170
Graph & Rvsdg() noexcept
Definition: RvsdgModule.hpp:57
#define JLM_ASSERT(x)
Definition: common.hpp:16
Global memory state passed between functions.