@@ -102,6 +102,48 @@ void Compiler::addInput(const std::string &name)
102102 addInput (impl->block ->inputAt (impl->block ->findInput (name)).get ());
103103}
104104
105+ /* ! Creates an add instruction from the last 2 values. */
106+ void Compiler::createAdd ()
107+ {
108+ impl->builder ->createAdd ();
109+ }
110+
111+ /* ! Creates a subtract instruction from the last 2 values. */
112+ void Compiler::createSub ()
113+ {
114+ impl->builder ->createSub ();
115+ }
116+
117+ /* ! Creates a multiply instruction from the last 2 values. */
118+ void Compiler::createMul ()
119+ {
120+ impl->builder ->createMul ();
121+ }
122+
123+ /* ! Creates a divide instruction from the last 2 values. */
124+ void Compiler::createDiv ()
125+ {
126+ impl->builder ->createDiv ();
127+ }
128+
129+ /* ! Creates an equality comparison instruction using the last 2 values. */
130+ void Compiler::createCmpEQ ()
131+ {
132+ impl->builder ->createCmpEQ ();
133+ }
134+
135+ /* ! Creates a greater than comparison instruction using the last 2 values. */
136+ void Compiler::createCmpGT ()
137+ {
138+ impl->builder ->createCmpGT ();
139+ }
140+
141+ /* ! Creates a lower than comparison instruction using the last 2 values. */
142+ void Compiler::createCmpLT ()
143+ {
144+ impl->builder ->createCmpLT ();
145+ }
146+
105147/* ! Jumps to the given if substack. */
106148void Compiler::moveToIf (std::shared_ptr<Block> substack)
107149{
0 commit comments