Subtarget class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Subtarget class

Dan Gohman
What's the purpose of the TargetSubtarget class? It appears the only users
of getSubtarget are in the target-specific code, where the abstraction is
superfluous.

Is it just a way to encourage targets to follow a nice pattern of keeping
subtarget state in a separate class, or are there grand plans?

Dan

--
Dan Gohman, Cray Inc.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Subtarget class

Chris Lattner
On Mon, 30 Jul 2007, Dan Gohman wrote:
> What's the purpose of the TargetSubtarget class? It appears the only users
> of getSubtarget are in the target-specific code, where the abstraction is
> superfluous.
>
> Is it just a way to encourage targets to follow a nice pattern of keeping
> subtarget state in a separate class, or are there grand plans?

It is just a pattern that we recommend targets to follow.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev