<commit_before>
TOP = ../../../..
include $(TOP)/configs/current

include Makefile.sources

LIBNAME = radeon

LIBRARY_INCLUDES = -I$(TOP)/include

TBLGEN = $(LLVM_BINDIR)/llvm-tblgen

CXXFLAGS+= $(LLVM_CXXFLAGS)

include ../../Makefile.template

CXXFLAGS := $(filter-out -DDEBUG, $(CXXFLAGS))

tablegen = $(TBLGEN) -I $(LLVM_INCLUDEDIR) $1 $2 -o $3

HAVE_LLVM_INTRINSICS = $(shell grep IntrinsicsR600.td $(LLVM_INCLUDEDIR)/llvm/Intrinsics.td)

gen: $(GENERATED_SOURCES)

SIRegisterInfo.td: SIGenRegisterInfo.pl
	$(PERL) $^ > $@

SIRegisterGetHWRegNum.inc: SIGenRegisterInfo.pl
	$(PERL) $^ $@ > /dev/null

R600Intrinsics.td: R600IntrinsicsNoOpenCL.td R600IntrinsicsOpenCL.td
ifeq ($(HAVE_LLVM_INTRINSICS),)
	cp R600IntrinsicsNoOpenCL.td R600Intrinsics.td
else
	cp R600IntrinsicsOpenCL.td R600Intrinsics.td
endif

R600RegisterInfo.td: R600GenRegisterInfo.pl
	$(PERL) $^ > $@

AMDGPUGenRegisterInfo.inc: *.td
	$(call tablegen, -gen-register-info, AMDGPU.td, $@)

AMDGPUGenInstrInfo.inc: *.td
	$(call tablegen, -gen-instr-info, AMDGPU.td, $@)

AMDGPUGenAsmWriter.inc: *.td
	$(call tablegen, -gen-asm-writer, AMDGPU.td, $@)

AMDGPUGenDAGISel.inc: *.td
	$(call tablegen, -gen-dag-isel, AMDGPU.td, $@)

AMDGPUGenCallingConv.inc: *.td
	$(call tablegen, -gen-callingconv, AMDGPU.td, $@)

AMDGPUGenSubtargetInfo.inc: *.td
	$(call tablegen, -gen-subtarget, AMDGPU.td, $@)

AMDGPUGenEDInfo.inc: *.td
	$(call tablegen, -gen-enhanced-disassembly-info, AMDGPU.td, $@)

AMDGPUGenIntrinsics.inc: *.td
	$(call tablegen, -gen-tgt-intrinsic, AMDGPU.td, $@)

AMDGPUGenCodeEmitter.inc: *.td
	$(call tablegen, -gen-emitter, AMDGPU.td, $@)

AMDGPUGenDFAPacketizer.inc: *.td
	$(call tablegen, -gen-dfa-packetizer, AMDGPU.td, $@)

LOADER_LIBS=$(shell llvm-config --libs bitreader asmparser)
loader: loader.o libradeon.a
	gcc -o loader -L/usr/local/lib $(LDFLAGS) loader.o libradeon.a $(LLVM_LIBS) $(LOADER_LIBS) -lpthread -ldl -lstdc++ -lm<commit_msg>radeon/llvm: Add $(LLVM_LDFLAGS) to the loader linker flags<commit_after>
TOP = ../../../..
include $(TOP)/configs/current

include Makefile.sources

LIBNAME = radeon

LIBRARY_INCLUDES = -I$(TOP)/include

TBLGEN = $(LLVM_BINDIR)/llvm-tblgen

CXXFLAGS+= $(LLVM_CXXFLAGS)

include ../../Makefile.template

CXXFLAGS := $(filter-out -DDEBUG, $(CXXFLAGS))

tablegen = $(TBLGEN) -I $(LLVM_INCLUDEDIR) $1 $2 -o $3

HAVE_LLVM_INTRINSICS = $(shell grep IntrinsicsR600.td $(LLVM_INCLUDEDIR)/llvm/Intrinsics.td)

gen: $(GENERATED_SOURCES)

SIRegisterInfo.td: SIGenRegisterInfo.pl
	$(PERL) $^ > $@

SIRegisterGetHWRegNum.inc: SIGenRegisterInfo.pl
	$(PERL) $^ $@ > /dev/null

R600Intrinsics.td: R600IntrinsicsNoOpenCL.td R600IntrinsicsOpenCL.td
ifeq ($(HAVE_LLVM_INTRINSICS),)
	cp R600IntrinsicsNoOpenCL.td R600Intrinsics.td
else
	cp R600IntrinsicsOpenCL.td R600Intrinsics.td
endif

R600RegisterInfo.td: R600GenRegisterInfo.pl
	$(PERL) $^ > $@

AMDGPUGenRegisterInfo.inc: *.td
	$(call tablegen, -gen-register-info, AMDGPU.td, $@)

AMDGPUGenInstrInfo.inc: *.td
	$(call tablegen, -gen-instr-info, AMDGPU.td, $@)

AMDGPUGenAsmWriter.inc: *.td
	$(call tablegen, -gen-asm-writer, AMDGPU.td, $@)

AMDGPUGenDAGISel.inc: *.td
	$(call tablegen, -gen-dag-isel, AMDGPU.td, $@)

AMDGPUGenCallingConv.inc: *.td
	$(call tablegen, -gen-callingconv, AMDGPU.td, $@)

AMDGPUGenSubtargetInfo.inc: *.td
	$(call tablegen, -gen-subtarget, AMDGPU.td, $@)

AMDGPUGenEDInfo.inc: *.td
	$(call tablegen, -gen-enhanced-disassembly-info, AMDGPU.td, $@)

AMDGPUGenIntrinsics.inc: *.td
	$(call tablegen, -gen-tgt-intrinsic, AMDGPU.td, $@)

AMDGPUGenCodeEmitter.inc: *.td
	$(call tablegen, -gen-emitter, AMDGPU.td, $@)

AMDGPUGenDFAPacketizer.inc: *.td
	$(call tablegen, -gen-dfa-packetizer, AMDGPU.td, $@)

LOADER_LIBS=$(shell llvm-config --libs bitreader asmparser)
loader: loader.o libradeon.a
	gcc -o loader $(LLVM_LDFLAGS) -L/usr/local/lib $(LDFLAGS) loader.o libradeon.a $(LLVM_LIBS) $(LOADER_LIBS) -lpthread -ldl -lstdc++ -lm
{'fraction_non_alphanumeric': 0.16717791411042945, 'fraction_numerical': 0.01687116564417178, 'mean_word_length': 4.875375375375375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2870045', 'n_tokens_mistral': 1756, 'n_tokens_neox': 1602, 'n_words': 285}