[llvm-commits] [llvm] r132676 - in /llvm/trunk: lib/CodeGen/SelectionDAG/FastISel.cpp test/CodeGen/X86/fast-isel-agg-constant.ll

Jim Grosbach grosbach at apple.com
Thu Jun 9 14:03:38 PDT 2011


On Jun 9, 2011, at 1:59 PM, Eric Christopher wrote:

>>> 
>>> The thing is that in MCExpr there's absolutely nothing related to triples etc.
>>> It's just a pure container for an expression. Nothing from the outside world
>>> is there :)
>>> 
>>> Thats why I introduced the two new variant kinds, to distinguish the two
>>> dialects.
>> 
>> Yeah. It's a bit of an ugly solution, but it's pretty much necessary for now. IIRC, there are precedent examples of the same thing in there. We really need a target-hook that has access to the triple level information for this sort of thing, but there's no such beast right now.
> 
> Which is why I was mentioning using the subtarget. While MCExpr there isn't anything related to targets - at some point we need to know the subtarget to know how to emit relocation/expression information for assembly. There's absolutely no reason why we need two/multiple variants for each way that we'd like to print out a relocation/expression.

The subtarget is part of the codegen layer. It's not available to MC*.

I completely agree there shouldn't need to be multiple variants. MC does not currently have any other way to express this, however.

-Jim

* There are a few places this layering is broken. Those need to be removed, but it's a Big Deal(tm) to make that happen.



More information about the llvm-commits mailing list