Skip to content

Commit

Permalink
Add section about illegal optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
llvm-beanz committed Feb 22, 2024
1 parent 539e1e2 commit d59c109
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions specs/language/introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@
implementation-defined way. During execution no guarantees are made that all
\gls{lane}s in a \gls{wave} are actively executing.

\Sub{Optimization Restrictions}{Intro.Model.Restrictions}

\p An optimizing compiler may not optimize code generation such that it changes
the behavior of a well-formed program except in the presence of
\textit{implementation-defined} or \textit{unspecified} behavior.

\p The presence of \gls{wave}, \gls{quad}, or \gls{threadgroup} operations
may further limit the valid transformations of a program. Specifically, control
flow operations which result in changing which \gls{lane}s, \gls{quad}s, or
\gls{wave}s are actively executing are illegal in the presence of cooperative
operations if the optimization alters the behavior of the program.

\Sec{\acrshort{hlsl} Memory Models}{Intro.Memory}

\p Memory accesses for \gls{sm} 5.0 and earlier operate on 128-bit slots aligned
Expand Down

0 comments on commit d59c109

Please sign in to comment.