Related articles |
---|
[27 earlier articles] |
Re: Undefined Behavior Optimizations in C gah4@u.washington.edu (gah4) (2023-01-20) |
Re: Undefined Behavior Optimizations in C tkoenig@netcologne.de (Thomas Koenig) (2023-01-20) |
Re: Undefined Behavior Optimizations in C Keith.S.Thompson+u@gmail.com (Keith Thompson) (2023-01-20) |
Re: Undefined Behavior Optimizations in C anton@mips.complang.tuwien.ac.at (2023-01-21) |
Re: Undefined Behavior Optimizations in C 864-117-4973@kylheku.com (Kaz Kylheku) (2023-01-22) |
Re: Undefined Behavior Optimizations in C anton@mips.complang.tuwien.ac.at (2023-01-22) |
Re: Undefined Behavior Optimizations in C martin@gkc.org.uk (Martin Ward) (2023-01-23) |
Re: Undefined Behavior Optimizations in C gah4@u.washington.edu (gah4) (2023-01-23) |
Re: Undefined Behavior Optimizations in C dave_thompson_2@comcast.net (2023-01-28) |
From: | Martin Ward <martin@gkc.org.uk> |
Newsgroups: | comp.compilers |
Date: | Mon, 23 Jan 2023 17:12:14 +0000 |
Organization: | Compilers Central |
References: | 23-01-027 <sympa.1673343321.1624.383@lists.iecc.com> 23-01-031 23-01-041 23-01-062 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="74330"; mail-complaints-to="abuse@iecc.com" |
Keywords: | C, optimize |
Posted-Date: | 23 Jan 2023 13:27:46 EST |
On 18/01/2023 13:14, Spiros Bousbouras wrote:
There's no assumption that UB (undefined behaviour) will not happen, both
possibilities are accounted for.
The "assumption that UB will not happen" is shorthand for the idea
that any optimisation is valid if the optimised code is a refinement
of the unoptimised code for all initial states such that UB does not
occur. Equivalently, a proposed optimiation is valid if we represent
UB as "abort" (a statement which can be refined to anything) and the
optimised code is a refinement of the unoptimised code for all initial
states.
--
Martin
Dr Martin Ward | Email: martin@gkc.org.uk | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4
Return to the
comp.compilers page.
Search the
comp.compilers archives again.