[LLVMdev] [RFC] CGContext skeleton implementation

Dan Gohman dan433584 at gmail.com
Mon Nov 25 16:40:21 PST 2013


Hello llvm-dev,

Following up on the "CodeGen Context" discussion that was started, attached
is patch which implements a pretty minimal skeleton of a CGContext
implementation. The goal is to allow the newly added subtarget attributes
on functions to be made available to codegen so that codegen can actually
switch subtargets within a Module.

Comments and questions are invited herewith.

There has been some disagreement as to what to name this class. I have
stuck with "CGContext" for now, though I'm absolutely not attached to that
name.

It demonstrates where the CGContext state lives, how code can access it (in
X86ISelLowering.cpp), how it reads the attributes from the IR, and how it
gets cached.

One thing that it doesn't yet do is hook up to the target-specific
subtarget feature interpretation. For example, it would need to hook up to
the x86 subtarget code which knows that, for example, sse4.2 implies
sse4.1, and so on. However, I'm sending this out now so that the other
parts of the patch can get some feedback.

Thanks,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131125/97da959c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgcontext.patch
Type: text/x-diff
Size: 7035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131125/97da959c/attachment.patch>


More information about the llvm-dev mailing list