search for: bitstreamcursor

Displaying 11 results from an estimated 11 matches for "bitstreamcursor".

2016 Oct 29
2
RFC [Bitcode]: Moving block info block state
Hi all, This is about https://reviews.llvm.org/D26100 That change moves the block info block state from BitstreamReader to BitstreamCursor in order to accommodate multiple block info blocks (the idea is that the cursor would store the block info block state for whichever block info block is active for that cursor). Duncan objected to it on the grounds that we should aim for a design that would continue to allow a shared block info bl...
2016 Nov 01
0
RFC [Bitcode]: Moving block info block state
> On Oct 28, 2016, at 6:00 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: > > Hi all, > > This is about https://reviews.llvm.org/D26100 <https://reviews.llvm.org/D26100> > > That change moves the block info block state from BitstreamReader to BitstreamCursor in order to accommodate multiple block info blocks (the idea is that the cursor would store the block info block state for whichever block info block is active for that cursor). > > Duncan objected to it on the grounds that we should aim for a design that would continue to allow a shared blo...
2016 Nov 01
1
RFC [Bitcode]: Moving block info block state
...> wrote: > >> >> On Oct 28, 2016, at 6:00 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: >> >> Hi all, >> >> This is about https://reviews.llvm.org/D26100 >> >> That change moves the block info block state from BitstreamReader to BitstreamCursor in order to accommodate multiple block info blocks (the idea is that the cursor would store the block info block state for whichever block info block is active for that cursor). >> >> Duncan objected to it on the grounds that we should aim for a design that would continue to allow a sh...
2020 Aug 28
2
End-to-end -fembed-bitcode .llvmbc and .llvmcmd
...ufPtr = BufPtr; if (SkipBitcodeWrapperHeader(FixedBufPtr, EndBufPtr, true)) report_fatal_error("Invalid bitcode wrapper"); return EndBufPtr - BufPtr; } if (!isRawBitcode(BufPtr, EndBufPtr)) report_fatal_error("Invalid magic bytes; not a bitcode file?"); BitstreamCursor Reader(Buffer); Reader.Read(32); // skip signature while (true) { size_t EntryStart = Reader.getCurrentByteNo(); BitstreamEntry Entry = Reader.advance(BitstreamCursor::AF_DontAutoprocessAbbrevs); if (Entry.Kind == BitstreamEntry::SubBlock) { if (Reader.SkipBlock())...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...llvm::MemoryBuffer::getMemBufferCopy (lsr); have same result as invalid bit code. The result of valgrind, effectively, i have invalid reads in the parseBitcodeFile: ==536== Conditional jump or move depends on uninitialised value(s) ==536== at 0x501FE3: llvm::BitstreamCursor::Read(unsigned int) (in /home/willy/blah_test_script/new_blah/simple_scev_dynamic_array) ==536== by 0x501A19: llvm::BitcodeReader::ParseBitcodeInto(llvm::Module*) (in /home/willy/blah_test_script/new_blah/simple_scev_dynamic_array) ==536== by 0x50AEC8: llvm::getLazyBitcodeModule(llvm::MemoryB...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...llvm::MemoryBuffer::getMemBufferCopy (lsr); > > > have same result as invalid bit code. > The result of valgrind, effectively, i have invalid reads in the parseBitcodeFile: > > ==536== Conditional jump or move depends on uninitialised value(s) > ==536== at 0x501FE3: llvm::BitstreamCursor::Read(unsigned int) (in /home/willy/blah_test_script/new_blah/simple_scev_dynamic_array) > ==536== by 0x501A19: llvm::BitcodeReader::ParseBitcodeInto(llvm::Module*) (in /home/willy/blah_test_script/new_blah/simple_scev_dynamic_array) > ==536== by 0x50AEC8: llvm::getLazyBitcodeModule(llv...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...mbjit->getBufferStart() and single step your program to make sure it is not freed, over written somewhere. thx Vikas. ======= On Thu, Mar 20, 2014 at 7:50 AM, Willy WOLFF <willy.wolff at etu.unistra.fr>wrote: > The stack trace is: > (gdb) bt > #0 0x00000000004fa8c8 in llvm::BitstreamCursor::Read(unsigned int) () > #1 0x00000000004fa1d2 in llvm::BitcodeReader:: > ParseBitcodeInto(llvm::Module*) () > #2 0x0000000000503ae9 in llvm::getLazyBitcodeModule(llvm::MemoryBuffer*, > llvm::LLVMContext&) () > #3 0x0000000000503eb6 in llvm::parseBitcodeFile(llvm::MemoryBuffer...
2017 Apr 04
3
RFC: Adding a string table to the bitcode format
On Tue, Apr 4, 2017 at 12:36 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > On 2017-Apr-04, at 12:12, Peter Collingbourne <peter at pcc.me.uk> wrote: > > On Mon, Apr 3, 2017 at 8:13 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> >> On Apr 3, 2017, at 7:08 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: >>
2020 Aug 28
4
End-to-end -fembed-bitcode .llvmbc and .llvmcmd
...r, true)) >> report_fatal_error("Invalid bitcode wrapper"); >> return EndBufPtr - BufPtr; >> } >> >> if (!isRawBitcode(BufPtr, EndBufPtr)) >> report_fatal_error("Invalid magic bytes; not a bitcode file?"); >> >> BitstreamCursor Reader(Buffer); >> Reader.Read(32); // skip signature >> while (true) { >> size_t EntryStart = Reader.getCurrentByteNo(); >> BitstreamEntry Entry = >> Reader.advance(BitstreamCursor::AF_DontAutoprocessAbbrevs); >> if (Entry.Kind == Bitstre...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
I mad the change, and still have the problem. I investigate more the source code of llvm. First, I change isRawBitcode function to print the content of the parameter like this: original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 inline bool isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd) { // These bytes sort
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
...ted: error: Invalid bitcode signature from what I can tell, the bitcode file is correct: 00000000 42 43 c0 de 35 14 00 00 05 00 00 00 62 0c 30 24 |BC..5.......b.0$| ... This seems to match this code: /// Helper to read the header common to all bitcode files. static bool hasValidBitcodeHeader(BitstreamCursor &Stream) { // Sniff for the signature. if (Stream.Read(8) != 'B' || Stream.Read(8) != 'C' || Stream.Read(4) != 0x0 || Stream.Read(4) != 0xC || Stream.Read(4) != 0xE || Stream.Read(4) != 0xD) return false; return true; } I'm out of ide...