search for: curblock

Displaying 9 results from an estimated 9 matches for "curblock".

2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
..."reserves". ok. > + /// allocateSpace - general-purpose space allocator > Better comments please. :-) Also please end the sentence with a period > or Chris' head will explode. :-) ok, sure, I guess we don't want that :) > unsigned char *result = (unsigned char *)CurBlock+1; > + > + if (Alignment == 0) Alignment = 1; > + result = (unsigned char*)(((intptr_t)result+Alignment-1) & > + ~(intptr_t)(Alignment-1)); > If type of result is intptr_t, you can avoid some of the casting, right? Well, I basically copied that code from the MachineCodeEmitter...
2008 Oct 16
0
[LLVMdev] bug in the JIT global variable emitter
...allocateSpace - general-purpose space allocator >> Better comments please. :-) Also please end the sentence with a >> period >> or Chris' head will explode. :-) > > ok, sure, I guess we don't want that :) > > >> unsigned char *result = (unsigned char *)CurBlock+1; >> + >> + if (Alignment == 0) Alignment = 1; >> + result = (unsigned char*)(((intptr_t)result+Alignment-1) & >> + ~(intptr_t)(Alignment-1)); >> If type of result is intptr_t, you can avoid some of the casting, >> right? > > Well, I basically copied...
2013 Nov 02
2
[LLVMdev] Indirect branching to BasicBlock
...? I tried creating an instance of AllocaInst but I'm not quite sure which type to use. Using block->getType() results in a segmentation fault (Cannot allocate unsized type %myVar = alloca label). Code might help: AllocaInst *myVar = new AllocaInst(blockToStore.getType(), "myVar", curBlock); new StoreInst(&blockToStore, myVar); I guess I should use an integer type to store the address but then LLVM complains about type mismatch as I don not know how to cast the block's label to an integer. I am not sure where to look this up, might be I missed an important part in the docs....
2008 Oct 16
0
[LLVMdev] bug in the JIT global variable emitter
...*allocateSpace(intptr_t Size, unsigned Alignment); + Please capitalize "reserves". + /// allocateSpace - general-purpose space allocator Better comments please. :-) Also please end the sentence with a period or Chris' head will explode. :-) unsigned char *result = (unsigned char *)CurBlock+1; + + if (Alignment == 0) Alignment = 1; + result = (unsigned char*)(((intptr_t)result+Alignment-1) & + ~(intptr_t)(Alignment-1)); If type of result is intptr_t, you can avoid some of the casting, right? Thanks! Evan On Oct 16, 2008, at 8:45 AM, Nuno Lopes wrote: >>> Ok, thanks f...
2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
>> Ok, thanks for the explanation. So my first patch doesn't work. >> Also, to be >> clear, this bug has nothing to do with overflowing the JIT memory >> buffer. >> I made another one that takes keeps the allocation of global >> variables in >> the JIT buffer, but it creates a new mem block if it doesn't exist >> (i.e. >> when dumping a
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...; > > std::map<const Function*, MemoryRangeHeader*> FunctionBlocks; > + std::map<const Function*, MemoryRangeHeader*> TableBlocks; > public: > DefaultJITMemoryManager(); > ~DefaultJITMemoryManager(); > @@ -290,6 +291,28 @@ > FreeMemoryList =CurBlock->TrimAllocationToSize(FreeMemoryList, > BlockSize); > } > > + /// startExceptionTable - Use startFunctionBody to allocate > memory for the > + /// function's exception table. > + unsigned char* startExceptionTable(const Function* F, uintptr_t > &amp...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all, Here's a new patch with Evan's comments (thx Evan!) and some cleanups. Now the (duplicated) exception handling code is in a new file: lib/ExecutionEngine/JIT/JITDwarfEmitter. This patch should work on linux/x86 and linux/ppc (tested). Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jit-exceptions.patch URL:
2013 Nov 02
0
[LLVMdev] Indirect branching to BasicBlock
...AllocaInst but I'm not > quite sure which type to use. Using block->getType() results in a > segmentation fault (Cannot allocate unsized type %myVar = alloca label). > > Code might help: > > AllocaInst *myVar = new AllocaInst(blockToStore.getType(), "myVar", > curBlock); > new StoreInst(&blockToStore, myVar); > > I guess I should use an integer type to store the address but then LLVM > complains about type mismatch as I don not know how to cast the block's > label to an integer. I am not sure where to look this up, might be I > missed an...
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
...RegisterInfo *tri); > + > + /// Perform the CFG preparation > + bool prepare(FuncT &Func, PassT &Pass, const AMDILRegisterInfo *tri); > + > +private: > + void orderBlocks(); > + void printOrderedBlocks(llvm::raw_ostream &OS); > + int patternMatch(BlockT *CurBlock); > + int patternMatchGroup(BlockT *CurBlock); > + > + int serialPatternMatch(BlockT *CurBlock); > + int ifPatternMatch(BlockT *CurBlock); > + int switchPatternMatch(BlockT *CurBlock); > + int loopendPatternMatch(BlockT *CurBlock); > + int loopPatternMatch(BlockT *CurBloc...