[LLVMbugs] [Bug 759] NEW: TargetData should be optional

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon May 1 20:49:48 PDT 2006


           Summary: TargetData should be optional
           Product: libraries
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Target Description Classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org

Right now, TargetData works differently than all of the other Target* classes: instead of 
Target::getTargetData() being a virtual method, it returns the instance of TargetData that is 
*embedded* into the TargetMachine class.  This has several (bad) implications:

1. The ctor to TargetMachine is really complex, taking all of the arguments TargetData does.
2. A TargetData is always required to be around.  Consider the case when you have a Module without 
any target info: currently we default to creating a SparcV9 TargetData, for hysterical raisons.
3. Extending TargetData is hard to do, because all the targets have to be touched.

In practice, all targets have to provide TargetData, but they should be allowed to provide it like they do 
all of the other Target* interfaces.

I will add some other bugs that depend on this.


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list