-
Notifications
You must be signed in to change notification settings - Fork 47
Double support #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ang trying to use integer/fp32 arithmetic for fp64 variables and operations
@@ -0,0 +1,16 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file requires +x.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, see commit 10006c6.
There's also some breakage in the old 'float'-tests in the systemtest. Not sure if it's due to my patch that's applied locally (which also affects f32) or your branch. Did you run compiletest.sh with your branch? |
…ce/src/applibs/LLVMBackend/TCETargetMachine.cc)
I'm trying to run the system tests, but having trouble. What directory should I be in when I execute compiletest.sh? From compiletest.sh:326 and forward it looks like I should either be in the root or in the testsuite subdirectory. Running the script from the testsuite subdirectory I get a quick error on stdout. Running from the root I get errors about not finding tce/tools/scripts/systemtest.py -- but I can see the file is there. |
…by pjaaskel, now I can compile _TCE_ABSD macro
… checking, restored calls to fabs
From root. Note that it doesn't work if you build out of the source tree. You should launch it in the directory where configure.ac is located:
|
OK, I ran from root tce/tools/scripts/compiletest.sh -q -c and got $ tce/tools/scripts/compiletest.sh -q -c
Temp: /tmp/compiletest.tce.7qBMdRM
touch: cannot touch 'systemtest_longlong/bintools/Compiler/denbench_verification.testdesc.disabled': No such file or directory
-------------------------------------------------------------------------------
Current environment (no env files used).
-------------------------------------------------------------------------------
Current revision of tce:tce is be5a08caddb11e113cdb8dafaf774552726b0798.
compile: OK. (11s)
unit tests: OK. (2m17s)
sys tests: tce/tools/scripts/compiletest.sh: line 592: cd: systemtest: No such file or directory
PROBLEMS.FAILED! (0s)
Errors were found during testing. The log compalins about not being able to find |
compiletest.sh should create symlinks to systemtest* dirs under testsuite to the tce root dir. Maybe that part is broken somehow. |
I can see those symlinks. But the file has two sets of |
It doesn't work because ../ under a symlink dir means the parent of the symlinked dir not the symlink location. Confusing enough? :) |
Quite, thank you. :-) Confusing enough that I'm still not sure how to fix it. (I'm not a *NIX newbie, but I kind of feel like one in this context.) |
The strange part is why it works here and has worked for ~10-13y but not there? |
Any suggestions how to debug a |
…the CompileError exception
Does it print anything else than the exception name? If not, you can try hooking llvm-tce to gdb and add breakpoint to the CompileError exception's constructor to see where it's built. The lifetime markers are harmless. If you want to look at the final TTA code, just produce the tpef and use 'tcedisasm' to disassemble it to text. |
No, it doesn't print anything but the exception name. Great suggestion to run llvm-tce in gdb. I can't disassemble the tpef because it fails before it is produced. :-) |
That found it. The error is at
I made a mistake using Also, I had to add an |
Yes, the extern "C" should be added in the lwpr header. We haven't encountered this issue because we rarely compile in C++ mode. The catch belongs to llvm-tce main program. It's not going down there probably because of too tight throws-declarations. |
I can't find any too-restrictive "throws" declarations. Here is the stack I can see from within GDB: (gdb) where
#0 CompileError::CompileError (this=0x8181970, filename=..., linenum=313, procname=..., errorMessage=...) at Exception.cc:1463
#1 0xb53e0e3a in llvm::LLVMTCEIRBuilder::buildTCECFG (this=this@entry=0x80d59d0, mf=...) at LLVMTCEIRBuilder.cc:313
#2 0xb53e39bf in llvm::LLVMTCEIRBuilder::writeMachineFunction (this=0x80d59d0, mf=...) at LLVMTCEIRBuilder.cc:173
#3 0xb53c3977 in llvm::LLVMTCEBuilder::runOnMachineFunction (this=0x80d59d0, mf=...) at LLVMTCEBuilder.cc:871
#4 0xb619137f in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from /usr/local/lib/libLLVM-3.7.1.so
#5 0x0812587c in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?) For now I'm going to catch it in the TCE code before it gets lost back in the LLVM code. |
That's all in TCE code. The llvm namespace is confusing. Thus the interesting site is 1. |
Right, the first 4 lines are in TCE code. But I believe line 4+ are in LLVM code. Then the outer code (application-level and a few layers below) are TCE code again. My best guess is that the exception is getting lost/confused/improperly filtered in the LLVM code somewhere, so it never makes it back to the handler at the TCE application level. I did some greps on the LLVM and TCE code, and I couldn't find any "throws" restrictions in the code path that I'm aware of. But I know little of the code path inside LLVM, so I'll just echo here the command I used in case someone who knows that path can take a look. (in LLVM base directory, just to be safe -- tools is a subdirectory)
$ find . -name "*.h*" -exec grep -Hs throw {} \; For debug purposes I've added a handler in the function on line 3 for the moment. |
Yes, 4 is an LLVM function. I remember there has been a similar issue of not being able to pass the exception through LLVM layers (maybe due to missing RTTI/exception support in libLLVM or another reason). Actually, if you look at the comment in LLVMTCEIRBuilder::doFinalization():
So it's better to surround the buildTCECFG() call also with EXIT_IF_THROWS to avoid the issue. |
I put that macro around the buildTCECFG call and it works as expected. |
Created a dummy pull request, just to have a place to add misc comments to.