Displaying 15 results from an estimated 15 matches for "cantfail".
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...report the original error(s) via
ExecutionSession::reportError (which logs them to stderr by default) and
return a derived error (e.g. failure-to-materialize) to callers. I believe
you're seeing the logged error, and you will see a failure-to-materialize
error if you log the result that reaches cantFail in your example above.
-- Lang.
On Mon, Apr 13, 2020 at 1:18 PM Dibyendu Majumdar <mobile at majumdar.org.uk>
wrote:
> Hi Lang,
>
>
> > > Can you share the specific errors that you're getting back? I would
> recommend replacing
> > >
> > > cantFa...
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...orc::JITTargetMachineBuilder::detectHost();
auto DL = JTMB->getDefaultDataLayoutForTarget();
llvm::orc::IRCompileLayer CompileLayer(ES, ObjectLayer,
llvm::orc::ConcurrentIRCompiler(std::move(*JTMB)));
llvm::orc::MangleAndInterner Mangle(ES, *DL);
ES.getMainJITDylib().setGenerator(
llvm::cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(*DL)));
// ... large part to generate IR code
.
if (llvm::verifyModule(*AST::getModule(), &llvm::errs())) {
return 0;
} else {
std::cout << "Verified success\n";
}
// run the generated IR code
ll...
2019 Jan 07
2
Kaleidoscope tutorial: extern functions failing
...10 kaleidoscope] ./toy
ready> extern sin(x); sin(1);
ready> Read extern:
declare double @sin(double)
ready> ready> Evaluated to 0.841471
ready> extern putchard(x); putchard(120);
ready> Read extern:
declare double @putchard(double)
ready> ready> Failure value returned from cantFail wrapped call
UNREACHABLE executed at ~/project/llvm/include/llvm/Support/Error.h:732!
Aborted (core dumped)
sin is, of course, defined in libm. putchard is declared in my code, per
the tutorial, as
/// putchard - putchar that takes a double and returns 0.
extern "C" DLLEXPORT double put...
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...ss something?
> The BuildingAJIT tutorial series is known to be out of date. I'm hoping to have that fixed by LLVM 11 but there is some feature work that I need to complete first.
>
> Can you share the specific errors that you're getting back? I would recommend replacing
>
> cantFail(callToFailingFunc(...));
>
> with
>
> logAllUnhandledErrors(callToFailingFunc(...), errs(), "callToFailingFunc(...) failed:");
>
Okay thank you - I will do that and report back.
> On Mon, Apr 13, 2020 at 10:06 AM Dibyendu Majumdar <mobile at majumdar.org.uk> wrot...
2019 Mar 22
2
MCJIT, can't use with math functions
...r and MCJIT) I am making the transition
LLVM 6.0 -> 8.0.
It runs fine for self-contained functions, but whenever a jit-ed
function contains calls to the math library (e.g. @cosf) it seems to
have problems getting the address after successfully finding the symbol:
Failure value returned from cantFail wrapped call
UNREACHABLE executed at
~/toolchain/install/llvm-8.0-x86-debug/include/llvm/Support/Error.h:732!
if (auto Sym = CompileLayer.findSymbol(MangledNameStream.str(),true))
{
void* fptr = (void *)cantFail(Sym.getAddress());
The last statement fails with the above message.
Ha...
2020 Apr 13
4
LLVM 10 ORC2 issue with symbol resolution
...documentation seems out of date.
I paste below some code snippets that show what I am doing:
/* global syms is a array mapping names to function addresses */
ES->createJITDylib("<main>");
MainJD = ES->getJITDylibByName("<main>");
MainJD->addGenerator(
cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
DL->getGlobalPrefix())));
auto &JD = *MainJD;
llvm::orc::MangleAndInterner mangle(*ES, *this->DL);
llvm::orc::SymbolMap Symbols;
for (int i = 0; global_syms[i].name != nullptr; i++) {
Symbols.insert({mangle(global_s...
2018 Jun 28
3
Since MCJIT I can't get libm functions to work
... if (auto SymAddr =
llvm::RTDyldMemoryManager::getSymbolAddressInProcess(Name))
return llvm::JITSymbol(SymAddr,
llvm::JITSymbolFlags::Exported);
return llvm::JITSymbol(nullptr);
});
cantFail(CompileLayer.addModule(std::move(M),
std::move(Resolver)));
When running the program I receive the following error:
LLVM ERROR: Program used external function 'cosf' which could not be
resolved!
This is on an Intel i7 CPU with LLVM targets configured as "X86&...
2019 Mar 26
2
ORC JIT fails with standard math librrary
...irst for the symbol "func_ir" and then for the address.
In case the file "func_works.ll" was read the program succeeds with:
symbol found!
address found!
In case the file "func_cos_fails.ll" was read the program fails with:
symbol found!
Failure value returned from cantFail wrapped call
UNREACHABLE executed at
install/llvm-8.0-x86-debug/include/llvm/Support/Error.h:732!
Stack dump:
This was tested on an x86 Linux Ubuntu system.
Does anyone see what's going on or is it time to file a bug report?
Regards,
Frank
-------------- next part --------------
sourc...
2018 Jun 28
2
Since MCJIT I can't get libm functions to work
...:RTDyldMemoryManager::getSymbolAddressInProcess(Name))
>> return llvm::JITSymbol(SymAddr, llvm::JITSymbolFlags::Exported);
>> return llvm::JITSymbol(nullptr);
>> });
>>
>> cantFail(CompileLayer.addModule(std::move(M),
>> std::move(Resolver)));
>>
>> When running the program I receive the following error:
>>
>> LLVM ERROR: Program used external function 'cosf' which could not be resolved!
>>
>> This is on...
2019 Sep 25
4
Questions after playing around with KaleidoscopeJIT (With source files)
...d "CM_Orc", which has a function "int helloOrc()" - "CM_ExternalConstant" has the same function, but a different implementation. (See CM_Orc.cpp and CM_ExternalConstant.cpp) Adding both modules to the JIT will lead to an error message:
"Failure value returned from cantFail wrapped call
UNREACHABLE executed at c:\program files\llvm\include\llvm\support\error.h:708!"
I always thought that in this situation, one of the functions would be renamed...
3.) Loading multiple modules - controlled resolving
Finally I created "CM_PlanschiValue" this file defines...
2017 Aug 06
2
Compile issues with LLVM ORC JIT
...llptr);},[](conststd::string
&Name){if(autoSymAddr=RTDyldMemoryManager::getSymbolAddressInProcess(Name))returnJITSymbol(SymAddr,JITSymbolFlags::Exported);returnJITSymbol(nullptr);});//
Add the set to the JIT with the resolver we created above and a newly//
created
SectionMemoryManager.returncantFail(CompileLayer.addModule(std::move(M),std::move(Resolver)));}JITSymbolfindSymbol(conststd::string
Name){std::string MangledName;raw_string_ostream
MangledNameStream(MangledName);Mangler::getNameWithPrefix(MangledNameStream,Name,DL);returnCompileLayer.findSymbol(MangledNameStream.str(),true);}voidre...
2019 Aug 14
3
ORC v2 question
Hi Lang,
On Tue, 13 Aug 2019 at 23:26, Lang Hames <lhames at gmail.com> wrote:
>> I also get this message:
>> JIT session error: Symbols not found: { raise_error }
>
>
> Ahh -- I see the problem. The DynamicLibrarySearchGenerator is using the getAddressOfSymbol method, which (under the hood) is basically issuing an appropriate dlsym lookup, and that does not find
2019 Jan 23
2
[llvm-pdbutil] : merge not working properly
...;>>> if (File.hasPDBGlobalsStream() && File.getPDBGlobalsStream()) {
>>>> GSIStreamBuilder &builder = this->getGsiBuilder();
>>>> GlobalsStream &stream = *File.getPDBGlobalsStream();
>>>> SymbolStream &SymbolRecords = cantFail(File.getPDBSymbolStream());
>>>>
>>>> for (uint32_t PubSymOff : stream.getGlobalsTable()) {
>>>> CVSymbol Sym = SymbolRecords.readRecord(PubSymOff);
>>>> builder.addGlobalSymbol(Sym);
>>>> }
>>>> }
>>...
2019 Jan 28
3
[llvm-pdbutil] : merge not working properly
....hasPDBGlobalsStream() && File.getPDBGlobalsStream()) {
>>>>>> GSIStreamBuilder &builder = this->getGsiBuilder();
>>>>>> GlobalsStream &stream = *File.getPDBGlobalsStream();
>>>>>> SymbolStream &SymbolRecords = cantFail(File.getPDBSymbolStream());
>>>>>>
>>>>>> for (uint32_t PubSymOff : stream.getGlobalsTable()) {
>>>>>> CVSymbol Sym = SymbolRecords.readRecord(PubSymOff);
>>>>>> builder.addGlobalSymbol(Sym);
>>>>>...
2019 Jan 17
4
[llvm-pdbutil] : merge not working properly
That’s a good question, by default when emitting the object file I choose
COFF but it embeds dwarf and not codeview in the end.. there probably is a
way to do it or at least it must be implemented if not yet..
Lets imagine I manage to do that.. when you say there is nothing to do, I
still must have a PDBFileBuilder to copy the codeview data inside the EXE
PDB right ? I cannot insert them easily in