Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Raul Silvera <rsilvera <at> google.com>
Subject: Removing ReadOnly from math intrinsics
Newsgroups: gmane.comp.compilers.llvm.devel
Date: Friday 24th January 2014 23:52:10 UTC (over 3 years ago)
In include/llvm/IR/Intrinsics.td there is code to mark sqrt and several
other math intrinsics as "ReadOnly", even though they do not read memory.

According to the comments this was done as an attempt to model changes to
the FP rounding mode. This is too conservative, and unnecessarily blocks
transformations such as commoning and vectorization.

I have heard from others that FP environment changes are not well modeled
on LLVM anyway, so perhaps it is appropriate to just change these from
ReadOnly to ReadNone. Any opinions on this? If there are no objections I'll
prepare a patch.

The alternative would be to develop a mechanism to finely model FP
environment changes; even further, it might be possible to come up with a
unified model of library call side effects, including errno and even I/O.

Thanks,
-- 
 Raúl E. Silvera
 
CD: 3ms