On Jul 22, 2009, at 5:23 PM, Chris Lattner wrote:> > On Jul 22, 2009, at 1:32 PM, Dan Gohman wrote: > >>>> >>>> - A null pointer is associated with no addresses. >>>> >>> >>> A null pointer in address space 0. >> >> I'm not fond of weird address-space semantics, but for consistency >> with what the optimizer is currently doing, you're right. > > FWIW, this will be addressed when we finally get around to adding > explicit support for trappability to load/store.This won't free the optimizer to treat null as an invalid pointer though. Some LLVM hacker thought it would be a good idea to use address spaces 256 and 257 on x86 in a way that can require dereferences of address 0 to be valid. Dan
Hi, Would it be possible to make the following slight change to ExecutionEngine::create()? I would like to be able to disable the automatic enumeration of loaded modules, and the subsequent searching for undefined symbols (using SearchForAddressOfSymbol). I propose adding an extra parameter to the function definition, defaulting to true. static ExecutionEngine *create(ModuleProvider *MP, bool ForceInterpreter = false, std::string *ErrorStr = 0, bool Fast = false, bool EnumModules = true); And corresponding change to the function. ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP, bool ForceInterpreter, std::string *ErrorStr, bool Fast, bool EnumModules) { ExecutionEngine *EE = 0; if (EnumModules) { // Make sure we can resolve symbols in the program as well. The zero arg // to the function tells DynamicLibrary to load the program, not a library. if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr)) return 0; } ... Your help would be appreciated. Rob.
On Jul 22, 2009, at 9:43 PM, Rob Grapes wrote:> Hi, > > Would it be possible to make the following slight change to > ExecutionEngine::create()? > > I would like to be able to disable the automatic enumeration of > loaded modules, and the subsequent searching for undefined symbols > (using SearchForAddressOfSymbol). > > I propose adding an extra parameter to the function definition, > defaulting to true.I'd rather not. The current API is messy enough already. Is there not another way to solve the problem? Evan> > static ExecutionEngine *create(ModuleProvider *MP, > bool ForceInterpreter = false, > std::string *ErrorStr = 0, > bool Fast = false, > bool EnumModules = true); > > And corresponding change to the function. > > ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP, > bool ForceInterpreter, > std::string *ErrorStr, > bool Fast, > bool EnumModules) { > ExecutionEngine *EE = 0; > if (EnumModules) { > // Make sure we can resolve symbols in the program as well. The > zero arg > // to the function tells DynamicLibrary to load the program, not > a library. > if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr)) > return 0; > } > ... > > Your help would be appreciated. > > Rob. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev