[llvm-commits] [llvm] r135438 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/MC/ include/llvm/Target/ lib/CodeGen/AsmPrinter/ lib/ExecutionEngine/JIT/ lib/MC/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/Blackfin/ lib/Target/Cel

Evan Cheng evan.cheng at apple.com
Tue Jul 19 11:24:37 PDT 2011


On Jul 19, 2011, at 10:50 AM, Anton Korobeynikov wrote:

> Hi Evan,
> 
>> Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
>> better location welcome).
> Any reasons for this? For me it seems that you're moving everything
> our of Target* stuff into MC* which does not look better :)

MC layer is not allowed to access CodeGen or Target. Currently we have a significant layering issue in MC. TargetAsmInfo is the worst offender. I'll moving stuff out one step at a time.

There is another design issue in we are using virtual functions too freely when in fact a lot of target information can be initialized early. The Target layers are designed such a way where only one instance can be created at a time. By moving stuff into MC we can now create multiple instances and switch between them. This patch is obviously not a good example. See MCSubtargetInfo instead and how we are using it to implement .code directives.

> 
> PS: And yes, initial frame state definitely does not belong to asm
> info. Maybe there should be something like MCFrameInfo then?

Later, if it's deemed necessary. We have a way to go still.

Evan

> -- 
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University




More information about the llvm-commits mailing list