[LLVMbugs] [Bug 760] NEW: Passes should use getAnalysisToUpdate<TargetData>(), not getAnalysis<TargetData>()
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon May 1 20:54:07 PDT 2006
http://llvm.org/bugs/show_bug.cgi?id=760
Summary: Passes should use getAnalysisToUpdate<TargetData>(), not
getAnalysis<TargetData>()
Product: libraries
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
Currently various passes (e.g. Mem2Reg, instcombine, etc) *require* the presence of a TargetData
instance in the PassManager. If the TargetData instance isn't added when the PM is started up, the pass
manager explodes when these passes are added.
This is badness. Instead, the passes should use getAnalysisToUpdate<TargetData>(), and gracefully
degrade their functionality if a TargetData isn't around. While we're at it, we should rename
getAnalysisToUpdate<> to getAnalysisOrNull<>.
This is useful for tools (e.g. language front-ends) that want to do target-independent transformations
on LLVM bytecodes without tying them to a particular target. This isn't important for the C family of
front-ends.
-Chris
------- 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