Hamburger Helper Modification Thread (Souping Up Hamburger Helper) (Supercharged)

I WAS BORN IN AMERICA AS A WHITE PERSON LOL

DEATH SENTENCE

IM A STATISTIC

IM SO FUCKING HUNGRY

if i was born 100 years earlier i could have gone out west and gotten a homestead and been butchered by indians

all i wanted was a cabin in the woods, but the government will thrwo me in jail if i live in an abode that doesn't fit their regulatory stipulatory views of "living quarters"

1 Like

MY GIRLFRIEND IS TEXTING ME AS IF IM EVER GOING TO DO SOMETHING WITH MY LIFE

Compilers_Principles_Techniques__Tools_with_Gradiance_2nd_Edition

We now consider the common three-address instructions used in the rest of this book. Symbolic labels will be used by instructions that alter the flow of control. A symbolic label represents the index of a three-address instruction in the sequence of instructions. Actual indexes can be substituted for the labels, either by making a separate pass or by "backpatching," discussed in Section 6.7. Here is a list of the common three-address instruction forms:

  1. Assignment instructions of the form x = y op z, where op is a binary arithmetic or logical operation, and x, y, and z are addresses.
  2. Assignments of the form x = op y, where op is a unary operation. Essen- tial unary operations include unary minus, logical negation, shift opera- tors, and conversion operators that, for example, convert an integer to a floating-point number.
  3. Copy instructions of the form x = y, where x is assigned the value of y.
  4. An unconditional jump goto L. The three-address instruction with label L is the next to be executed.
  5. Conditional jumps of the form if x goto L and ifFalse x goto L. These instructions execute the instruction with label L next if x is true and false, respectively. Otherwise, the following t hree-address instruction in sequence is executed next, as usual.
    6.2. THREE-ADDRESS CODE 365
  6. Conditional jumps such as if x relop y goto L, which apply a relational operator (<, ==, >=, etc.) to x and y, and execute the instruction with label L next if x stands in relation relop to y. If not, the three-address instruction following if x relop y goto L is executed next, in sequence.
  7. Procedure calls and returns are implemented using the following instruc- tions: param x for parameters; callp, n and y = callp, n for procedure and function calls, respectively; and return y, where y, representing a returned value, is optional. Their typical use is as the sequence of three- address instructions
    param x, call p, n
    generated as part of a call of the procedure p(xl,x2,. . . ,x,). The in- teger n, indicating the number of actual parameters in "call p, n," is not redundant because calls can be nested. That is, some of the first param statements could be parameters of a call that comes after p returns its value; that value becomes another parameter of the later call. The implementation of procedure calls is outlined in Section 6.9.
  8. Indexed copy instructions of the form x = y Cil and x Cil = y. The instruc- tion x = y Cil sets x to the value in the location i memory units beyond location y . The instruction x Cil = y sets the contents of the location i units beyond x to the value of y. 9. Address and pointer assignments of the form x = & y, x = * y, and * x = y. The instruction x = & y sets the r-value of x to be the location (I-value) of y.2 Presumably y is a name, perhaps a temporary, that denotes an expression with an bvalue such as A [il [jl , and x is a pointer name or temporary. In the instruction x = * y, presumably y is a pointer or a temporary whose r-value is a location. The r-value of x is made equal to the contents of that location. Finally, * x = y sets the r-value of the object pointed to by x to the r-value of y.
    Example

https://inf.ethz.ch/personal/wirth/CompilerConstruction/index.html

4~t is interesting to observe that, although there is a solution in this case, there would be no solution if we changed one of the third components from i + j to i + j + 1. That is, in the example as given, both accesses touch those array elements that lie in the 2-dimensional subspace S defined by "the third component is the sum of the first two components." If we changed i + j to i + j + 1, none of the elements touched by the second access would lie in S, and there would be no reuse at all.

Theorem 11.32 : The linear Diophantine equation
has an integer solution for XI, 22, . . . , x, if and only if gcd(a1, az, . . . , a,) di- vides c.
Example 11.33 : We observed in Example 11.30 that the linear Diophantine equation 2i = 2j + 1 has no solution. We can write this equation as
Now gcd(2, -2) = 2, and 2 does not divide 1 evenly. Thus, there is no solution. For another example, consider the equation
Since gcd(24,36,54) = 6, and 30/6 = 5, there is a solution in integers for x, y, and x. One solution is x = -1, y = 0, and x = 1, but there are an infinity of other solutions.
The first step to the data dependence problem is to use a standard method such as Gaussian elimination to solve the given equalities. Every time a linear equation is constructed, apply Theorem 11.32 to rule out, if possible, the ex- istence of an integer solution. If we can rule out such solutions, then answer Otherwise, we use the solution of the equations to reduce the number of variables in the inequalities.
Example 11.34 : Consider the two equalities
820 CHAPTER 11. OPTIMIZING FOR PARALLELISM AND LOCALITY
The Euclidean Algorithm
The Euclidean algorithm for finding gcd(a, b) works as follows. First, as- sume that a and b are positive integers, and a > b. Note that the GCD of negative numbers, or the GCD of a negative and a positive number is the same as the GCD of their absolute values, so we can assume all integers are positive. If a = b, then gcd(a, b) = a. If a > b, let c be the remainder of alb. If c = 0, then b evenly divides a, so gcd(a, b) = b. Otherwise, compute gcd(b, c); this result will also be gcd(a, b). To compute gcd(al, a2 , . . . , an), for n > 2, use the Euclidean algorithm to compute gcd(al,az) = c. Then recursively compute gcd(c, as, ad,. . . an).
Looking at each equality by itself, it appears there might be a solution. For the

im more interested in the 3 address IR they're talking about

is it SSA?