windelbouwman / ppci

A compiler for ARM, X86, MSP430, xtensa and more implemented in pure Python
https://ppci.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
336 stars 36 forks source link

Polyhedral optimization #90

Open windelbouwman opened 4 years ago

windelbouwman commented 4 years ago

This looks cool:

https://polly.llvm.org/performance.html

How would we integrate this?

pfalcon commented 4 years ago

What's so cool about? Polyhedral-model optimization looks like "corporate bloat" of compiler optimizations. Loop parallelization for multiprocessors and the like - what can be more boring? ;-) People don't build such CPU on kitchen tables.

I recently looked for what loop optimizations PPCI does at all, and saw nothing. I'd suggest to start with classic loop optimizations like loop invariant code motions and induction variable optimization.

pfalcon commented 4 years ago

Related: https://github.com/inducer/loopy . "A code generator for array-based code on CPUs and GPUs". Pure-Python. It doesn't mention "polyhedral optimization" specifically, but does some loop munging associated with it (like tiling, etc.).