[LLVMdev] LLVM Loop Vectorizer

Nadav Rotem nrotem at apple.com
Fri Oct 5 09:48:20 PDT 2012

On Oct 5, 2012, at 12:08 AM, Nick Lewycky <nicholas at mxc.ca> wrote:

> I absolutely think that we should have something like TargetData (now DataLayout) but for the vector types and operations. However, I'm not familiar with "Target Lowering Interface". Could you explain?

I agree. Once we make the codegen accessible to the IR-level passes we need to start talking about the right abstraction. I have some ideas, but I wanted to start the discussion after we are done with the first phase. 

Regarding TLI.  So, DAGCombine, CodeGenPrepare, LoopReduce all use the TLI interface which can answer questions such as "is this operation supported ?" or "is this type legal".   This is a subset of what we need in a vectorized. We can discuss other requirements that the vectorizer may have after we finish with the first phase.  I suspect that we may have to refactor some functionality out of TLI.  

> Currently TLI is only available in LLC. I suggest that we merge LLC and OPT into a single tool that will drive both IR-level passes and the codegen.
> This really shouldn't be necessary. Notably, it is still possible today to build a Module and optimize it without having decided what target you're targeting.

I agree that it is not necessary for many optimizations.  However, this is absolutely needed for lower-level transformations such as strength reduction.  So, I plan to keep the current behavior that OPT has where if a target information is not provided through the command line then TargetData is kept uninitialized (null pointer). So, as far as IR-level passes go, nothing is going to change.

> Nick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121005/cc918739/attachment.html>

More information about the llvm-dev mailing list