Skip to content
  1. 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
    • Bob Wilson's avatar
      Add an insertPass API to TargetPassConfig. <rdar://problem/11498613> · 33e5188c
      Bob Wilson authored
      Besides adding the new insertPass function, this patch uses it to
      enhance the existing -print-machineinstrs so that the MachineInstrs
      after a specific pass can be printed.
      
      Patch by Bin Zeng!
      
      llvm-svn: 157655
      33e5188c
  2. May 29, 2012
  3. May 20, 2012
  4. May 19, 2012
  5. May 18, 2012
    • Jim Grosbach's avatar
      Refactor data-in-code annotations. · 4b63d2ae
      Jim Grosbach authored
      Use a dedicated MachO load command to annotate data-in-code regions.
      This is the same format the linker produces for final executable images,
      allowing consistency of representation and use of introspection tools
      for both object and executable files.
      
      Data-in-code regions are annotated via ".data_region"/".end_data_region"
      directive pairs, with an optional region type.
      
      data_region_directive := ".data_region" { region_type }
      region_type := "jt8" | "jt16" | "jt32" | "jta32"
      end_data_region_directive := ".end_data_region"
      
      The previous handling of ARM-style "$d.*" labels was broken and has
      been removed. Specifically, it didn't handle ARM vs. Thumb mode when
      marking the end of the section.
      
      rdar://11459456
      
      llvm-svn: 157062
      4b63d2ae
    • Kevin Enderby's avatar
      Fixed a bug in llvm-objdump when disassembling using -macho option for a binary · badd100c
      Kevin Enderby authored
      containing no symbols.  Fixed the crash and fixed it not disassembling anything.
      
      llvm-svn: 157031
      badd100c
  6. May 16, 2012
  7. May 15, 2012
  8. May 11, 2012
  9. May 09, 2012
  10. May 04, 2012
    • Chandler Carruth's avatar
      Move the CodeExtractor utility to a dedicated header file / source file, · 0fde0015
      Chandler Carruth authored
      and expose it as a utility class rather than as free function wrappers.
      
      The simple free-function interface works well for the bugpoint-specific
      pass's uses of code extraction, but in an upcoming patch for more
      advanced code extraction, they simply don't expose a rich enough
      interface. I need to expose various stages of the process of doing the
      code extraction and query information to decide whether or not to
      actually complete the extraction or give up.
      
      Rather than build up a new predicate model and pass that into these
      functions, just take the class that was actually implementing the
      functions and lift it up into a proper interface that can be used to
      perform code extraction. The interface is cleaned up and re-documented
      to work better in a header. It also is now setup to accept the blocks to
      be extracted in the constructor rather than in a method.
      
      In passing this essentially reverts my previous commit here exposing
      a block-level query for eligibility of extraction. That is no longer
      necessary with the more rich interface as clients can query the
      extraction object for eligibility directly. This will reduce the number
      of walks of the input basic block sequence by quite a bit which is
      useful if this enters the normal optimization pipeline.
      
      llvm-svn: 156163
      0fde0015
    • Pete Cooper's avatar
      PR12729: Change 'llvm-objdump' to display the available targets. · 28fb4fc9
      Pete Cooper authored
      Patch by Meador Inge.
      
      llvm-svn: 156128
      28fb4fc9
  11. May 02, 2012
  12. Apr 29, 2012
  13. Apr 27, 2012
  14. Apr 26, 2012
    • Michael J. Spencer's avatar
      [CMake] Restructure how Clang, Polly and other external projects get included. · e734f541
      Michael J. Spencer authored
      While making lld build under the tools directory I decided to refactor how this
      works.
      
      There is now a macro, add_llvm_external_project, which takes the name of the
      expected subdirectory. This sets up two CMake options.
      
       * LLVM_EXTERNAL_${NAME}_SOURCE_DIR
           This is the path to the source. It defaults to
           ${CMAKE_CURRENT_SOURCE_DIR}/${name}.
       * LLVM_EXTERNAL_${NAME}_BUILD
           Enable and disable building the tool as part of LLVM.
      
      I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in the
      GUI.
      
      llvm-svn: 155654
      e734f541
  15. Apr 25, 2012
  16. Apr 19, 2012
    • Michael J. Spencer's avatar
      Remove llvm-ld and llvm-stub (which is only used by llvm-ld). · 9125493e
      Michael J. Spencer authored
      llvm-ld is no longer useful and causes confusion and so it is being removed.
      
      * Does not work very well on Windows because it must call a gcc like driver to
        assemble and link.
      * Has lots of hard coded paths which are wrong on many systems.
      * Does not understand most of ld's options.
      * Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} |
        ld, or fully replaced by Clang.
      
      I know of no production use of llvm-ld, and hacking use should be
      replaced by Clang's driver.
      
      llvm-svn: 155147
      9125493e
  17. Apr 18, 2012
  18. Apr 16, 2012
  19. Apr 15, 2012
  20. Apr 11, 2012
    • Sylvestre Ledru's avatar
      Fix the build under Debian GNU/Hurd. · 14ada946
      Sylvestre Ledru authored
      Thanks to Pino Toscano for the patch
      
      llvm-svn: 154500
      14ada946
    • Dylan Noblesmith's avatar
      llvm-stress: stop abusing ConstantFP::get() · 68f310df
      Dylan Noblesmith authored
      ConstantFP::get(Type*, double) is unreliably host-specific:
      it can't handle a type like PPC128 on an x86 host. It even
      has a comment to that effect: "This should only be used for
      simple constant values like 2.0/1.0 etc, that are
      known-valid both as host double and as the target format."
      
      Instead, use APFloat. While we're at it, randomize the floating
      point value more thoroughly; it was previously limited
      to the range 0 to 2**19 - 1.
      
      PR12451.
      
      llvm-svn: 154446
      68f310df
    • Dylan Noblesmith's avatar
      llvm-stress: don't make vectors of x86_mmx type · 2a592dcc
      Dylan Noblesmith authored
      LangRef.html says:
      "There are no arrays, vectors or constants of this type."
      
      This was hitting assertions when passing the -generate-x86-mmx
      option.
      
      PR12452.
      
      llvm-svn: 154445
      2a592dcc
  21. Apr 10, 2012
  22. Apr 09, 2012
  23. Apr 08, 2012
    • Chandler Carruth's avatar
      Teach LLVM about a PIE option which, when enabled on top of PIC, makes · ede4a8aa
      Chandler Carruth authored
      optimizations which are valid for position independent code being linked
      into a single executable, but not for such code being linked into
      a shared library.
      
      I discussed the design of this with Eric Christopher, and the decision
      was to support an optional bit rather than a completely separate
      relocation model. Fundamentally, this is still PIC relocation, its just
      that certain optimizations are only valid under a PIC relocation model
      when the resulting code won't be in a shared library. The simplest path
      to here is to expose a single bit option in the TargetOptions. If folks
      have different/better designs, I'm all ears. =]
      
      I've included the first optimization based upon this: changing TLS
      models to the *Exec models when PIE is enabled. This is the LLVM
      component of PR12380 and is all of the hard work.
      
      llvm-svn: 154294
      ede4a8aa
  24. 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
Loading