NyuziToolchain
NyuziToolchain copied to clipboard
Port of LLVM/Clang C compiler to Nyuzi parallel processor architecture
``` (lldb) p (int) strcmp("abcd", "efgh") error: Can't run the expression locally: Interpreter doesn't handle one of the expression's opcodes ``` Probably dependent on issue #84
In lib/Target/Nyuzi/NyuziInstrInfo.td, SEXT8VS, SEXT8VVM, SEXT8VSM, SEXT16VS, SEXT16VVM, an SEXT16VSM have their instruction matching patterns commented out, e.g.: ``` def SEXT16VSM : FormatRMaskedOneOpInst< (outs VR512:$dest), (ins GPR32:$mask, GPR32:$src2, VR512:$oldvalue), "sext_16_mask $dest,...
Currently the assembler/compiler does not support generating cache control instructions with an offset. Should either add support/tests for these or eliminate the feature from the instruction set.
A compiler pass vectorizes appropriate functions: http://portablecl.org/docs/html/kernel_compiler.html https://github.com/pocl/pocl/tree/master/lib/llvmopencl
Explicitly disabled here: https://github.com/jbush001/NyuziToolchain/blob/2098fd3a8bd8fa511ad9d52cfcdc989d503baa95/tools/clang/lib/Driver/ToolChains/Clang.cpp#L439 Requires defining ABI and backend support. Also requires porting libunwind to link for target code
Currently these use branches, which are unnecessary. Grab carry from the comparison result register. Implement in NyuziISelLowering.
With new implementation, a constant pool load takes 3 instructions: ``` movehi s0, hi(.LCPI1_0) or s0, s0, lo(.LCPI1_0) load_32 s0, (s0) ``` This can be done in two instructions by...
In some cases, the backend will emit: ``` cmpne_i s1, s2, 0 bnz s1, label ``` The cmpne is redundant and could be removed: ``` bnz s2, label ```
Currently these are converted to normal calls. Probably minor performance improvement.
Currently, Nyuzi uses custom intrinsics for vector operations: __builtin_nyuzi_gather_loadi/f __builtin_nyuzi_gather_loadi/f_masked __builtin_nyuzi_scatter_storei/f __builtin_nyuzi_scatter_storei/f_masked Switch to using pre-defined LLVM intrinsics for these: http://llvm.org/docs/LangRef.html#masked-vector-load-and-store-intrinsics For unmasked variants, set the mask to all ones...