aboutsummaryrefslogtreecommitdiffstats
path: root/x86
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-06-25 11:21:31 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2020-06-25 16:58:46 +0200
commit7fe7aabe4bac5a2250f31045797fce663ec65848 (patch)
tree48f2b77bd6f689c1b0be63261c39ce1490982f36 /x86
parentc6b86fd5719388301295f9ab4b07b57653e0d8c6 (diff)
downloadcompcert-kvx-7fe7aabe4bac5a2250f31045797fce663ec65848.tar.gz
compcert-kvx-7fe7aabe4bac5a2250f31045797fce663ec65848.zip
Eliminate known builtins whose result is ignored
A typical example is `(void) __builtin_sel(a, b, c)`. It is safe to generate zero code for these uses of builtins because builtins whose semantics are known to the compiler are pure. Other builtins with side effects (e.g. `__builtin_trap`) are not known and will remain in the compiled code. It is useful to generate zero code for these uses of builtins because some of them (e.g. `__builtin_sel`) must be transformed into proper CminorSel expressions during instruction selection. Otherwise, they propagate all the way to ExpandAsm, causing a "not implemented" error there.
Diffstat (limited to 'x86')
0 files changed, 0 insertions, 0 deletions