[llvm-commits] [llvm-gcc-4.2] r43399 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Bill Wendling isanbard at gmail.com
Tue Nov 6 16:06:27 PST 2007


On 10/26/07, Duncan Sands <baldrick at free.fr> wrote:
> > I've only seen this problem on PPC64. In particular, it's writing this
> > information into the "redzone" because this is a leaf function, and
> > thus the destination may be unaligned.
>
> Can you please send me the gcc tree dumps, and also what debug_tree
> gives for the modify_expr.
>
Here's the debug_tree:

Breakpoint 1, TreeToLLVM::EmitMODIFY_EXPR (this=0xbfffe998,
exp=0x40d11e70, DestLoc=0x0) at
/Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/\
src/gcc/llvm-convert.cpp:3024
(gdb) p debug_tree(exp)
 <modify_expr 0x40d11e70
    type <void_type 0x40d0f880 void VOID
        align 8 symtab 1 alias set -1
        LLVM:  void
        pointer_to_this <pointer_type 0x40d0f900>>
    side-effects
    arg 0 <var_decl 0x40d7e180 Bar
        type <array_type 0x40d7e100 type <integer_type 0x40d05300 char>
            sizes-gimplified BLK
            size <integer_cst 0x40d11cc0 constant invariant 88>
            unit size <integer_cst 0x40d00f60 constant invariant 11>
            align 8 symtab 3 alias set -1 domain <integer_type 0x40d7e080>
            LLVM:  [11 x i8]>
        used asm-frame-size 0 BLK file testcase.c line 2 size
<integer_cst 0x40d11cc0 88> unit size <integer_cst 0x40d00f60 11>
        align 8 context <function_decl 0x40d74e80 Qux>
        LLVM: [11 x i8]* %Bar>
    arg 1 <var_decl 0x40d7e280 C.0 type <array_type 0x40d7e100>
        readonly asm_written used static ignored asm-frame-size 0 BLK
file testcase.c line 2 size <integer_cst 0x40d11cc0 88> unit size
<integer_cst 0x\
40d00f60 11>
        align 64 context <function_decl 0x40d74e80 Qux> initial
<constructor 0x40d11db0>
        LLVM: [11 x i8]* @C.0.1173 chain <var_decl 0x40d7e180 Bar>>
    testcase.c:2>
$1 = void

The tree dumps:

$ cat testcase.c.t03.generic
Qux ()
{
  static char C.0[11] = {0};
  char Bar[11];

  Bar = C.0;
}

$ cat testcase.c.t02.original

;; Function Qux (Qux)
;; enabled by -tree-original


{
  char Bar[11] = {0};

    char Bar[11] = {0};
}

Does this help? :-)

-bw



More information about the llvm-commits mailing list