Li Bin
2013-Jun-21 12:12 UTC
[LLVMdev] is this a bug of llvm::JIT::getPointerToBasicBlock?
I am reading the implementation of llvm::JIT::getPointerToBasicBlock and I think there might be a bug in it. 'getPointerToBasicBlock' first calls 'getPointerToFunction' and then try to look up the map returned by 'getBasicBlockAddressMap(locked)' to get the pointer of the BasicBlock. 'getPointerToFunction' calls 'runJITOnFunctionUnlocked' which in turn calls 'jitTheFunction'. However, in 'jitTheFunction, there is a statement 'getBasicBlockAddressMap(locked).clear()'. After returning from 'getPointerToFunction', the map is empty. So, you will never get the pointer of the BasicBlock. Is this a bug? Or I should not call the function this way? Bin LI, State Key Laboratory of Computer Architecture, Institute of Computing Technology of Chinese Academy of Sciences, email: richardustc at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130621/bc6ab869/attachment.html>
Seemingly Similar Threads
- [LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
- [LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
- [LLVMdev] lli crashes when running cpp programs
- [LLVMdev] Resolving a function symbol using JIT.
- [LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?