Lawrence, Peter via llvm-dev
2016-Jul-19 01:13 UTC
[llvm-dev] RFC: Strong GC References in LLVM
> Hi all,>>> 2. Introduce a flag on load and stores that either> a. Denotes a "gc_safety" control dependence.> b. Denotes a "blackbox_safety" control dependence. In this case> we will probably have some optional metadata on loads and> stores to indicate that the control dependence is actually on> GC safety.>>> Suggested name for 2b: "unsafe" or "predicated". Essentially, that the> load is not generally safe to do even if the *memory* is generally safe> to load from because of some external effect.Sounds like "volatile" to me ... --Peter Lawrence. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160719/7592a2f6/attachment.html>
Sanjoy Das via llvm-dev
2016-Jul-19 01:16 UTC
[llvm-dev] RFC: Strong GC References in LLVM
Hi Peter, On Mon, Jul 18, 2016 at 6:13 PM, Lawrence, Peter via llvm-dev <llvm-dev at lists.llvm.org> wrote:>> Suggested name for 2b: "unsafe" or "predicated". Essentially, that the > >> load is not generally safe to do even if the *memory* is generally safe > >> to load from because of some external effect. > > Sounds like “volatile” to me …volatile accesses can't be sunk (i.e. changed to execute in a subset of the cases it would have executed in the original program) or elided (e.g. if the result of the load is unused), but both of these are valid for gc references. -- Sanjoy
Lawrence, Peter via llvm-dev
2016-Jul-19 01:52 UTC
[llvm-dev] RFC: Strong GC References in LLVM
> > > > Sounds like “volatile” to me …> volatile accesses can't be sunk (i.e. changed to execute in a subset of the cases it would have executed in the original > > program) or elided (e.g. if the result of the load is unused), but both of these are valid for gc references.> -- SanjoySanjoy, Thanks. So it sounds "volatile"-ish, is it conceptually possible to spell out its semantics in detail ? if so then it might sound like a (yet another) attribute "like" volatile. IE basically I'm agreeing with #2, and you don't need to spell it out in detail just for my sake, I'm really asking "can it be spelled out in detail" when it comes to documenting the IR, such that someone writing an optimization pass will be able to do the right thing. --Peter.