Skip to content

Commit

Permalink
Update MIR backend for 1.0.0 API.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Dec 3, 2024
1 parent 091748c commit 68ff360
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/backends/interp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set ( CSHARP_BACKEND OFF CACHE STRING "Include CSharp backend" FORCE )
set ( DLANG_BACKEND OFF CACHE STRING "Include Dlang backend" FORCE )
set ( FIR_BACKEND OFF CACHE STRING "Include FIR backend" FORCE )
set ( INTERP_BACKEND OFF CACHE STRING "Include Interpreter backend" FORCE )
set ( INTERP_COMP_BACKEND STATIC DYNAMIC CACHE STRING "Include Interpreter/Cmmpiler backend" FORCE )
set ( INTERP_COMP_BACKEND STATIC DYNAMIC CACHE STRING "Include Interpreter/Compiler backend" FORCE )
set ( JAVA_BACKEND OFF CACHE STRING "Include JAVA backend" FORCE )
set ( JAX_BACKEND OFF CACHE STRING "Include JAX backend" FORCE )
set ( JULIA_BACKEND OFF CACHE STRING "Include Julia backend" FORCE )
Expand Down
6 changes: 3 additions & 3 deletions compiler/generator/interpreter/fbc_mir_compiler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1102,12 +1102,12 @@ class FBCMIRCompiler : public FBCExecuteFun<REAL> {
MIR_link(fContext, MIR_set_interp_interface, importResolver);

// Code generation
MIR_gen_init(fContext, 1);
MIR_gen_init(fContext);

// Optimize the code (default = 2)
MIR_gen_set_optimize_level(fContext, 0, 3);
MIR_gen_set_optimize_level(fContext, 3);

fCompiledFun = (compiledFun)MIR_gen(fContext, 0, fCompute);
fCompiledFun = (compiledFun)MIR_gen(fContext, fCompute);
MIR_gen_finish(fContext);

// Print module
Expand Down
4 changes: 2 additions & 2 deletions tools/benchmark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ faustbench-interp: faustbench-interp.cpp $(LIB)/libfaust.a
$(CXX) $(COMPILEOPT) $(ARCHS) faustbench-interp.cpp -L $(LIB_FLAGS) $(LIBS) -I $(INC) $(LLVM) $(STRIP) -lz -lncurses -lpthread -o $@

faustbench-interp-comp: faustbench-interp-comp.cpp $(LIB)/libfaustmachine.a
$(CXX) $(COMPILEOPT) $(ARCHS) faustbench-interp-comp.cpp $(LIB)/libfaustmachine.a /usr/local/lib/libmir.a -I $(INC) $(LLVM) $(STRIP) -lz -lncurses -lpthread -o $@
$(CXX) $(COMPILEOPT) $(ARCHS) faustbench-interp-comp.cpp $(LIB)/libfaustmachine.a -I $(INC) $(LLVM) $(STRIP) -lz -lncurses -lpthread -o $@

dynamic-faust: dynamic-faust.cpp $(LIB)/libfaust.a
$(CXX) $(COMPILEOPT) $(ARCHS) dynamic-faust.cpp -L $(LIB_FLAGS) $(LIBS) -I $(INC) $(LLVM) $(STRIP) -lpthread -o $@
Expand All @@ -83,7 +83,7 @@ dynamic-jack-gtk: dynamic-jack-gtk.cpp $(LIB)/libfaust.a
$(CXX) -DJACK $(COMPILEOPT) $(ARCHS) dynamic-jack-gtk.cpp -L $(LIB_FLAGS) $(SNDFILE_LIBS) $(LIBS) -I $(INC) $(LLVM) `pkg-config --cflags --libs samplerate jack gtk+-2.0` `pkg-config --cflags sndfile` $(STRIP) $(COMMLIBS) -o $@

dynamic-machine-jack-gtk: dynamic-machine-jack-gtk.cpp $(LIB)/libfaustmachine.a
$(CXX) $(COMPILEOPT) $(ARCHS) dynamic-machine-jack-gtk.cpp -L $(LIB_FLAGS) $(SNDFILE_LIBS) $(LIB)/libfaustmachine.a /usr/local/lib/libmir.a -I $(INC) $(LLVM) `pkg-config --cflags --libs samplerate jack gtk+-2.0` `pkg-config --cflags sndfile` $(STRIP) $(COMMLIBS) -o $@
$(CXX) $(COMPILEOPT) $(ARCHS) dynamic-machine-jack-gtk.cpp -L $(LIB_FLAGS) $(SNDFILE_LIBS) $(LIB)/libfaustmachine.a -I $(INC) $(LLVM) `pkg-config --cflags --libs samplerate jack gtk+-2.0` `pkg-config --cflags sndfile` $(STRIP) $(COMMLIBS) -o $@

dynamic-coreaudio-gtk: dynamic-jack-gtk.cpp $(LIB)/libfaust.a
$(CXX) $(COMPILEOPT) $(ARCHS) dynamic-jack-gtk.cpp -L $(LIB_FLAGS) $(SNDFILE_LIBS) $(LIBS) -I $(INC) $(LLVM) `pkg-config --cflags --libs samplerate gtk+-2.0` `pkg-config --cflags sndfile` $(STRIP) $(COMMLIBS) $(MACOSLIBS) -o $@
Expand Down

0 comments on commit 68ff360

Please sign in to comment.