[Llvm-bgq-discuss] qpxintrin.h not compatible with asm files
Hal Finkel
hfinkel at anl.gov
Fri Jun 21 11:44:37 CDT 2013
Tom,
Thanks for pointing this out. We should probably also check the input file type; I'll add that.
-Hal
----- Original Message -----
>
>
>
> Hi,
>
> I'm not sure if this is a known issue, but it appears that
> qpxintrin.h is included when the source file is assembly run through
> the C preprocessor. Digging around a bit, i'd guess there should be
> an additional check somewhere in
> src/tools/clang/lib/Frontend/CompilerInvocation.cpp to prevent the
> include. But i'm not quite sure what it should be:
>
> // FIXME: Should be check target arch. also? if
> (Args.getLastArgValue(OPT_target_cpu) == "a2q" &&
> !Args.hasArg(OPT_mno_qpx)) Opts.Includes.push_back("qpxintrin.h");
> I was able to workaround by adding -D_QPXINTRIN_H_INCLUDED to my
> build.
>
> Example:
>
> [tgooding at bgqfen6 src]$ cat foo.S // foo [tgooding at bgqfen6 src]$
> /bghome/tgooding/llvm/r184137-20130617/bin/bgclang -c foo.S
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:
> Assembler messages:
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:27:
> Error: Unrecognized opcode: `typedef'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:33:
> Error: Unrecognized opcode: `static'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:34:
> Error: Unrecognized opcode: `vec_ld'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:35:
> Error: Unrecognized opcode: `return'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:36:
> Error: junk at end of line, first unrecognized character is `}'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:38:
> Error: Unrecognized opcode: `static'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:39:
> Error: Unrecognized opcode: `vec_lda'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:40:
> Error: Unrecognized opcode: `return'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:41:
> Error: junk at end of line, first unrecognized character is `}'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:43:
> Error: Unrecognized opcode: `static'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:44:
> Error: Unrecognized opcode: `vec_ld'
> /bghome/tgooding/llvm/r184137-20130617/bin/../lib/clang/3.4/include/qpxintrin.h:45:
> Error: Unrecognized opcode: `return' .... many more errors ....
>
> Thanks!
> Tom
>
> Tom Gooding
> Senior Engineer / Blue Gene Kernels
> 507-253-0747 (internal: 553-0747)
>
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-bgq-discuss
mailing list