[PATCH] [DOC] LangRef: Clarify when index of temporaries begin at 0

Sean Silva silvas at purdue.edu
Tue Nov 26 18:54:38 PST 2013


It is correct as written. Unnamed BB's are "unnamed temporaries" from a
counting perspective. If the first BB is unlabeled, then it becomes %0. The
first instruction then becomes %1, etc.

I swear we mention that somewhere in LangRef (I seem to recall reviewing a
patch mentioning that), but if not, a patch mentioning that would be fine.

-- Sean Silva


On Tue, Nov 26, 2013 at 8:50 PM, Mikael Lyngvig <mikael at lyngvig.org> wrote:

> This patch adds the following sentence to the LR after it states that
> temporaries begin at index 0:
>
>    If you do not specify a label for the entry block, the temporaries
> start at index 1 as index
>    0 is then used for an implicit label generated by LLVM.
>
> This because LLC complains when you use %0 as a temporary and there is no
> entry point label in the function.  Then you get an error message, which
> can be quite difficult to figure out why.
>
> If this patch is rejected, somebody should probably phrase the above
> appropriately and submit a new patch.
>
>
> -- Mikael
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131126/3f9a8ce3/attachment.html>


More information about the llvm-commits mailing list