[LLVMbugs] [Bug 1070] NEW: llvm-upgrade can cause redefinition errors

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Dec 31 14:44:16 PST 2006


           Summary: llvm-upgrade can cause redefinition errors
           Product: tools
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: llvm-upgrade
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rspencer at x10sys.com

Current, llvm-upgrade is not handling redefinition of named values properly.
This invariably is the result of the collapsed type planes. For example, code
that previously defined a value in both the UInt and Int type planes will now
not work because those type planes have merged to just i32. The two values will
appear as redefinitions in the i32 type plane for the same symbol.

One quick thing to help with this is to drop useless bitcasts, like:

%tmp = bitcast i32 %tmp to i32

These result from old signedness conversions where the bitcast used to be:

%tmp = bitcast uint %tmp to int

Such bitcasts can now just be dropped by llvm-upgrade. However, this isn't
sufficient, its still quite possible that code like this:

%tmp = load uint* %uptr
%tmp = load int* %sptr

won't work because it now looks like:

%tmp = load i32* %uptr
%tmp = load i32* %sptr

and a redefinition error occurs. The solution involves tracking the symbol table
in llvm-upgrade and making sure that no re-definitions occur. If they do, a
simple name uniqueness algorithm should be sufficient.

------- 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