Displaying 6 results from an estimated 6 matches for "runoptim".
Did you mean:
runopt
2006 Aug 16
2
[LLVMdev] Weird behavior of llvm-ld
...adableModules;
for (std::vector<std::string>::iterator I = plugins.begin(), E =
plugins.end(); I != E; ++I) {
sys::DynamicLibrary dll(I->c_str());
typedef void (*OptimizeFunc)(PassManager&,int);
OptimizeFunc OF = OptimizeFunc(
(intptr_t)dll.GetAddressOfSymbol("RunOptimizations"));
if (OF == 0) {
throw std::string("Optimization Module '") + *I +
"' is missing the RunOptimizations symbol";
}
(*OF)(Passes,OptLevel);
}
The RunOptimizations-symbol is only mentioned briefly in the manual of
llvm-ld:
-load mo...
2006 Aug 16
0
[LLVMdev] Weird behavior of llvm-ld
...:vector<std::string>::iterator I = plugins.begin(), E =
> plugins.end(); I != E; ++I) {
> sys::DynamicLibrary dll(I->c_str());
> typedef void (*OptimizeFunc)(PassManager&,int);
> OptimizeFunc OF = OptimizeFunc(
> (intptr_t)dll.GetAddressOfSymbol("RunOptimizations"));
> if (OF == 0) {
> throw std::string("Optimization Module '") + *I +
> "' is missing the RunOptimizations symbol";
> }
> (*OF)(Passes,OptLevel);
> }
>
> The RunOptimizations-symbol is only mentioned brie...
2006 Aug 16
2
[LLVMdev] Weird behavior of llvm-ld
...n is used to specify a library to be linked with, not for
> dependent symbols your loadable module requires. The loaded module
> must
> be fully linked with all libraries it depends on. So, no, your usage
> isn't correct here.
OK.
>
>> * What's the meaning of RunOptimizations? This name is only
>> mentioned in the code snippet above and in the llvm-ld docs,
>> but nowhere else. Both opt1.so and opt2.so do show up using
>> opt, so it seems there is some incompatibility between opt
>> and
>> llvm-ld....
2006 Aug 18
2
[LLVMdev] Weird behavior of llvm-ld
Hi,
Reid Spencer wrote:
>> That's interesting! So, one only needs to add a 2-arg function called
>> RunOptimizations to the module (can't check it right now)?
>>
>
> That is correct. That function and only that function will be called.
> What happens in that function is up to you :)
>
So, I tried this the last two days, but to no avail. I first wrote the
following three file...
2006 Aug 16
0
[LLVMdev] Weird behavior of llvm-ld
...some
canned optimizations. llvm-link works exclusively with bytecode. Once
you have a final bytecode file you can:
llc -o file.s file.bc # generate native assembly
gcc -S file.s -o file.o
gcc file.o -lwhatever
> That's interesting! So, one only needs to add a 2-arg function called
> RunOptimizations to the module (can't check it right now)?
That is correct. That function and only that function will be called.
What happens in that function is up to you :)
Reid.
2006 Aug 20
0
[LLVMdev] Weird behavior of llvm-ld
...anup passes after the loaded plugins run
to ensure cruft is removed.
See this patch for details:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036882.html
Thanks for the patch! And, yes, you are on the bleeding edge of llvm-ld
usage. I don't think anyone else was using RunOptimizations. You're the
first to comment on it.
Reid.
On Fri, 2006-08-18 at 17:49 +0200, Bram Adams wrote:
> Hi,
>
> Reid Spencer wrote:
> > > That's interesting! So, one only needs to add a 2-arg function called
> > > RunOptimizations to the module (can't c...