[LLVMdev] [RFC] Add warning capabilities in LLVM.

Chandler Carruth chandlerc at google.com
Mon Jul 22 14:25:02 PDT 2013


On Mon, Jul 22, 2013 at 2:21 PM, Eric Christopher <echristo at gmail.com>wrote:

> >> This is pretty much the same as what Quentin proposed (with the
> addition of the enum), isn't it?
> >>
> >
> > Pretty close yeah.
> >
>
> Another thought and alternate strategy for dealing with these sorts of
> things:
>
> A much more broad set of callback machinery that allows the backend to
> communicate values or other information back to the front end that can
> then decide what to do. We can define an interface around this, but
> instead of having the backend vending diagnostics we have the callback
> take a "do something with this value" which can just be "communicate
> it back to the front end" or a diagnostic callback can be passed down
> from the front end, etc.
>
> This will probably take a bit more design to get a general framework
> set up, but imagine the usefulness of say being able to automatically
> reschedule a jitted function to a thread with a larger default stack
> size if the callback states that the thread size was N+1 where N is
> the size of the stack for a thread you've created.


FWIW, *this* is what I was trying to get across. Not that it wouldn't be a
callback-based mechanism, but that it should be a fully general mechanism
rather than having something to do with warnings, errors, notes, etc. If a
frontend chooses to use it to produce such diagnostics, cool, but there are
other use cases that the same machinery should serve.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130722/15bb2e2e/attachment.html>


More information about the llvm-dev mailing list