search for: fnptr

Displaying 5 results from an estimated 5 matches for "fnptr".

2016 Jun 14
2
Calling a null pointer. How undefined it is?
Hi all: This question is related to a state machine generated by LLVM for a coroutine. I stripped all coroutine related details to get to the essence of the question. Let's say I have a state machine that looks like this: struct State { FnPtr Fn; State() : Fn(&SomeFunction) {} void Go() { (*Fn)(); } void Stop() { Fn = nullptr; } bool IsDone() { return Fn == nullptr; } }; Fn field serves two purposes: * Cheap check for done. What can be better than compare with zero! * Guard against programmer mistake: accidental...
2014 Oct 24
2
[LLVMdev] Recent changes in -gmlt break sample profiling
...ld be a problem for us. Thanks. Diego. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141024/b11ce92f/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: fnptr-clang36.bad.dwarfdump Type: application/octet-stream Size: 4212 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141024/b11ce92f/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: fnptr-clang34.good.dwarfdu...
2007 May 27
2
[LLVMdev] New LLVMBuilder api
...u can tell it where to insert all subsequently created instructions. This means you end up writing code like this: LLVMBuilder B; B.SetInsertPoint(<where-ever>); Value *V1 = B.CreateAdd(a, b, "tmp"); Value *V2 = B.CreateMul(V1, c, "whatever"); Value *V3 = B.CreateCall(FnPtr, V1, V2); ... The name strings are c strings, are always at the end of the argument list, and are always optional. This API is simple and consistent, which makes it easy to understand. It would also be really easy to build a C api for it, if someone is interested (hint hint :), -Chris --...
2016 Jun 08
12
Intended behavior of CGSCC pass manager.
Hi Chandler, Philip, Mehdi, (and llvm-dev,) (this is partially a summary of some discussions that happened at the last LLVM bay area social, and partially a discussion about the direction of the CGSCC pass manager) A the last LLVM social we discussed the progress on the CGSCC pass manager. It seems like Chandler has a CGSCC pass manager working, but it is still unresolved exactly which
2016 Jun 20
2
[GSoC 2016] [Weekly Status] Interprocedural Register Allocation
On Mon, Jun 20, 2016 at 12:54 AM, vivek pandya <vivekvpandya at gmail.com> wrote: > Dear Professor, > > Thanks to bring this to notice, I tried out a simple test case with > indirect function call: > > int foo() { > return 12; > } > > int bar(int a) { > return foo() + a; > } > > int (*fp)() = 0; > int (*fp1)(int) = 0; > > int main() { >