http://llvm.org/bugs/show_bug.cgi?id=3445

           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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090112/072146.html


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to