Upgraded to LLVM 14.
v1.12.0 (released 17th September 2023)
Removed multiply loop optimisation due to soundness issues.
v1.11.0 (released 17th June 2023)
Fixed a crash on compiling empty programs at low optimisation levels.
The strip argument is now
-s, consistent with other compilers, and
binaries are no longer stripped by default.
Stripping is now done during linking, rather than shelling out to
strip. This is faster and more robust.
Improved dead code elimination after multiply loops, e.g.
is equivalent to
v1.10.0 (released 15th June 2023)
Updated to LLVM 13.
- Improved diagnostics display on warnings and errors.
- CLI argument parsing now uses the clap library. No arguments have changed, but help and argument parsing errors should be clearer.
v1.9.0 (released 24th October 2020)
Updated to LLVM 10.0.
- Fixed an issue with stripping symbols on macOS (#23).
- ANSI colour codes are only output when stdout is a TTY (#15).
Updated to LLVM 8.0.
Fixed a linking error on recent LLVM versions, and a pass manager segfault on LLVM 8.
- Fixed a rare crash on programs with a large number of instructions had no effect.
- Fixed a memory issue where programs with a large number of cells (which were stored on the stack) were misoptimised and segfaulted. Cell storage is now on the heap.
- Stripping symbols from the output binary can now be controlled with
- Re-added a multiply loop optimisation. This was removed in 1.5.0 due to soundness bugs.
- Added a
Extracting multiply loops was causing a variety of soundness failures and segfaults. This peephole optimisation has been moved to a branch until it's more robust.
- Fixed an optimisation that incorrectly removed instructions when
,instructions were present.
- Moved to LLVM 3.8, as LLVM 3.7 misoptimised some programs (see #8).
- bfc now reports a helpful error on nonexistent targets.
- Improved wording of the warning message on multiply loops that access out-of-bounds cells.
- Added a
--passesCLI argument to customise which bfc optimisation passes are run.
bfc now supports cross-compilation, so you can compile for any architecture that LLVM supports.
Fixed an issue compiling bfc on ARM.
LLVM's default optimisation levels are tuned for C. We now run LLVM optimisation passes twice, to fully leverage LLVM. Many programs now execute in less than half the time.
We now run optimisations using LLVM's API directly rather than shelling out to
llc. This provides a modest improvement to compile time.
- We now specify the data layout and target to LLVM, as recommended by the LLVM team. In principle this is faster, but we've seen no measurable performance boost.
- bfc now provides up to 100,000 cells. This has been increased to support awib, which requires at least 65,535 cells available.
- Fixed a compiler crash due to bounds analysis ignoring offsets.
- Show a more helpful error if
stripare not available.
- bfc now reports errors and warnings with colour-coded diagnostics and filenames.
- bfc now generates an error with position on syntax errors.
- bfc now generates a warning with position on dead code.
- bfc now generates a warning with position on code that is guaranteed to error at runtime.
- Compile time execution is now much smarter. Previously, we had to finish executing loops in order to skip runtime execution. We can now partly execute loops at runtime. This is a big help to many programs with a large outer loop, previously they did not benefit from compile time exeuction.
--dump-bfis now much faster.
- In some cases, reorder with offset led to miscompilation (only seen in mandelbrot.bf).
- New optimisation: reorder with offset. See the readme for more details.
- Remove redundant sets, dead loop removal and combine before read are now smarter. Previously they required adjacent instructions, but they now find the next relevant instruction when there are irrelevant intermediate instructions.
- LLVM optimisation level can now be set with
- Fixed an issue with writing to stdout during speculative execution (we were writing to stdin instead).
- Improved the output of
--dump-bf-irhas been renamed to
First release! Announcement blog post.
- Compiles to 32-bit x86 binaries.
- Peephole optimisations
- Cell bounds analysis
- Speculative execution