Skip to content

Commit

Permalink
Correct llvm_dsp wrapper. New test in impulse-tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Aug 29, 2024
1 parent b2ffadb commit 100d91b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion compiler/generator/llvm/llvm_code_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ DeclareFunInst* LLVMCodeContainer::generateStaticInitFun(const string& name, boo

if (gGlobal->gInlineTable) {
BlockInst* inlined = inlineSubcontainersFunCalls(fStaticInitInstructions);
dump2FIR(inlined);
block->pushBackInst(inlined);
} else {
block->pushBackInst(fStaticInitInstructions);
Expand Down
7 changes: 4 additions & 3 deletions compiler/generator/llvm/llvm_dsp_aux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void llvm_dsp_factory_aux::init(const string& type_name, const string& dsp_name)
fInstanceConstants = nullptr;
fInstanceClear = nullptr;
fClassInit = nullptr;
fClassInit = nullptr;
fStaticInit = nullptr;
fCompute = nullptr;
// By default
fClassName = "mydsp";
Expand Down Expand Up @@ -403,13 +403,14 @@ void llvm_dsp::classInit(int sample_rate)
{
if (fFactory->getFactory()->fClassInit) {
fFactory->getFactory()->fClassInit(sample_rate);
} else if (fFactory->getFactory()->fStaticInit) {
fFactory->getFactory()->fStaticInit(fDSP, sample_rate);
}
}

void llvm_dsp::instanceInit(int sample_rate)
{
if (fFactory->getFactory()->fStaticInit) {
fFactory->getFactory()->fStaticInit(fDSP, sample_rate);
}
instanceConstants(sample_rate);
instanceResetUserInterface();
instanceClear();
Expand Down
1 change: 1 addition & 0 deletions tests/impulse-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ wast:
llvm:
export FAUST_OPT=FAUST_LLVM_NO_FM; \
$(MAKE) -f Make.llvm outdir=llvm/double FAUSTOPTIONS="-I dsp"
$(MAKE) -f Make.llvm outdir=llvm/double/it FAUSTOPTIONS="-I dsp -it"
$(MAKE) -f Make.llvm outdir=llvm/double/ftz1 FAUSTOPTIONS="-I dsp -ftz 1"
$(MAKE) -f Make.llvm outdir=llvm/double/ftz2 FAUSTOPTIONS="-I dsp -ftz 2"
$(MAKE) -f Make.llvm outdir=llvm/double/ct FAUSTOPTIONS="-I dsp -ct 0"
Expand Down

0 comments on commit 100d91b

Please sign in to comment.