Displaying 8 results from an estimated 8 matches for "loadablemodules".
2006 Aug 20
0
[LLVMdev] Weird behavior of llvm-ld
...::desc("Optimizations available:"));
> +
> // Optimization Options
>
> enum OptimizationLevels {
> @@ -72,9 +80,10 @@
> cl::aliasopt(DisableInternalize),
> cl::desc("Alias for -disable-internalize"));
>
> -static cl::list<std::string> LoadableModules("load",
> +//disambiguate with -load option from llvm/Support/PluginLoader.h
> +/*static cl::list<std::string> LoadableModules("load",
> cl::value_desc("path"),
> - cl::desc("Load an optimization module and run it"));
> + cl::desc(&q...
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
2009 Jul 19
2
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
...m::PassInfo&):
> Assertion `Inserted && "Pass registered multiple times!"' failed.
> Aborted
>
> I "fixed" this by replacing the LLVMLIBS line in the Makefile with
> LINK_COMPONENTS according to this tutorial http://llvm.org/docs/MakefileGuide.html#LoadableModules
> and was able to build/run my pass properly.
>
> -shu
>
> On Jul 17, 11:48am, Chuck Zhao <cz... at eecg.toronto.edu> wrote:
>
>> While learning to write LLVM passes and following the precise
>> instructions underhttp://llvm.org/docs/WritingAnLLVMPass.html,
&g...
2009 Jul 19
0
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
...::RegisterPass(const llvm::PassInfo&):
Assertion `Inserted && "Pass registered multiple times!"' failed.
Aborted
I "fixed" this by replacing the LLVMLIBS line in the Makefile with
LINK_COMPONENTS according to this tutorial http://llvm.org/docs/MakefileGuide.html#LoadableModules
and was able to build/run my pass properly.
-shu
On Jul 17, 11:48 am, Chuck Zhao <cz... at eecg.toronto.edu> wrote:
> While learning to write LLVM passes and following the precise
> instructions underhttp://llvm.org/docs/WritingAnLLVMPass.html,
> <http://llvm.org/docs/WritingAnL...
2009 Jul 17
2
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
While learning to write LLVM passes and following the precise
instructions under http://llvm.org/docs/WritingAnLLVMPass.html,
<http://llvm.org/docs/WritingAnLLVMPass.html>
I got this error when loading the hello pass to run the test program:
opt -load ./Release/lib/Hello.so -hello < test/test.bc > /dev/null
Error opening './Release/lib/Hello.so': ./Release/lib/Hello.so:
2006 Aug 16
2
[LLVMdev] Weird behavior of llvm-ld
...rgv=0xbf9fd454, envp=0xbf9fd49c) at
${LLVM_SRC}/tools/llvm-ld/llvm-ld.cpp:467
The exception raised apparently was not caused by the first warning
message, but resulted from the following snippet of
${LLVM_SRC}/tools/llvm-ld/Optimize.cpp (near line 180):
std::vector<std::string> plugins = LoadableModules;
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("RunOptimizati...
2009 Jul 20
0
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
...:
>
> #LLVMLIBS = LLVMCore.a LLVMSystem.a LLVMSupport.a
>
> I guess the tutorial needs some update, as with release 2.5 things might
> have changed a bit.
Yea, I commented out LLVMLIBS at first as well before I came across
the documentation at http://llvm.org/docs/MakefileGuide.html#LoadableModules
. I think LLVMLIBS is supposed to be ignored when compiling a shared
library but somehow isn't. I'm new to LLVM so I could be way off.
Best of luck!
-shu
2006 Aug 16
0
[LLVMdev] Weird behavior of llvm-ld
...fd49c) at
> ${LLVM_SRC}/tools/llvm-ld/llvm-ld.cpp:467
>
> The exception raised apparently was not caused by the first warning
> message, but resulted from the following snippet of
> ${LLVM_SRC}/tools/llvm-ld/Optimize.cpp (near line 180):
> std::vector<std::string> plugins = LoadableModules;
> 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.GetAddres...