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

Eric Christopher echristo at apple.com
Thu Jun 9 13:59:27 PDT 2011


>> 
>> 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.

-eric



More information about the llvm-commits mailing list