search for: bcreader

Displaying 20 results from an estimated 39 matches for "bcreader".

2011 Mar 05
1
[LLVMdev] llvm-config example need update
Hi This llvm-config --libs engine bcreader scalaropts <http://llvm.org/cmds/llvm-config.html> in website http://llvm.org/cmds/llvm-config.html But actually bcreader components is not there anymore. The new name of it is bitreader. I thinks this webpage may need to update and also. If i do "llvm-config --help". It will als...
2007 Dec 26
2
[LLVMdev] Instantiating modules from .bc files
...-gcc and actually use it in another program. I tried to get a module out of a file that I'd read in to it using this code: MemoryBuffer* memBuf = MemoryBuffer::getFile(filename, sizeof filename, &errStr); printf("errStr: %s\n", errStr.c_str()); BitcodeReader::BitcodeReader bcReader(memBuf); Module* Mod = bcReader.materializeModule(&errInfo); printf("errInfo: %s\n", errInfo.c_str()); verifyModule(*Mod, PrintMessageAction); The errStr and the errInfo strings were empty, but I got a crash on the verifyModule call. The filename was produced by running "ll...
2009 Jun 07
3
[LLVMdev] reading untrusted bitcode
...in an illegal type like [5 x void] and without assertions enabled, this actually gets created in the IR. Also, the verifier doesn't check for these, assuming that illegal types must have come in through the C++ API. Whose responsibility is it supposed to be to check types for legality? The BCReader? Or perhaps the verifier? Nick
2007 Dec 27
1
[LLVMdev] Instantiating modules from .bc files
...ried to get a module out of a file that I'd read in to it using >> this code: >> >> MemoryBuffer* memBuf = MemoryBuffer::getFile(filename, sizeof >> filename, &errStr); >> printf("errStr: %s\n", errStr.c_str()); >> BitcodeReader::BitcodeReader bcReader(memBuf); >> Module* Mod = bcReader.materializeModule(&errInfo); >> printf("errInfo: %s\n", errInfo.c_str()); >> >> verifyModule(*Mod, PrintMessageAction); >> >> The errStr and the errInfo strings were empty, but I got a crash >> on the ver...
2007 Dec 26
0
[LLVMdev] Instantiating modules from .bc files
...functionality. > I tried to get a module out of a file that I'd read in to it using > this code: > > MemoryBuffer* memBuf = MemoryBuffer::getFile(filename, sizeof > filename, &errStr); > printf("errStr: %s\n", errStr.c_str()); > BitcodeReader::BitcodeReader bcReader(memBuf); > Module* Mod = bcReader.materializeModule(&errInfo); > printf("errInfo: %s\n", errInfo.c_str()); > > verifyModule(*Mod, PrintMessageAction); > > The errStr and the errInfo strings were empty, but I got a crash on > the verifyModule call. Try this:...
2009 Jun 07
0
[LLVMdev] reading untrusted bitcode
On Sat, Jun 6, 2009 at 6:32 PM, Nick Lewycky<nicholas at mxc.ca> wrote: > Whose responsibility is it supposed to be to check types for legality? > The BCReader? Or perhaps the verifier? It's pretty easy to resolve using the rule "assertions should never trigger": if the bitcode reader triggers an assertion, it's a bug in the bitcode reader. -Eli
2006 Dec 01
0
[LLVMdev] Breaking Bytecode Bridges
...y. The tool will be named llvm-upgrade and used something like this: llvm-1.9/bin/llvm-dis < 1.9.bc | llvm-2.0/bin/llvm-upgrade | llvm-2.0/bin/llvm-as -o 2.0.bc The 2.0 assembly and bytecode are going to be significantly different and this approach offers us a clean slate for implementing the bcreader and asmparser. Additionally, much of the upgrade code would significantly slow down and congest the current implementation. By placing all that logic in a single tool, we provide an upgrade path while also providing the most efficient bcreader and asmparser possible in 2.0. The question is, when c...
2006 Mar 22
2
[LLVMdev] Virtual "components" for llvm-config
...ude: all: Include all LLVM libraries. backend: Include either a working native backend or cbackend. engine: Include a working subclass of ExecutionEngine, either the JIT or interpreter. You could, for example, get a typical set of JIT-related libs using: $ llvm-config --libs engine bcreader scalaropts Of course, the exact names and details are up to you folks. :-) But if you're building a project outside the LLVM tree, please let me know what I can do to make your life easier. Cheers, Eric
2004 Jan 08
2
[LLVMdev] bytecode documentation?
Is there any documentation of the llvm bytecode format? I looked around the website but didn't see any; did I miss some obvious document? Thanks a bunch. --Grant
2004 Jan 08
0
[LLVMdev] bytecode documentation?
...bytcode format. I believe one LLVM user was working on such a document at one time, but if so, it is not complete. One option (although not ideal) is to examine the source code. I believe llvm/lib/Bytecode/Reader is where you would want to start. If all you need to do is read LLVM bytecode, the bcreader library (in llvm/lib/Bytecode/Reader) should suffice. If you want to extend the format, then more serious source code reading will be required. Sorry we don't have anything better right now. > > Thanks a bunch. > --Grant > _______________________________________________ > LLV...
2005 Aug 10
1
[LLVMdev] ValueTy not set appropriately in Value.h?
...of ConstantExpr 00148 ConstantAggregateZeroVal, // This is an instance of ConstantAggregateNull 00149 SimpleConstantVal, // This is some other type of Constant 00150 InstructionVal, // This is an instance of Instruction 00151 ValueListVal // This is for bcreader, a special ValTy 00152 }; 00153 unsigned getValueType() const { 00154 return SubclassID; 00155 } -mike -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/blog/
2006 Mar 23
2
[LLVMdev] Virtual "components" for llvm-config
...IR -> machine code). What would you include in each set? > There are > probably a few other categories, for example utilities that only mess > with passes (e.g. opt, LLVM bc -> LLVM bc). In many of these cases, you can just ask for the components you need: $ llvm-config --libs bcreader bcwriter scalaropts I think this is pretty reasonable. Do you think we need to provide short aliases for all these combinations, or can we just let the user specify them manually? "Virtual" components are quite useful, though, when (a) the exact set of libraries needed varies by p...
2006 Mar 23
0
[LLVMdev] Virtual "components" for llvm-config
...aries. > backend: Include either a working native backend or cbackend. > engine: Include a working subclass of ExecutionEngine, either the > JIT or interpreter. > > You could, for example, get a typical set of JIT-related libs using: > > $ llvm-config --libs engine bcreader scalaropts > > Of course, the exact names and details are up to you folks. :-) But > if you're building a project outside the LLVM tree, please let me > know what I can do to make your life easier. > > Cheers, > Eric > > ________________________________________...
2007 Apr 11
2
[LLVMdev] ideas for TLS implementation
...ot;general dynamic") that works in all situations. The other three models are optimizations of the first. So, I think we should start implementing the "general dynamic" model. I believe the roadmap is: 1. make LLVM understand "thread_local" keyword. (AsmParser, AsmWriter, BCReader, BCWriter) 2. make llvm-gcc emit "thread_local" keyword 3. implement "thread_local" in C backend (model independent) 3. implement "general dynamic" tls model for i386-linux-gnu 4. implement "general dynamic" tls model for arm-linux-gnueabi (this is more compl...
2004 Aug 24
4
[LLVMdev] More Encoding Ideas
...se the memory failure rates were so high (think vacuum tubes). > Thus, (and I'm guessing here), you guys decided to treat char > strings as a special case to save space in the bytecode file. Actually, LLVM doesn't really treat character strings specially EXCEPT in the bcwriter and bcreader. There is no notion in LLVM of a "string", just primitive types and arrays of them. It is up to the front end compiler to define what it means by a "string". In the bytecode libraries of LLVM, we chose to interpret "[n x ubyte]" and "[n x sbyte]" as "str...
2004 Aug 26
0
[LLVMdev] More Encoding Ideas
...mmonly used ASCII symbols are above 0x30. > > Thus, (and I'm guessing here), you guys decided to treat char > > strings as a special case to save space in the bytecode file. > >Actually, LLVM doesn't really treat character strings specially EXCEPT >in the bcwriter and bcreader. There is no notion in LLVM of a "string", >just primitive types and arrays of them. It is up to the front end >compiler to define what it means by a "string". In the bytecode >libraries of LLVM, we chose to interpret "[n x ubyte]" and "[n x sbyte]"...
2004 Aug 10
0
[LLVMdev] API on JIT, code snippets
...L/usr/local/lib -L/usr/local/lib -o reid reid.o /usr/local/lib/lli-interpreter.o /usr/local/lib/lli-jit.o /usr/local/lib/codegen.o /usr/local/lib/executionengine.o /usr/local/lib/x86.o /usr/local/lib/selectiondag.o /usr/local/lib/scalaropts.o -lanalysis -ltransformutils /usr/local/lib/bcreader.o /usr/local/lib/vmcore.o /usr/local/lib/support.o -ltarget -export-dynamic -ldl (don't ask me why some modules are left as .o) Well. Compiled. Tested. Infinite loop in: GenericValue gv = EE->runFunction(FooF, noargs); you were really, really close, Reid, just a one mistake: < Ca...
2006 Mar 23
0
[LLVMdev] Virtual "components" for llvm-config
...hat task right now. > > > There are > > probably a few other categories, for example utilities that only mess > > with passes (e.g. opt, LLVM bc -> LLVM bc). > > In many of these cases, you can just ask for the components you need: > > $ llvm-config --libs bcreader bcwriter scalaropts > > I think this is pretty reasonable. Yup. > Do you think we need to provide > short aliases for all these combinations, or can we just let the user > specify them manually? I think just using the "long hand" is fine for now. If it becomes cumbe...
2007 Jan 31
1
[LLVMdev] Bytecode Change: Compaction Tables gone.
...action tables for both reading and writing. Second, the maximum benefit we gained was about 7% (600K a 9Mb bytecode). In most cases its in the 1% range or actually makes the bytecode larger. Finally, as we prepare for the bitcode format, it helps us to simplify the existing bytecode format and the bcreader/bcwriter code. Compaction tables were a significant complexity in that code. Reid.
2007 Mar 29
0
[LLVMdev] compile error with HowToUseJIT
...llowing command in the directory /usr/home/x/llvm1.9/examples/HowToUseJIT : gmake ENABLE_OPTIMIZED=0 It stops after producing object files (.o) without comment. When I enter the following (from the documentation): g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o `llvm-config --libs engine bcreader scalaropts` I get: HowToUseJIT.o(.gnu.linkonce.t._ZN44_GLOBAL__N_HowToUseJIT.cpp_DD76033A_C9DF05AB23ForceInterpreterLinkingC1Ev+0x1e): In function `(anonymous namespace)::ForceInterpreterLinking::ForceInterpreterLinking()': /usr/home/x/llvm1.9/include/llvm/ModuleProvider.h:71 undefined refere...