It is rarely feasible to achieve a significant fraction of the peak performance of a multicore processor from programs written in general-purpose high-level programming languages like C/C++. Although optimizing compilers have made significant advances in implementing loop transformations, most are based on simple, local-cost models. The use of DSLs and effective domain-specific abstractions enables more global compiler optimization strategies because of the additional semantic information. This talk will present examples of domain-specific compiler optimization for stencil computations.