Skip to content
  1. Dec 10, 2012
  2. Dec 08, 2012
    • Bill Wendling's avatar
      Add the `lto_codegen_set_export_dynamic' function. · 65a6ee11
      Bill Wendling authored
      This function sets the `_exportDynamic' ivar. When that's set, we export all
      symbols (e.g. we don't run the internalize pass). This is equivalent to the
      `--export-dynamic' linker flag in GNU land:
      
      --export-dynamic
        When creating a dynamically linked executable, add all symbols to the dynamic
        symbol table. The dynamic symbol table is the set of symbols which are visible
        from dynamic objects at run time. If you do not use this option, the dynamic
        symbol table will normally contain only those symbols which are referenced by
        some dynamic object mentioned in the link. If you use dlopen to load a dynamic
        object which needs to refer back to the symbols defined by the program, rather
        than some other dynamic object, then you will probably need to use this option
        when linking the program itself.
      
      The Darwin linker will support this via the `-export_dynamic' flag. We should
      modify clang to support this via the `-rdynamic' flag.
      
      llvm-svn: 169656
      65a6ee11
  3. Dec 04, 2012
    • Chandler Carruth's avatar
      Sort the #include lines for tools/... · 4d88a1c2
      Chandler Carruth authored
      Again, tools are trickier to pick the main module header for than
      library source files. I've started to follow the pattern of using
      LLVMContext.h when it is included as a stub for program source files.
      
      llvm-svn: 169252
      4d88a1c2
  4. Nov 29, 2012
  5. Nov 27, 2012
    • Owen Anderson's avatar
      Revert r168635 "Step towards implementation of pass manager with... · 1db12f51
      Owen Anderson authored
      Revert r168635 "Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model".
      It appears to have broken at least one buildbot.
      
      llvm-svn: 168654
      1db12f51
    • Owen Anderson's avatar
      Step towards implementation of pass manager with doInitialization and... · 336368c4
      Owen Anderson authored
      Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model
      
      Patch by Pedro Artigas, with feedback from by Chandler Carruth.
      
      llvm-svn: 168635
      336368c4
  6. Nov 15, 2012
  7. Oct 19, 2012
  8. Oct 18, 2012
    • Bob Wilson's avatar
      Temporarily revert the TargetTransform changes. · d6d9ccca
      Bob Wilson authored
      The TargetTransform changes are breaking LTO bootstraps of clang.  I am
      working with Nadav to figure out the problem, but I am reverting it for now
      to get our buildbots working.
      
      This reverts svn commits: 165665 165669 165670 165786 165787 165997
      and I have also reverted clang svn 165741
      
      llvm-svn: 166168
      d6d9ccca
  9. Oct 16, 2012
  10. Oct 12, 2012
  11. Oct 08, 2012
  12. Sep 06, 2012
  13. Aug 09, 2012
  14. Aug 07, 2012
  15. Aug 06, 2012
  16. May 30, 2012
    • David Blaikie's avatar
      Reinstate -O3 for LTO. · 787705ae
      David Blaikie authored
      This broke in r144788 when the CodeGenOpt option was moved from everywhere else
      (specifically, from addPassesToEmitFile) to createTargetMachine. Since
      LTOCodeGenerator wasn't passing the 4th argument, when the 4th parameter became
      the 3rd, it silently continued to compile (int->bool conversion) but meant
      something completely different.
      
      This change preserves the existing (accidental) and previous (default)
      semantics of the addPassesToEmitFile and restores the previous/intended
      CodeGenOpt argument by passing it appropriately to createTargetMachine.
      
      (discovered by pending changes to -Wconversion to catch constant->bool
      conversions)
      
      llvm-svn: 157705
      787705ae
  17. Apr 16, 2012
  18. Apr 10, 2012
  19. Apr 09, 2012
  20. 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
  21. Apr 03, 2012
  22. Mar 31, 2012
  23. Jan 20, 2012
  24. 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
  25. Nov 05, 2011
  26. Nov 01, 2011
  27. Aug 24, 2011
  28. Aug 18, 2011
  29. Aug 02, 2011
  30. Jul 25, 2011
Loading