[LLVMbugs] [Bug 3445] New: Making TargetData optional for passes

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 30 09:51:12 PST 2009


           Summary: Making TargetData optional for passes
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Global Analyses
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicolas.geoffray at lip6.fr
                CC: llvmbugs at cs.uiuc.edu

Currently, optimization passes call getAnalysis<TargetData> when they want
architecture specific informations. For llvm-gcc that's OK, because the
generated bitcode is architecture-specific. However, a TargetData should be
optional for languages like eg Java if we want the bitcode result of
optimization passes to continue to be portable.

Doing this involves two things in LLVM passes:

1) Calling getAnalysisIfAvailable<TargetData> instead of
getAnalysis<TargetData>. If no TargetData are specified, getAnalysisIfAvailable
just returns null.

2) Rewriting passes that assume a non-null TargetData (like instcombine) to
only perform TargetData dependant optimizations if the TargetData is available.

Here's the discussion on the list:


Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list