[Llvm-bgq-discuss] trouble with latest clang install

Hal Finkel hfinkel at anl.gov
Fri Feb 21 10:52:53 CST 2014


----- Original Message -----
> From: "John A. Biddiscombe" <biddisco at cscs.ch>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: llvm-bgq-discuss at lists.alcf.anl.gov
> Sent: Friday, February 21, 2014 3:24:01 AM
> Subject: RE: [Llvm-bgq-discuss] trouble with latest clang install
> 
> > Interesting. If you're compiling for the IONs you should pass
> > -mllvm -qpx-
> > stack-unaligned (this tells the backend that the stack is only
> > 16-byte aligned,
> > not 32-byte aligned as under CNK -- sorry, I know this is badly
> > named) and
> > either turn off QPX generation with -mno-qpx or force dynamic stack
> > relocation in all functions with -mllvm
> > -ppc-always-use-base-pointer. Unless
> > you really need QPX on the IONs, then I recommend just turning it
> > off
> > because forcing dynamic stack relocation in all functions will slow
> > everything
> > else down.
> 
> Hal
> 
> Thank you. These are good things to know. I'll add these flags to my
> cmake configuration.
> 
> NB. I'm not familiar with the term 'dynamic stack relocation' - does
> this mean that stack is not allocated off the stack, but rather from
> some other memory pool?

No, it means that at the start of every function, a small calculation is done to adjust the stack pointer to have the necessary alignment. This adjusted stack pointer is then used to hold functional-local data. This has two costs: 1) The small calculation costs some cycles and 2) we need to reserve an extra register to hold the original value of the stack pointer (because any stack-based function arguments are located relative to the original stack pointer, not the adjusted one).

 -Hal

> 
> Yours
> 
> JB
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list