[PATCH] D13193: Add an MCTargetMachine and use it to configure MCAsmInfo
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 16:33:31 PDT 2015
dsanders added a comment.
It's really about disconnecting an ambiguous representation of the target (implied by the triple) from the need for an unambiguous representation of the desired target.
The Triple is a representation of the given string and provides some methods to help understand the usual meaning of that string. However, as discussed in 'The Trouble with Triples' thread there are some problems with using the triple as the representation of the target.
The first problem is that the same string can have multiple effective meanings, either as a result of a particular build being configured to use meanings that are not the usual meaning (such as the default CPU/ABI or perhaps specific details being overridden), or as a result of command line processing overriding the default meaning. For this problem we would like our target description to definitively inform the backend how it should behave.
The second is that multiple strings can have the same meaning, either for one of the same reasons, or because they really are synonyms. For this problem we would like to resolve the multiple representations to a single description of the desired behaviour.
MCTargetMachine is trying solve both of these problems. It currently looks like it's only caching values since nothing has begun using the ability to mutate the MCTargetMachine before it's used for the first time. Over the next few weeks, I intend to post patches that will make use of the temporary mutability of MCTargetMachine to resolve various issues with the Mips target particularly in clang-based toolchains that are intended to be drop-in replacements for gcc.
http://reviews.llvm.org/D13193
More information about the llvm-commits
mailing list