<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 8/9/17 1:23 PM, Siddharth Bhat via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CAPipc=0ekdysDmKE-2fJjmxXUu9EfGT4PMh-fSgAVmKdrJDHAw@mail.gmail.com"
type="cite">
<div dir="ltr">As the question asks. IIRC, I have only seen
constants use to:
<div><br>
</div>
<div>1. setup globals</div>
<div>2. as "constant parameters" to instructions. </div>
<div><br>
</div>
<div>In both these cases, from what I understand, they will have
a single use. Is it possible to create a Constant with
multiple use(r)s?</div>
</div>
</blockquote>
<br>
I am nearly positive that constants can be used more than once.
They subclass from Value. I am sure that you can create a test
program that uses the same constant value in different places and
see if it generates one ConstantInt or multiple ConstantInts for the
same constant integer.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:CAPipc=0ekdysDmKE-2fJjmxXUu9EfGT4PMh-fSgAVmKdrJDHAw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Thanks,</div>
<div>Siddharth</div>
</div>
<div dir="ltr">-- <br>
</div>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">Sending this from my phone, please excuse any
typos!</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>