LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 2480 - improve assembler syntax for nameless values
Summary: improve assembler syntax for nameless values
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: unspecified
Hardware: Other Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-21 15:11 PDT by Duncan Sands
Modified: 2008-08-29 12:20 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Sands 2008-06-21 15:11:59 PDT
The assembler is hard to read when values have no names.  Here's what it
looks like currently:

        call i8* @f( i32 0 )            ; <i8*>:0 [#uses=1]
        call void @g( i8* %0 )

How about changing it to this:

        %0 = call i8* @f( i32 0 )            ; <i8*> [#uses=1]
        call void @g( i8* %0 )

?

So in the assembler %0 would act like a name for the purpose
of assembling, but internally no name would be assigned to the
value (so the value might be written out to assembler later as
%1 or some other number).
Comment 1 Chris Lattner 2008-06-21 15:15:02 PDT
I agree.  I think what we basically want is for the "%4 = " to be optional, but for the assembler to verify that it matches up with the numbering the instruction would otherwise get.  This is primarily to make dumps more readable, not to make writing .ll files easier.