search for: findstackdirect

Displaying 3 results from an estimated 3 matches for "findstackdirect".

2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
Thanks very much. I only have one more question, (hopefully), which is, is there a better way of finding the direction of stack growth other than: static bool StackCmp(void *ptr) { volatile int a; return (void *)&a > ptr; } bool FindStackDirection() { volatile int a; return StackCmp((void *)&a); } Preferably one which isn't destroyed by optimization. Thanks again, Daniel 2009/10/16 Chris Lattner <clattner at apple.com> > > On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote: > > Never mind, I used Execu...
2009 Oct 16
3
[LLVMdev] MallocInst/CallInst bitcast,
On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote: > Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and > DisableSymbolSearching to cause malloc and free calls to be handled > by my logging functions. Sorry for the unnecessary list mail. No problem, this is a better way to go. The MallocInst and FreeInst instructions are about to be removed from LLVM IR.
2009 Oct 16
1
[LLVMdev] MallocInst/CallInst bitcast,
...skrev: > Thanks very much. I only have one more question, (hopefully), which > is, is there a better way of finding the direction of stack growth > other than: > > static bool StackCmp(void *ptr) { > volatile int a; > return (void *)&a > ptr; > } > > bool FindStackDirection() { > volatile int a; > return StackCmp((void *)&a); > } > > Preferably one which isn't destroyed by optimization. I suggest you turn the scalars into arrays and make the ptr argument volatile as well. Other ways: If you are careful with tail recursion eliminiation,...