Lines Matching full:variable
93 <p>In this case, we have the variable "X", whose value depends on the path
158 With this in mind, the high-level idea is that we want to make a stack variable
167 variable is defined as "i32". What this means is that @G defines <em>space</em>
170 being declared with global variable definitions, they are declared with the
187 variable in the LLVM IR. Stack memory allocated with the alloca instruction is
223 <li>Each mutable variable becomes a stack allocation.</li>
224 <li>Each read of the variable becomes a load from the stack.</li>
225 <li>Each update of the variable becomes a store to the stack.</li>
226 <li>Taking the address of a variable just uses the stack address directly.</li>
311 Debug information in LLVM</a> relies on having the address of the variable
374 Kaleidoscope to support new variable definitions.
388 that holds the double value for the named variable. In order to support
390 the <em>memory location</em> of the variable in question. Note that this
397 things: incoming arguments to functions and the induction variable of 'for'
437 variable references. In our new scheme, variables live on the stack, so code
444 // Look this variable up in the function.
446 if (V == 0) return ErrorV("Unknown variable name");
463 <b>// Create an alloca for the variable in the entry block.
466 // Emit the start code first, without 'variable' in scope.
479 // the body of the loop mutates the variable.
490 load/store to access the variable as needed.</p>
502 // Create an alloca for this variable.
508 // Add arguments to variable symbol table.
573 <p>Here there is only one variable (x, the input argument) but you can still
576 it. Each reference to the variable does a reload from the stack. Also, note
611 variable. The point of showing this is to calm your tension about inserting
683 return ErrorV("destination of '=' must be a variable");
690 strange thing is that it requires the LHS to be a variable. It is invalid to
701 Value *Variable = NamedValues[LHSE->getName()];
702 if (Variable == 0) return ErrorV("Unknown variable name");
704 Builder.CreateStore(Val, Variable);
711 <p>Once we have the variable, codegen'ing the assignment is straightforward:
837 // At least one variable name is required.
909 For each variable we put into the symbol table, we remember the previous value
914 // Emit the initializer before adding the variable to scope, this prevents
915 // the initializer from referencing the variable itself, and permits stuff
930 // Remember the old variable binding so that we can restore the binding when
953 <p>Finally, before returning, we restore the previous variable bindings:</p>
967 <p>The end result of all of this is that we get properly scoped variable
1124 /// VariableExprAST - Expression class for referencing a variable, like "a".
1276 if (CurTok != '(') // Simple variable ref.
1396 // At least one variable name is required.
1630 // Look this variable up in the function.
1632 if (V == 0) return ErrorV("Unknown variable name");
1655 return ErrorV("destination of '=' must be a variable");
1661 Value *Variable = NamedValues[LHSE->getName()];
1662 if (Variable == 0) return ErrorV("Unknown variable name");
1664 Builder.CreateStore(Val, Variable);
1786 // Create an alloca for the variable in the entry block.
1789 // Emit the start code first, without 'variable' in scope.
1806 // Within the loop, the variable is defined equal to the PHI node. If it
1807 // shadows an existing variable, we have to restore it, so save it now.
1832 // the body of the loop mutates the variable.
1851 // Restore the unshadowed variable.
1872 // Emit the initializer before adding the variable to scope, this prevents
1873 // the initializer from referencing the variable itself, and permits stuff
1888 // Remember the old variable binding so that we can restore the binding when
1951 // Create an alloca for this variable.
1957 // Add arguments to variable symbol table.