{"id":24166097,"url":"https://github.com/jonathanvdc/flame","last_synced_at":"2025-09-20T10:32:59.800Z","repository":{"id":27408131,"uuid":"30884984","full_name":"jonathanvdc/Flame","owner":"jonathanvdc","description":"A compiler framework for managed code.","archived":false,"fork":false,"pushed_at":"2019-09-29T14:41:26.000Z","size":108098,"stargazers_count":52,"open_issues_count":4,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-03T08:08:27.840Z","etag":null,"topics":["compiler","flame","programming-language"],"latest_commit_sha":null,"homepage":"https://jonathanvdc.github.io/Flame","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanvdc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-16T19:45:37.000Z","updated_at":"2024-12-20T17:56:39.000Z","dependencies_parsed_at":"2022-09-04T07:31:26.958Z","dependency_job_id":null,"html_url":"https://github.com/jonathanvdc/Flame","commit_stats":null,"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanvdc%2FFlame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanvdc%2FFlame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanvdc%2FFlame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanvdc%2FFlame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanvdc","download_url":"https://codeload.github.com/jonathanvdc/Flame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233655326,"owners_count":18709261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","flame","programming-language"],"created_at":"2025-01-12T20:14:29.370Z","updated_at":"2025-09-20T10:32:59.320Z","avatar_url":"https://github.com/jonathanvdc.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flame\n\nFlame is a collection of C# libraries for building tools that read, analyze, optimize and write managed languages. Things you can build with Flame include optimizing compilers, IL optimizers, static analyzers and more.\n\nKey features include:\n  * **An intermediate representation (IR) in static single assignment (SSA) form.** This type of IR is favored by state-of-the-art optimizing compilers such as LLVM and GCC. Flame IR is designed from the ground up with the express intent of making it as suitable as possible for a wide range of optimizations and analyses.\n  * **A wealth of optimization passes that operate on Flame IR.** These passes include aggressive optimizations such as inlining, partial scalar replacement of aggregates, global value numbering, LINQ optimization, tail call optimization and [many others](http://jonathanvdc.github.io/Flame/api/Flame.Compiler.Transforms.html).\n  * **A variety of IR analyses.** These analyses extract information not explicitly encoded in Flame IR. For example, there are analyses that compute dominator trees, value numbering, block predecessor information, value nullability and [more](http://jonathanvdc.github.io/Flame/api/Flame.Compiler.Analysis.html).\n  * **A pluggable architecture.** Flame conveniently includes many built-in transforms and analyses, but sometimes these generic algorithms don't quite cover your use case exactly. In that case, you can easily implement your own transform or analysis.\n  * **A CIL front-end and back-end.** Flame can translate CIL to Flame IR and vice-versa, allowing you to easily read and/or write CIL while operating at the optimization and analysis\u0026ndash;focused abstraction layer afforded by Flame IR.\n\nFor an introduction to Flame's main concepts see [A brief introduction to Flame](https://jonathanvdc.github.io/Flame/articles/intro.html).\n\n## Subprojects\n\nAt its core, Flame is a set of libraries designed to support tools that read, analyze, optimize and write managed languages. Additionally, Flame includes a number of projects that use Flame in a fairly straightforward way.\n\n### `ilopt`\n\n`ilopt` is an ahead-of-time optimizer for CIL assemblies, that is, `ilopt` is a fairly simple command-line tool that reads CIL assemblies, optimizes them and writes the optimized version back to disk.\n\n`ilopt` currently understands most if not all of the CIL opcodes generated by the C# compiler. Other opcodes may not be supported yet. For an overview of single-file C# programs that `ilopt` can definitely optimize, take a look at the [`ilopt` test programs](https://github.com/jonathanvdc/Flame/tree/master/tool-tests/ILOpt).\n\n## Build instructions\n\nFlame is a C# project that targets .NET 4.5 implementations, like Mono and the .NET framework. .NET Core is not supported yet because Flame relies on NuGet packages that don't yet support .NET Core.\n\nAdditionally, Flame uses [EC#](http://ecsharp.net/) macros to convert Flame IR rewrite rule DSL to C# code.\n\n### Linux, Mac OS X\n\nBuilding Flame is easy if you're on Linux or Mac OS X. Just spell\n```console\n$ make nuget\n$ make\n```\n\nThat's it. The above will grab NuGet dependencies, compile EC# macros down to regular C# and build the project.\n\nTo run the unit tests, type\n```console\n$ make test\n```\n\n### Windows\n\nBuilding Flame is somewhat more challenging on Windows. If at all possible, use a GNU Make implementation to run the Makefile, same as for Linux and Mac OS X.\n\nOtherwise, you will need to do the following:\n\n  1. Restore NuGet packages (`nuget restore`).\n  2. Build the macros. (`msbuild /p:Configuration=Release FlameMacros/FlameMacros.csproj`).\n  3. Compile EC# macros down to regular C# (`make dsl` in the Makefile, otherwise `FlameMacros/bin/Release/LeMP.exe --macros FlameMacros/bin/Release/FlameMacros.dll --outext=.out.cs file.ecs` for all `.ecs` files).\n  4. Build Flame itself (`msbuild /p:Configuration=Release Flame.sln`).\n\nRun the unit tests by spelling\n```console\nUnitTests\\bin\\Release\\UnitTests.exe all\n```\n\nWindows workflow enhancements welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanvdc%2Fflame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanvdc%2Fflame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanvdc%2Fflame/lists"}