Skip to content
  1. Apr 15, 2011
  2. Apr 14, 2011
  3. Apr 13, 2011
  4. Apr 12, 2011
    • Jim Grosbach's avatar
      MCJIT lazy relocation resolution and symbol address re-assignment. · 733d305f
      Jim Grosbach authored
      Add handling for tracking the relocations on symbols and resolving them.
      Keep track of the relocations even after they are resolved so that if
      the RuntimeDyld client moves the object, it can update the address and any
      relocations to that object will be updated.
      
      For our trival object file load/run test harness (llvm-rtdyld), this enables
      relocations between functions located in the same object module. It should
      be trivially extendable to load multiple objects with mutual references.
      
      As a simple example, the following now works (running on x86_64 Darwin 10.6):
      
      
      $ cat t.c
      int bar() {
        return 65;
      }
      
      int main() {
        return bar();
      }
      $ clang t.c -fno-asynchronous-unwind-tables -o t.o -c
      $ otool -vt t.o
      t.o:
      (__TEXT,__text) section
      _bar:
      0000000000000000  pushq %rbp
      0000000000000001  movq  %rsp,%rbp
      0000000000000004  movl  $0x00000041,%eax
      0000000000000009  popq  %rbp
      000000000000000a  ret
      000000000000000b  nopl  0x00(%rax,%rax)
      _main:
      0000000000000010  pushq %rbp
      0000000000000011  movq  %rsp,%rbp
      0000000000000014  subq  $0x10,%rsp
      0000000000000018  movl  $0x00000000,0xfc(%rbp)
      000000000000001f  callq 0x00000024
      0000000000000024  addq  $0x10,%rsp
      0000000000000028  popq  %rbp
      0000000000000029  ret
      $ llvm-rtdyld t.o -debug-only=dyld ; echo $?
      Function sym: '_bar' @ 0
      Function sym: '_main' @ 16
      Extracting function: _bar from [0, 15]
          allocated to 0x100153000
      Extracting function: _main from [16, 41]
          allocated to 0x100154000
      Relocation at '_main' + 16 from '_bar(Word1: 0x2d000000)
      Resolving relocation at '_main' + 16 (0x100154010) from '_bar (0x100153000)(pcrel, type: 2, Size: 4).
      loaded '_main' at: 0x100154000
      65
      $
      
      llvm-svn: 129388
      733d305f
    • Rafael Espindola's avatar
      Remove LastOffset from the asm parser. · fd794aff
      Rafael Espindola authored
      llvm-svn: 129378
      fd794aff
    • Rafael Espindola's avatar
      Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset. · 1ec0f461
      Rafael Espindola authored
      llvm-svn: 129362
      1ec0f461
    • Rafael Espindola's avatar
      Implement .cfi_same_value. · 2e1c9d21
      Rafael Espindola authored
      llvm-svn: 129361
      2e1c9d21
    • Nick Lewycky's avatar
      Add support for line profiling. Very work-in-progress. · 9d60e373
      Nick Lewycky authored
      Use debug info in the IR to find the directory/file:line:col. Each time that location changes, bump a counter.
      
      Unlike the existing profiling system, we don't try to look at argv[], and thusly don't require main() to be present in the IR. This matches GCC's technique where you specify the profiling flag when producing each .o file.
      
      The runtime library is minimal, currently just calling printf at program shutdown time. The API is designed to make it possible to emit GCOV data later on.
      
      llvm-svn: 129340
      9d60e373
    • Nick Lewycky's avatar
      Make IRBuilder support StringRef for building strings. · 11168326
      Nick Lewycky authored
      Also document that the global variables produced are mergable.
      
      llvm-svn: 129330
      11168326
    • Jim Grosbach's avatar
      Tidy up a bit now that we're using the MemoryManager interface. · 3ed03f18
      Jim Grosbach authored
      llvm-svn: 129328
      3ed03f18
    • Chris Lattner's avatar
      remove the StructRetPromotion pass. It is unused, not maintained and · e81d045d
      Chris Lattner authored
      has some bugs.  If this is interesting functionality, it should be 
      reimplemented in the argpromotion pass.
      
      llvm-svn: 129314
      e81d045d
  5. Apr 11, 2011
  6. Apr 10, 2011
    • Bill Wendling's avatar
      Beginning of the Great Exception Handling Rewrite. · 3d5450d8
      Bill Wendling authored
      * Add a "landing pad" attribute to the BasicBlock.
      * Modify the bitcode reader and writer to handle said attribute.
      
      Later: The verifier will ensure that the landing pad attribute is used in the
      appropriate manner. I.e., not applied to the entry block, and applied only to
      basic blocks that are branched to via a `dispatch' instruction.
      
      (This is a work-in-progress.)
      
      llvm-svn: 129235
      3d5450d8
  7. Apr 09, 2011
  8. Apr 08, 2011
Loading