[Llvm-bgq-discuss] cnk syscalls

Jeff Hammond jhammond at alcf.anl.gov
Wed Jan 2 12:31:42 CST 2013


My guess is that this is a problem with inline assembly.  Is it
necessary to compile the whole project with LLVM or can you wrap the
SPI calls that use inline assembly in source that you can compile with
GCC?

I'm sure Hal will be able to give you a real solution in the near future.

Jeff

On Wed, Jan 2, 2013 at 12:17 PM, Michael Blocksome <blocksom at us.ibm.com> wrote:
> All,
>
> I've encountered an ICE with clang built from the recent updates (thanks!)
> when I attempt to use certain CNK syscalls.  Has anyone else seen this? Is
> there a workaround?
>
> Here's my code and the clang output:
>
> ====
>
> .../test> cat personality_ice.cc
>
> #include <kernel/location.h>
>
> int main ()
> {
>   Personality_t personality;
>   Kernel_GetPersonality(&personality, sizeof(Personality_t));
>
>   return 0;
> };
>
> .../test> /bghome/blocksom/development/llvm/bgclang++ -ferror-limit=10
> -I../include -I /bgsys/drivers/ppcfloor -I
> /bgsys/drivers/ppcfloor/spi/include -I
> /bgsys/drivers/ppcfloor/spi/include/kernel/cnk -std=c++11 -stdlib=libc++
> -fno-exceptions -v -c personality_ice.cc -o personality_ice.o
> clang version 3.3 (trunk 170456)
> Target: powerpc64-bgq-linux
> Thread model: posix
>  "/bghome/blocksom/development/llvm/install/bin/clang" -cc1 -triple
> powerpc64-bgq-linux -S -disable-free -main-file-name personality_ice.cc
> -static-define -mrelocation-model static -mdisable-fp-elim -fmath-errno
> -ffp-contract=fast -mconstructor-aliases -target-cpu a2q
> -target-linker-version 2.20.51.0.2 -momit-leaf-frame-pointer -v
> -coverage-file /tmp/personality_ice-m3wqVS.s -resource-dir
> /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3 -I ../include
> -I /bgsys/drivers/ppcfloor -I /bgsys/drivers/ppcfloor/spi/include -I
> /bgsys/drivers/ppcfloor/spi/include/kernel/cnk -fmodule-cache-path
> /var/tmp/clang-module-cache -internal-isystem /usr/include/c++/v1
> -internal-isystem /usr/local/include -internal-isystem
> /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
> -internal-externc-isystem /include -internal-externc-isystem /usr/include
> -std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm
> -fdebug-compilation-dir /bghome/blocksom/development/boost-pami/next/test
> -ferror-limit 10 -fmessage-length 231 -mstackrealign -fno-signed-char
> -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -isystem
> /bghome/blocksom/development/llvm/install/libc++/include -isystem
> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6
> -isystem
> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/powerpc64-bgq-linux
> -isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include
> -mllvm -enable-misched -mllvm -enable-aa-sched-mi -mllvm -ilp-window=0 -o
> /tmp/personality_ice-m3wqVS.s -x c++ personality_ice.cc
> clang -cc1 version 3.3 based upon LLVM 3.3svn default target
> powerpc64-unknown-linux-gnu
> ignoring nonexistent directory "/usr/include/c++/v1"
> ignoring nonexistent directory "/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  ../include
>  /bgsys/drivers/ppcfloor
>  /bgsys/drivers/ppcfloor/spi/include
>  /bgsys/drivers/ppcfloor/spi/include/kernel/cnk
>  /bghome/blocksom/development/llvm/install/libc++/include
>  /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6
>
> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/powerpc64-bgq-linux
>  /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include
>  /usr/local/include
>  /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
>  /usr/include
> End of search list.
> Instruction uses an allocated register
> UNREACHABLE executed at
> /bghome/blocksom/development/llvm/src/lib/CodeGen/RegAllocFast.cpp:351!
> 0  clang     0x0000000011f55b1c
> 1  clang     0x0000000011f56924
> 2            0x00000fff962e0418 __kernel_sigtramp_rt64 + 0
> 3  libc.so.6 0x00000080dbd86ef8 abort + 18446744073708064168
> 4  clang     0x0000000011f38df4 llvm::llvm_unreachable_internal(char const*,
> char const*, unsigned int) + 18446744073696340212
> 5  clang     0x00000000118fa8c4
> 6  clang     0x00000000118fb77c
> 7  clang     0x000000001189498c
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&) +
> 18446744073689552652
> 8  clang     0x0000000011edaa98
> llvm::FPPassManager::runOnFunction(llvm::Function&) + 18446744073695968280
> 9  clang     0x0000000011edabdc
> llvm::FPPassManager::runOnModule(llvm::Module&) + 18446744073695968588
> 10 clang     0x0000000011eda60c
> llvm::MPPassManager::runOnModule(llvm::Module&) + 18446744073695967132
> 11 clang     0x0000000011edbf64 llvm::PassManagerImpl::run(llvm::Module&) +
> 18446744073695973428
> 12 clang     0x0000000011edc074 llvm::PassManager::run(llvm::Module&) +
> 18446744073695973684
> 13 clang     0x000000001044851c
> clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
> const&, clang::TargetOptions const&, clang::LangOptions const&,
> llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
> 18446744073668788412
> 14 clang     0x00000000104453f4
> 15 clang     0x00000000105db3d0 clang::ParseAST(clang::Sema&, bool, bool) +
> 18446744073670399680
> 16 clang     0x00000000102a0b50 clang::ASTFrontendAction::ExecuteAction() +
> 18446744073667099648
> 17 clang     0x0000000010443028 clang::CodeGenAction::ExecuteAction() +
> 18446744073668767224
> 18 clang     0x00000000102a1024 clang::FrontendAction::Execute() +
> 18446744073667100756
> 19 clang     0x000000001027ed64
> clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) +
> 18446744073666962340
> 20 clang     0x000000001025f704
> clang::ExecuteCompilerInvocation(clang::CompilerInstance*) +
> 18446744073666839428
> 21 clang     0x0000000010255998 cc1_main(char const**, char const**, char
> const*, void*) + 18446744073666799576
> 22 clang     0x000000001025daf0 main + 18446744073666832256
> 23 libc.so.6 0x00000080dbd6bcf8
> 24 libc.so.6 0x00000080dbd6bef0 __libc_start_main + 18446744073707958816
> Stack dump:
> 0.        Program arguments:
> /bghome/blocksom/development/llvm/install/bin/clang -cc1 -triple
> powerpc64-bgq-linux -S -disable-free -main-file-name personality_ice.cc
> -static-define -mrelocation-model static -mdisable-fp-elim -fmath-errno
> -ffp-contract=fast -mconstructor-aliases -target-cpu a2q
> -target-linker-version 2.20.51.0.2 -momit-leaf-frame-pointer -v
> -coverage-file /tmp/personality_ice-m3wqVS.s -resource-dir
> /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3 -I ../include
> -I /bgsys/drivers/ppcfloor -I /bgsys/drivers/ppcfloor/spi/include -I
> /bgsys/drivers/ppcfloor/spi/include/kernel/cnk -fmodule-cache-path
> /var/tmp/clang-module-cache -internal-isystem /usr/include/c++/v1
> -internal-isystem /usr/local/include -internal-isystem
> /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
> -internal-externc-isystem /include -internal-externc-isystem /usr/include
> -std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm
> -fdebug-compilation-dir /bghome/blocksom/development/boost-pami/next/test
> -ferror-limit 10 -fmessage-length 231 -mstackrealign -fno-signed-char
> -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -isystem
> /bghome/blocksom/development/llvm/install/libc++/include -isystem
> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6
> -isystem
> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/powerpc64-bgq-linux
> -isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include
> -mllvm -enable-misched -mllvm -enable-aa-sched-mi -mllvm -ilp-window=0 -o
> /tmp/personality_ice-m3wqVS.s -x c++ personality_ice.cc
> 1.        <eof> parser at end of file
> 2.        Code generation
> 3.        Running pass 'Function Pass Manager' on module
> 'personality_ice.cc'.
> 4.        Running pass 'Fast Register Allocator' on function '@main'
> clang: error: unable to execute command: Aborted (core dumped)
> clang: error: clang frontend command failed due to signal (use -v to see
> invocation)
> clang version 3.3 (trunk 170456)
> Target: powerpc64-bgq-linux
> Thread model: posix
> clang: note: diagnostic msg: PLEASE submit a bug report to
> http://llvm.org/bugs/ and include the crash backtrace, preprocessed source,
> and associated run script.
> clang: note: diagnostic msg:
> ********************
>
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> clang: note: diagnostic msg: /tmp/personality_ice-hApwmA.cpp
> clang: note: diagnostic msg: /tmp/personality_ice-hApwmA.sh
> clang: note: diagnostic msg:
>
> ********************
>
> ====
>
> Thanks,
> Michael Blocksome
>
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
>



-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond


More information about the llvm-bgq-discuss mailing list