Skip to content
  1. Apr 16, 2012
  2. Apr 10, 2012
  3. Apr 09, 2012
  4. Apr 05, 2012
    • Bill Wendling's avatar
      The internalize pass can be dangerous for LTO. · 4f60125d
      Bill Wendling authored
      Consider the following program:
      
      $ cat main.c
      void foo(void) { }
      
      int main(int argc, char *argv[]) {
          foo();
          return 0;
      }
      $ cat bundle.c 
      extern void foo(void);
      
      void bar(void) {
           foo();
      }
      $ clang -o main main.c
      $ clang -o bundle.so bundle.c -bundle -bundle_loader ./main
      $ nm -m bundle.so
      0000000000000f40 (__TEXT,__text) external _bar
                       (undefined) external _foo (from executable)
                       (undefined) external dyld_stub_binder (from libSystem)
      $ clang -o main main.c -O4
      $ clang -o bundle.so bundle.c -bundle -bundle_loader ./main
      Undefined symbols for architecture x86_64:
        "_foo", referenced from:
            _bar in bundle-elQN6d.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
      The linker was told that the 'foo' in 'main' was 'internal' and had no uses, so
      it was dead stripped.
      
      Another situation is something like:
      
      define void @foo() {
        ret void
      }
      
      define void @bar() {
        call asm volatile "call _foo" ...
        ret void
      }
      
      The only use of 'foo' is inside of an inline ASM call. Since we don't look
      inside those for uses of functions, we don't specify this as a "use."
      
      Get around this by not invoking the 'internalize' pass by default. This is an
      admitted hack for LTO correctness.
      <rdar://problem/11185386>
      
      llvm-svn: 154124
      4f60125d
  5. Apr 03, 2012
  6. Mar 31, 2012
  7. Jan 20, 2012
  8. Dec 02, 2011
    • Nick Lewycky's avatar
      Move global variables in TargetMachine into new TargetOptions class. As an API · 50f02cb2
      Nick Lewycky authored
      change, now you need a TargetOptions object to create a TargetMachine. Clang
      patch to follow.
      
      One small functionality change in PTX. PTX had commented out the machine
      verifier parts in their copy of printAndVerify. That now calls the version in
      LLVMTargetMachine. Users of PTX who need verification disabled should rely on
      not passing the command-line flag to enable it.
      
      llvm-svn: 145714
      50f02cb2
  9. Nov 05, 2011
  10. Nov 01, 2011
  11. Aug 24, 2011
  12. Aug 18, 2011
  13. Aug 02, 2011
  14. Jul 25, 2011
  15. Jul 22, 2011
  16. Jul 20, 2011
  17. Jul 19, 2011
  18. Jul 18, 2011
  19. Jul 15, 2011
  20. Jul 12, 2011
  21. Jun 30, 2011
  22. Jun 29, 2011
  23. May 22, 2011
  24. Mar 22, 2011
  25. Mar 18, 2011
  26. Mar 02, 2011
    • Rafael Espindola's avatar
      Add a special streamer to libLTO that just records symbols definitions and · 1e49a6d9
      Rafael Espindola authored
      uses.
      
      The result produced by the streamer is used to give the linker more accurate
      information and to add to llvm.compiler.used. The second improvement removes
      the need for the user to add __attribute__((used)) to functions only used in
      inline asm. The first one lets us build firefox with LTO on Darwin :-)
      
      llvm-svn: 126830
      1e49a6d9
  27. Feb 24, 2011
  28. Feb 20, 2011
  29. Feb 12, 2011
Loading