Skip to content
  1. Sep 25, 2004
  2. Sep 24, 2004
  3. Sep 23, 2004
  4. Sep 22, 2004
  5. Sep 21, 2004
    • Chris Lattner's avatar
      Do not fold (X + C1 != C2) if there are other users of the add. Doing · b121ae1c
      Chris Lattner authored
      this transformation used to take a loop like this:
      
      int Array[1000];
      void test(int X) {
        int i;
        for (i = 0; i < 1000; ++i)
          Array[i] += X;
      }
      
      Compiled to LLVM is:
      
      no_exit:                ; preds = %entry, %no_exit
              %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ]            ; <uint> [#uses=2]
              %tmp.4 = getelementptr [1000 x int]* %Array, int 0, uint %indvar                ; <int*> [#uses=2]
              %tmp.7 = load int* %tmp.4               ; <int> [#uses=1]
              %tmp.9 = add int %tmp.7, %X             ; <int> [#uses=1]
              store int %tmp.9, int* %tmp.4
      ***     %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
      ***     %exitcond = seteq uint %indvar.next, 1000               ; <bool> [#uses=1]
              br bool %exitcond, label %return, label %no_exit
      
      and turn it into a loop like this:
      
      no_exit:                ; preds = %entry, %no_exit
              %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ]            ; <uint> [#uses=3]
              %tmp.4 = getelementptr [1000 x int]* %Array, int 0, uint %indvar                ; <int*> [#uses=2]
              %tmp.7 = load int* %tmp.4               ; <int> [#uses=1]
              %tmp.9 = add int %tmp.7, %X             ; <int> [#uses=1]
              store int %tmp.9, int* %tmp.4
      ***     %indvar.next = add uint %indvar, 1              ; <uint> [#uses=1]
      ***     %exitcond = seteq uint %indvar, 999             ; <bool> [#uses=1]
              br bool %exitcond, label %return, label %no_exit
      
      Note that indvar.next and indvar can no longer be coallesced.  In machine
      code terms, this patch changes this code:
      
      .LBBtest_1:     # no_exit
              mov %EDX, OFFSET Array
              mov %ESI, %EAX
              add %ESI, DWORD PTR [%EDX + 4*%ECX]
              mov %EDX, OFFSET Array
              mov DWORD PTR [%EDX + 4*%ECX], %ESI
              mov %EDX, %ECX
              inc %EDX
              cmp %ECX, 999
              mov %ECX, %EDX
              jne .LBBtest_1  # no_exit
      
      into this:
      
      .LBBtest_1:     # no_exit
              mov %EDX, OFFSET Array
              mov %ESI, %EAX
              add %ESI, DWORD PTR [%EDX + 4*%ECX]
              mov %EDX, OFFSET Array
              mov DWORD PTR [%EDX + 4*%ECX], %ESI
              inc %ECX
              cmp %ECX, 1000
              jne .LBBtest_1  # no_exit
      
      We need better instruction selection to get this:
      
      .LBBtest_1:     # no_exit
              add DWORD PTR [Array + 4*%ECX], EAX
              inc %ECX
              cmp %ECX, 1000
              jne .LBBtest_1  # no_exit
      
      ... but at least there is less register juggling
      
      llvm-svn: 16473
      b121ae1c
    • Alkis Evlogimenos's avatar
      The real x87 floating point registers should not be allocatable. They · 89dd6373
      Alkis Evlogimenos authored
      are only used by the stackifier when transforming FPn register
      allocations to the real stack file x87 registers.
      
      llvm-svn: 16472
      89dd6373
    • Misha Brukman's avatar
      s/ISel/PPC64ISel/ to have unique class names for debugging via gdb because the · 6b17bf71
      Misha Brukman authored
      C++ front-end in gcc does not mangle classes in anonymous namespaces correctly.
      
      llvm-svn: 16471
      6b17bf71
    • Misha Brukman's avatar
      s/ISel/PPC32ISel/ to have unique class names for debugging via gdb because the · 87201ce8
      Misha Brukman authored
      C++ front-end in gcc does not mangle classes in anonymous namespaces correctly.
      
      llvm-svn: 16470
      87201ce8
    • Misha Brukman's avatar
      s/ISel/X86ISel/ to have unique class names for debugging via gdb because the C++ · 43bd39e0
      Misha Brukman authored
      front-end in gcc does not mangle classes in anonymous namespaces correctly.
      
      llvm-svn: 16469
      43bd39e0
    • Chris Lattner's avatar
      Make sure to set the operand list · 0f28cce6
      Chris Lattner authored
      llvm-svn: 16466
      0f28cce6
    • Reid Spencer's avatar
      Fix a problem where the mmap_file test was generating an incorrect test · 5a6815d3
      Reid Spencer authored
      program that always failed (wouldn't compile).
      
      llvm-svn: 16465
      5a6815d3
    • Reid Spencer's avatar
      Change the warning text so that NO warnings are permitted. This is now the · d057f2bc
      Reid Spencer authored
      case since the AC_CONFIG_SUBDIRS problem has been fixed.
      
      llvm-svn: 16464
      d057f2bc
    • Reid Spencer's avatar
      Don't attempt to (illegally) configure a subdir if we don't recognize it. · c6f9e0f5
      Reid Spencer authored
      Instead just create a warning message that says the directory cannot be
      configured because it isn't recognized. This also gets rid of a bunch of
      warning messages from the auto* tools.
      
      llvm-svn: 16463
      c6f9e0f5
Loading