<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Suresh,<br>
<br>
First, may I ask why you're using automatic pool allocation
(APA)? The APA transforms have probably suffered significant
bitrot; I haven't used them much in recent years. APA's current
algorithms for deciding when and where to make pools are a bit
complicated. Depending on your needs, it may make more sense to
morph the current APA code into something that is simpler and
easier to maintain (e.g., a transform that creates global,
context-insensitive pools) than to use it for doing
context-sensitive pool allocation (which requires changing
function signatures which becomes tricky when the program uses
external libraries).<br>
<br>
We've used DSA recently (Fall 2014), so it's in much better
shape. We even have a version of it ported to LLVM 3.7
(<a class="moz-txt-link-freetext" href="https://github.com/jtcriswell/llvm-dsa">https://github.com/jtcriswell/llvm-dsa</a>).<br>
<br>
Second, to answer your question, the reason why you're seeing this
error is because you haven't loaded the DSA libraries into opt.
You need to include additional -load options to opt to load DSA.
I believe the libraries you need to load (in order) are
libAssistDS.so and libLLVMDataStructure.so:<br>
<br>
opt -load AssistDS.so -load LLVMDataStructucture.so -load
poolalloc.so ...<br>
<br>
An alternative to running opt is to build a simple tool which
links in these libraries and runs the needed passes over the
bitcode file (essentially, writing a specialized opt tool just for
running these passes). The pa programs (poolalloc/tools/Pa) is an
outdated example of such a tool.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
On 4/27/16 2:06 AM, Mani, Suresh via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:BY2PR12MB0568C3BCD39C1E55C9C4E042F2640@BY2PR12MB0568.namprd12.prod.outlook.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal">Hi ,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This Is ‘Suresh M’ from AMD compiler team.</p>
<p class="MsoNormal"> </p>
<p class="MsoListParagraph"><span>1)<span>
</span></span>I obtained the source code of llvm and
pool-alloc (relase_32 versions ) using the following
commands,</p>
<p class="MsoListParagraph"> </p>
<p class="MsoListParagraph"><span>svn co
<a class="moz-txt-link-freetext" href="http://llvm.org/svn/llvm-project/llvm/branches/release_32">http://llvm.org/svn/llvm-project/llvm/branches/release_32</a>
llvm</span></p>
<p class="MsoListParagraph"><span>cd llvm/projects</span></p>
<p class="MsoListParagraph"><span>svn co
<a class="moz-txt-link-freetext" href="http://llvm.org/svn/llvm-project/poolalloc/branches/release_32">http://llvm.org/svn/llvm-project/poolalloc/branches/release_32</a>
poolalloc</span></p>
<p class="MsoNormal"> </p>
<p class="MsoListParagraph"><span>2)<span>
</span></span>Was able to build the binaries and libraries</p>
<p class="MsoNormal">
../rel_32/build_rel/projects/poolalloc/Release+Asserts/lib</p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 987956
Apr 15 15:56 AssistDS.a</span></p>
<p class="MsoNormal"><span>-rwxrwxr-x 1 sumani sumani 508376
Apr 15 15:56 AssistDS.so</span></p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 2648
Apr 15 15:56 libcount.a</span></p>
<p class="MsoNormal"><span>-rwxrwxr-x 1 sumani sumani 8539
Apr 15 15:56 libcount.so</span></p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 6514
Apr 15 15:56 libpa_pre_rt.a</span></p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 13526
Apr 15 15:56 libpoolalloc_fl_rt.a</span></p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 26048
Apr 15 15:56 libpoolalloc_rt.a</span></p>
<p class="MsoNormal"><span>-rwxrwxr-x 1 sumani sumani 28731
Apr 15 15:56 libpoolalloc_rt.so</span></p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 1656724
Apr 15 15:56 LLVMDataStructure.a</span></p>
<p class="MsoNormal"><span>-rwxrwxr-x 1 sumani sumani 809363
Apr 15 15:56 LLVMDataStructure.so</span></p>
<p class="MsoNormal"><span>-rw-rw-r-- 1 sumani sumani 1255556
Apr 15 15:56 poolalloc.a</span></p>
<p class="MsoNormal"><span>-rwxrwxr-x 1 sumani sumani 609417
Apr 15 15:56 poolalloc.so</span></p>
<p class="MsoNormal"><span>-rwxrwxr-x 1 sumani sumani 23861
Apr 15 15:56 typechecks_rt.so</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">
../rel_32/build_rel/Release+Asserts/bin // Contains
the llvm binaries</p>
<p class="MsoNormal">
../rel_32/build_rel/Release+Asserts/lib // Contains
the llvm libraries</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoListParagraph"><span>3)<span>
</span></span>Invoking opt as follows,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span>
../rel_32/build_rel/Release+Asserts/bin/opt -load
../rel_32/build_rel/projects/poolalloc/Release+Asserts/lib/poolalloc.so
--help</span></p>
<p class="MsoNormal"> Error opening
../rel_32/build_rel/projects/poolalloc/Release+Asserts/lib/poolalloc.so:
../rel_32/build_rel/projects/poolalloc/Release+Asserts/lib/poolalloc.so:
<b><span>undefined symbol: _ZN4llvm21EquivBUDataStructures2IDE</span></b></p>
<p class="MsoNormal"> -load request ignored.</p>
<p class="MsoNormal"> OVERVIEW: llvm .bc ->
.bc modular optimizer and analysis printer</p>
<p class="MsoNormal"> USAGE: opt [options]
<input bitcode file></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> OPTIONS:</p>
<p class="MsoNormal">
-O1 - Optimization
level 1. Similar to clang -O1</p>
<p class="MsoNormal">
-O2 - Optimization
level 2. Similar to clang -O2</p>
<p class="MsoNormal">
-O3 - Optimization
level 3. Similar to clang -O3</p>
<p class="MsoNormal"> :</p>
<p class="MsoNormal"> :</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Can anyone please do let me know how this
could be resolved.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal">M Suresh</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</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>
<br>
<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>