Skip to content
  1. Sep 26, 2009
  2. Sep 25, 2009
    • Evan Cheng's avatar
      fd6aad7f
    • Dan Gohman's avatar
      Improve MachineMemOperand handling. · 48b185d6
      Dan Gohman authored
       - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
         This eliminates MachineInstr's std::list member and allows the data to be
         created by isel and live for the remainder of codegen, avoiding a lot of
         copying and unnecessary translation. This also shrinks MemSDNode.
       - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
         fields for MachineMemOperands.
       - Change MemSDNode to have a MachineMemOperand member instead of its own
         fields with the same information. This introduces some redundancy, but
         it's more consistent with what MachineInstr will eventually want.
       - Ignore alignment when searching for redundant loads for CSE, but remember
         the greatest alignment.
      
      Target-specific code which previously used MemOperandSDNodes with generic
      SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
      so that the SelectionDAG framework knows that MachineMemOperand information
      is available.
      
      llvm-svn: 82794
      48b185d6
    • Dan Gohman's avatar
      Rename getTargetNode to getMachineNode, for consistency with the · 32f71d71
      Dan Gohman authored
      naming scheme used in SelectionDAG, where there are multiple kinds
      of "target" nodes, but "machine" nodes are nodes which represent
      a MachineInstr.
      
      llvm-svn: 82790
      32f71d71
    • David Goodwin's avatar
      Finish scheduling itineraries for NEON. · bea6848f
      David Goodwin authored
      llvm-svn: 82788
      bea6848f
    • Bob Wilson's avatar
      Add some comments to clarify things that I discovered this week. · f7fe0132
      Bob Wilson authored
      llvm-svn: 82773
      f7fe0132
    • Bob Wilson's avatar
      pr4926: ARM requires the stack pointer to be aligned, even for leaf functions. · d60367c1
      Bob Wilson authored
      For the AAPCS ABI, SP must always be 4-byte aligned, and at any "public
      interface" it must be 8-byte aligned.  For the older ARM APCS ABI, the stack
      alignment is just always 4 bytes.  For X86, we currently align SP at
      entry to a function (e.g., to 16 bytes for Darwin), but no stack alignment
      is needed at other times, such as for a leaf function.
      
      After discussing this with Dan, I decided to go with the approach of adding
      a new "TransientStackAlignment" field to TargetFrameInfo.  This value
      specifies the stack alignment that must be maintained even in between calls.
      It defaults to 1 except for ARM, where it is 4.  (Some other targets may
      also want to set this if they have similar stack requirements. It's not
      currently required for PPC because it sets targetHandlesStackFrameRounding
      and handles the alignment in target-specific code.) The existing StackAlignment
      value specifies the alignment upon entry to a function, which is how we've
      been using it anyway.
      
      llvm-svn: 82767
      d60367c1
    • Dan Gohman's avatar
      Don't try to use pre-indexed addressing with sthbrx/stwbrx · 28328db5
      Dan Gohman authored
      instructions. This fixes a PowerPC bug exposed by some unrelated
      changes I'm working on.
      
      llvm-svn: 82743
      28328db5
    • Jim Grosbach's avatar
      Start of revamping the register scavenging in PEI. ARM Thumb1 is the driving · 372e9a38
      Jim Grosbach authored
      interest for this, as it currently reserves a register rather than using
      the scavenger for matierializing constants as needed.
      
      Instead of scavenging registers on the fly while eliminating frame indices,
      new virtual registers are created, and then a scavenged collectively in a
      post-pass over the function. This isolates the bits that need to interact
      with the scavenger, and sets the stage for more intelligent use, and reuse,
      of scavenged registers.
      
      For the time being, this is disabled by default. Once the bugs are worked out,
      the current scavenging calls in replaceFrameIndices() will be removed and
      the post-pass scavenging will be the default. Until then,
      -enable-frame-index-scavenging enables the new code. Currently, only the
      Thumb1 back end is set up to use it.
      
      llvm-svn: 82734
      372e9a38
  3. Sep 24, 2009
  4. Sep 23, 2009
  5. Sep 21, 2009
    • David Goodwin's avatar
      Add Cortex-A8 VFP model. · 50902733
      David Goodwin authored
      llvm-svn: 82483
      50902733
    • Dan Gohman's avatar
      Add support for rematerializing FsFLD0SS and FsFLD0SD as constant-pool · 69499b13
      Dan Gohman authored
      loads in order to reduce register pressure.
      
      llvm-svn: 82470
      69499b13
    • Dan Gohman's avatar
      Recognize SSE min and max opportunities in even more cases. · 48ade83e
      Dan Gohman authored
      And fix a bug with the behavior of min/max instructions formed from
      fcmp uge comparisons.
      
      Also, use FiniteOnlyFPMath() for this code instead of UnsafeFPMath,
      as it is more specific.
      
      llvm-svn: 82466
      48ade83e
    • Dan Gohman's avatar
      Fix the offset values for these memoperands. For frame objects, the · 757acfea
      Dan Gohman authored
      PseudoSourceValue already effectively represents the offset from the
      frame base, so the actual offset should not be added to it.
      
      llvm-svn: 82465
      757acfea
    • Chris Lattner's avatar
      add a note · 61858787
      Chris Lattner authored
      llvm-svn: 82442
      61858787
    • Daniel Dunbar's avatar
      Register the MachineModuleInfo for the ARM JIT, and update JITDwarfEmitter to · bc528b16
      Daniel Dunbar authored
      assert if the setModuleInfo hasn't been called.
      
      llvm-svn: 82441
      bc528b16
    • Chris Lattner's avatar
      one case handled, expanded another testcase inline. · 9858859f
      Chris Lattner authored
      llvm-svn: 82427
      9858859f
    • Reid Kleckner's avatar
      Implement the JIT side of the GDB JIT debugging interface. To enable this · 9a10db8c
      Reid Kleckner authored
      feature, either build the JIT in debug mode to enable it by default or pass
      -jit-emit-debug to lli.
      
      Right now, the only debug information that this communicates to GDB is call
      frame information, since it's already being generated to support exceptions in
      the JIT.  Eventually, when DWARF generation isn't tied so tightly to AsmPrinter,
      it will be easy to push that information to GDB through this interface.
      
      Here's a step-by-step breakdown of how the feature works:
      
      - The JIT generates the machine code and DWARF call frame info
        (.eh_frame/.debug_frame) for a function into memory.
      - The JIT copies that info into an in-memory ELF file with a symbol for the
        function.
      - The JIT creates a code entry pointing to the ELF buffer and adds it to a
        linked list hanging off of a global descriptor at a special symbol that GDB
        knows about.
      - The JIT calls a function marked noinline that GDB knows about and has put an
        internal breakpoint in.
      - GDB catches the breakpoint and reads the global descriptor to look for new
        code.
      - When sees there is new code, it reads the ELF from the inferior's memory and
        adds it to itself as an object file.
      - The JIT continues, and the next time we stop the program, we are able to
        produce a proper backtrace.
      
      Consider running the following program through the JIT:
      
      #include <stdio.h>
      void baz(short z) {
        long w = z + 1;
        printf("%d, %x\n", w, *((int*)NULL));  // SEGFAULT here
      }
      void bar(short y) {
        int z = y + 1;
        baz(z);
      }
      void foo(char x) {
        short y = x + 1;
        bar(y);
      }
      int main(int argc, char** argv) {
        char x = 1;
        foo(x);
      }
      
      Here is a backtrace before this patch:
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x2aaaabdfbd10 (LWP 25476)]
      0x00002aaaabe7d1a8 in ?? ()
      (gdb) bt
      #0  0x00002aaaabe7d1a8 in ?? ()
      #1  0x0000000000000003 in ?? ()
      #2  0x0000000000000004 in ?? ()
      #3  0x00032aaaabe7cfd0 in ?? ()
      #4  0x00002aaaabe7d12c in ?? ()
      #5  0x00022aaa00000003 in ?? ()
      #6  0x00002aaaabe7d0aa in ?? ()
      #7  0x01000002abe7cff0 in ?? ()
      #8  0x00002aaaabe7d02c in ?? ()
      #9  0x0100000000000001 in ?? ()
      #10 0x00000000014388e0 in ?? ()
      #11 0x00007fff00000001 in ?? ()
      #12 0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70,
      F=0x14024e0, ArgValues=@0x7fffffffe050)
         at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395
      #13 0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain
      (this=0x1405b70, Fn=0x14024e0, argv=@0x13f06f8, envp=0x7fffffffe3b0)
         at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377
      #14 0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe398,
      envp=0x7fffffffe3b0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208
      
      And a backtrace after this patch:
      Program received signal SIGSEGV, Segmentation fault.
      0x00002aaaabe7d1a8 in baz ()
      (gdb) bt
      #0  0x00002aaaabe7d1a8 in baz ()
      #1  0x00002aaaabe7d12c in bar ()
      #2  0x00002aaaabe7d0aa in foo ()
      #3  0x00002aaaabe7d02c in main ()
      #4  0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70,
      F=0x14024e0, ArgValues=...)
         at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395
      #5  0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain
      (this=0x1405b70, Fn=0x14024e0, argv=..., envp=0x7fffffffe3c0)
         at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377
      #6  0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe3a8,
      envp=0x7fffffffe3c0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208
      
      llvm-svn: 82418
      9a10db8c
  6. Sep 20, 2009
Loading