FreeTensor: a free-form DSL with holistic optimizations for irregular tensor programs