Skip to content

Instantly share code, notes, and snippets.

View Cr0a3's full-sized avatar
🖥️
Writing compilers

Cr0a3 Cr0a3

🖥️
Writing compilers
View GitHub Profile
using PlanetaryTerrain;
using Unity.VisualScripting;
using UnityEngine;
public class VehicleCameraController : MonoBehaviour
{
public float zoomSpeed;
public float orbitSize;
public Transform orbitMiddle;
[SerializeField] Planet planet;

Inverted Graph Register Allocation

By Toni Ivanovski

Let's suppose you have a ir which is represented as a graph like this:

IR

Other requirements

  • The ir is not allowed to have branches
@Cr0a3
Cr0a3 / LoopAnalysis.md
Last active November 20, 2024 14:11
LoopAnalysis

Step 1: Define Loop Forms

A loop in a control flow graph (CFG) can generally be classified into the following forms:

  1. Single Basic Block Loop: Contains the condition and body in one block.

Example: while (condition) { body }