|
Jlm
|
#include <IOBarrier.hpp>


Public Member Functions | |
| ~IOBarrierOperation () noexcept override | |
| IOBarrierOperation (const std::shared_ptr< const rvsdg::Type > &type) | |
| const std::shared_ptr< const rvsdg::Type > & | Type () const noexcept |
| bool | operator== (const Operation &other) const noexcept override |
| std::string | debug_string () const override |
| std::unique_ptr< Operation > | copy () const override |
Public Member Functions inherited from jlm::rvsdg::SimpleOperation | |
| ~SimpleOperation () noexcept override | |
| SimpleOperation (std::vector< std::shared_ptr< const jlm::rvsdg::Type >> operands, std::vector< std::shared_ptr< const jlm::rvsdg::Type >> results) | |
| size_t | narguments () const noexcept |
| const std::shared_ptr< const rvsdg::Type > & | argument (size_t index) const noexcept |
| size_t | nresults () const noexcept |
| const std::shared_ptr< const rvsdg::Type > & | result (size_t index) const noexcept |
Public Member Functions inherited from jlm::rvsdg::Operation | |
| virtual | ~Operation () noexcept |
| virtual bool | operator== (const Operation &other) const noexcept=0 |
| bool | operator!= (const Operation &other) const noexcept |
Static Public Member Functions | |
| static rvsdg::Input & | BarredInput (const rvsdg::SimpleNode &node) noexcept |
| static rvsdg::SimpleNode & | createNode (rvsdg::Output &value, rvsdg::Output &ioState) |
An IOBarrier operation is used to sequentialize other operations after other IO state operations. It has no equivalent in LLVM.
Example:
The above code is valid C code and not undefined even though there is a division by zero present. The reason for this is that the function opaque() invokes exit(0), and the division by zero is never performed at runtime. In the RVSDG, the division operation has no dependency on the function call to opaque() and therefore it can happen that it is sequentialized before the call operation, transforming the valid program to an undefined program.
The IOBarrier operation ensures a sequentialization of these two operations by routing one of the division operands through it along with an I/O state as additional operand. The division operation consumes then the result value of the IOBarrier operation, effectively seuqentializing the division after the barrier and with that after the call operation:
... io = Call opaque .... xo = IOBarrier x io ... = ISDiv xo 0
Definition at line 45 of file IOBarrier.hpp.
|
overridedefaultnoexcept |
|
inlineexplicit |
Definition at line 50 of file IOBarrier.hpp.
|
inlinestaticnoexcept |
Definition at line 70 of file IOBarrier.hpp.
|
overridevirtual |
Implements jlm::rvsdg::Operation.
Definition at line 27 of file IOBarrier.cpp.
|
inlinestatic |
Definition at line 78 of file IOBarrier.hpp.
|
overridevirtual |
Implements jlm::rvsdg::Operation.
Definition at line 21 of file IOBarrier.cpp.
|
overridenoexcept |
Definition at line 14 of file IOBarrier.cpp.
|
inlinenoexcept |
Definition at line 55 of file IOBarrier.hpp.