Ich habe einen benutzerdefinierten Registerzuordner geschrieben, der aufruft
Code: Select all
...
RegisterRegAlloc MinimalRegAllocator ("minimal", "Minimal Register Allocator", [] () -> FunctionPass * {
return new RAMinimal ();
});
Code: Select all
LLVM_FLAGS := $(shell llvm-config --cxxflags --ldflags --libs --system-libs)
ZSTD_FLAGS := -I/opt/homebrew/Cellar/zstd/1.5.6/include -L/opt/homebrew/Cellar/zstd/1.5.6/lib
all:
g++ -g -dynamiclib $(ZSTD_FLAGS) $(LLVM_FLAGS) RegAllocMinimal.cpp -o libRegAlloc.dylib
Code: Select all
llc -load libRegAlloc.dylib -regalloc minimal test/Foo.c
Code: Select all
llc: for the --regalloc option: Cannot find option named 'minimal'!