Skip to content
  1. Jan 14, 2014
    • Duncan P. N. Exon Smith's avatar
      Reapply "LTO: add API to set strategy for -internalize" · 93be7c4f
      Duncan P. N. Exon Smith authored
      Reapply r199191, reverted in r199197 because it carelessly broke
      Other/link-opts.ll.  The problem was that calling
      createInternalizePass("main") would select
      createInternalizePass(bool("main")) instead of
      createInternalizePass(ArrayRef<const char *>("main")).  This commit
      fixes the bug.
      
      The original commit message follows.
      
      Add API to LTOCodeGenerator to specify a strategy for the -internalize
      pass.
      
      This is a new attempt at Bill's change in r185882, which he reverted in
      r188029 due to problems with the gold linker.  This puts the onus on the
      linker to decide whether (and what) to internalize.
      
      In particular, running internalize before outputting an object file may
      change a 'weak' symbol into an internal one, even though that symbol
      could be needed by an external object file --- e.g., with arclite.
      
      This patch enables three strategies:
      
      - LTO_INTERNALIZE_FULL: the default (and the old behaviour).
      - LTO_INTERNALIZE_NONE: skip -internalize.
      - LTO_INTERNALIZE_HIDDEN: only -internalize symbols with hidden
        visibility.
      
      LTO_INTERNALIZE_FULL should be used when linking an executable.
      
      Outputting an object file (e.g., via ld -r) is more complicated, and
      depends on whether hidden symbols should be internalized.  E.g., for
      ld -r, LTO_INTERNALIZE_NONE can be used when -keep_private_externs, and
      LTO_INTERNALIZE_HIDDEN can be used otherwise.  However,
      LTO_INTERNALIZE_FULL is inappropriate, since the output object file will
      eventually need to link with others.
      
      lto_codegen_set_internalize_strategy() sets the strategy for subsequent
      calls to lto_codegen_write_merged_modules() and lto_codegen_compile*().
      
      <rdar://problem/14334895>
      
      llvm-svn: 199244
      93be7c4f
    • Nico Rieck's avatar
      Decouple dllexport/dllimport from linkage · 7157bb76
      Nico Rieck authored
      Representing dllexport/dllimport as distinct linkage types prevents using
      these attributes on templates and inline functions.
      
      Instead of introducing further mixed linkage types to include linkonce and
      weak ODR, the old import/export linkage types are replaced with a new
      separate visibility-like specifier:
      
        define available_externally dllimport void @f() {}
        @Var = dllexport global i32 1, align 4
      
      Linkage for dllexported globals and functions is now equal to their linkage
      without dllexport. Imported globals and functions must be either
      declarations with external linkage, or definitions with
      AvailableExternallyLinkage.
      
      llvm-svn: 199218
      7157bb76
    • Nico Rieck's avatar
      Revert "Decouple dllexport/dllimport from linkage" · 9d2e0df0
      Nico Rieck authored
      Revert this for now until I fix an issue in Clang with it.
      
      This reverts commit r199204.
      
      llvm-svn: 199207
      9d2e0df0
    • Nico Rieck's avatar
      Decouple dllexport/dllimport from linkage · e43aaf79
      Nico Rieck authored
      Representing dllexport/dllimport as distinct linkage types prevents using
      these attributes on templates and inline functions.
      
      Instead of introducing further mixed linkage types to include linkonce and
      weak ODR, the old import/export linkage types are replaced with a new
      separate visibility-like specifier:
      
        define available_externally dllimport void @f() {}
        @Var = dllexport global i32 1, align 4
      
      Linkage for dllexported globals and functions is now equal to their linkage
      without dllexport. Imported globals and functions must be either
      declarations with external linkage, or definitions with
      AvailableExternallyLinkage.
      
      llvm-svn: 199204
      e43aaf79
    • NAKAMURA Takumi's avatar
      Revert r199191, "LTO: add API to set strategy for -internalize" · 23c0ab53
      NAKAMURA Takumi authored
      Please update also Other/link-opts.ll, in next time.
      
      llvm-svn: 199197
      23c0ab53
    • Duncan P. N. Exon Smith's avatar
      LTO: add API to set strategy for -internalize · 43ea3478
      Duncan P. N. Exon Smith authored
      Add API to LTOCodeGenerator to specify a strategy for the -internalize
      pass.
      
      This is a new attempt at Bill's change in r185882, which he reverted in
      r188029 due to problems with the gold linker.  This puts the onus on the
      linker to decide whether (and what) to internalize.
      
      In particular, running internalize before outputting an object file may
      change a 'weak' symbol into an internal one, even though that symbol
      could be needed by an external object file --- e.g., with arclite.
      
      This patch enables three strategies:
      
      - LTO_INTERNALIZE_FULL: the default (and the old behaviour).
      - LTO_INTERNALIZE_NONE: skip -internalize.
      - LTO_INTERNALIZE_HIDDEN: only -internalize symbols with hidden
        visibility.
      
      LTO_INTERNALIZE_FULL should be used when linking an executable.
      
      Outputting an object file (e.g., via ld -r) is more complicated, and
      depends on whether hidden symbols should be internalized.  E.g., for
      ld -r, LTO_INTERNALIZE_NONE can be used when -keep_private_externs, and
      LTO_INTERNALIZE_HIDDEN can be used otherwise.  However,
      LTO_INTERNALIZE_FULL is inappropriate, since the output object file will
      eventually need to link with others.
      
      lto_codegen_set_internalize_strategy() sets the strategy for subsequent
      calls to lto_codegen_write_merged_modules() and lto_codegen_compile*().
      
      <rdar://problem/14334895>
      
      llvm-svn: 199191
      43ea3478
    • Chandler Carruth's avatar
      e2d5663b
    • Rafael Espindola's avatar
      Replace .mips_hack_stocg with ".set micromips" and ".set nomicromips". · 6d5f7ce3
      Rafael Espindola authored
      This matches what gnu as does and implementing this is easier than arguing
      about it.
      
      llvm-svn: 199181
      6d5f7ce3
    • Rafael Espindola's avatar
      Make getTargetStreamer return a possibly null pointer. · 4a1a3606
      Rafael Espindola authored
      This will allow it to be called from target independent parts of the main
      streamer that don't know if there is a registered target streamer or not. This
      in turn will allow targets to perform extra actions at specified points in the
      interface: add extra flags for some labels, extra work during finalization, etc.
      
      llvm-svn: 199174
      4a1a3606
    • Duncan P. N. Exon Smith's avatar
      Remove extra } in documentation comment · f56df6e9
      Duncan P. N. Exon Smith authored
      llvm-svn: 199162
      f56df6e9
  2. Jan 13, 2014
    • Juergen Ributzka's avatar
      [DAG] Teach DAG to also reassociate vector operations · 7384405f
      Juergen Ributzka authored
      This commit teaches DAG to reassociate vector ops, which in turn enables
      constant folding of vector op chains that appear later on during custom lowering
      and DAG combine.
      
      Reviewed by Andrea Di Biagio
      
      llvm-svn: 199135
      7384405f
    • Rafael Espindola's avatar
      Update getLazyBitcodeModule to use ErrorOr for error handling. · 5b6c1e8e
      Rafael Espindola authored
      llvm-svn: 199125
      5b6c1e8e
    • Chris Lattner's avatar
      fix a -Wdocumentation warning. · bdf51784
      Chris Lattner authored
      llvm-svn: 199113
      bdf51784
    • Chandler Carruth's avatar
      [PM] Split DominatorTree into a concrete analysis result object which · 73523021
      Chandler Carruth authored
      can be used by both the new pass manager and the old.
      
      This removes it from any of the virtual mess of the pass interfaces and
      lets it derive cleanly from the DominatorTreeBase<> template. In turn,
      tons of boilerplate interface can be nuked and it turns into a very
      straightforward extension of the base DominatorTree interface.
      
      The old analysis pass is now a simple wrapper. The names and style of
      this split should match the split between CallGraph and
      CallGraphWrapperPass. All of the users of DominatorTree have been
      updated to match using many of the same tricks as with CallGraph. The
      goal is that the common type remains the resulting DominatorTree rather
      than the pass. This will make subsequent work toward the new pass
      manager significantly easier.
      
      Also in numerous places things became cleaner because I switched from
      re-running the pass (!!! mid way through some other passes run!!!) to
      directly recomputing the domtree.
      
      llvm-svn: 199104
      73523021
    • Chandler Carruth's avatar
      [PM][cleanup] Clean up comments and use modern doxygen in this file. · ca9af6ca
      Chandler Carruth authored
      This is a precursor to breaking the pass that computes the DominatorTree
      apart from the concrete DominatorTree.
      
      llvm-svn: 199103
      ca9af6ca
    • Elena Demikhovsky's avatar
      AVX-512: Embedded Rounding Control - encoding and printing · b19c9dc1
      Elena Demikhovsky authored
      Changed intrinsics for vrcp14/vrcp28 vrsqrt14/vrsqrt28 - aligned with GCC.
      
      llvm-svn: 199102
      b19c9dc1
    • Chandler Carruth's avatar
      [PM] Fix the const-correctness of the generic DominatorTreeBase to · db9120a0
      Chandler Carruth authored
      support notionally const queries even though they may trigger DFS
      numbering updates.
      
      The updating of DFS numbers and tracking of slow queries do not mutate
      the observable state of the domtree. They should be const to
      differentiate them from the APIs which mutate the tree directly to do
      incremental updates.
      
      This will make it possible in a world where the DominatorTree is not
      a pass but merely the result of running a pass to derive DominatorTree
      from the base class as it was originally designed, removing a huge
      duplication of API in DominatorTree.
      
      llvm-svn: 199101
      db9120a0
    • Chandler Carruth's avatar
      [PM] Pull the generic graph algorithms and data structures for dominator · e509db41
      Chandler Carruth authored
      trees into the Support library.
      
      These are all expressed in terms of the generic GraphTraits and CFG,
      with no reliance on any concrete IR types. Putting them in support
      clarifies that and makes the fact that the static analyzer in Clang uses
      them much more sane. When moving the Dominators.h file into the IR
      library I claimed that this was the right home for it but not something
      I planned to work on. Oops.
      
      So why am I doing this? It happens to be one step toward breaking the
      requirement that IR verification can only be performed from inside of
      a pass context, which completely blocks the implementation of
      verification for the new pass manager infrastructure. Fixing it will
      also allow removing the concept of the "preverify" step (WTF???) and
      allow the verifier to cleanly flag functions which fail verification in
      a way that precludes even computing dominance information. Currently,
      that results in a fatal error even when you ask the verifier to not
      fatally error. It's awesome like that.
      
      The yak shaving will continue...
      
      llvm-svn: 199095
      e509db41
    • Chandler Carruth's avatar
      [cleanup] Switch comments to use '\brief' style instead of '@brief' · 634cdb61
      Chandler Carruth authored
      style, and remove some unnecessary comments (the code is perfectly
      self-documenting here). Also clang-format the function declarations as
      they wrap cleanly now.
      
      llvm-svn: 199084
      634cdb61
    • Chandler Carruth's avatar
      [cleanup] Move the Dominators.h and Verifier.h headers into the IR · 5ad5f15c
      Chandler Carruth authored
      directory. These passes are already defined in the IR library, and it
      doesn't make any sense to have the headers in Analysis.
      
      Long term, I think there is going to be a much better way to divide
      these matters. The dominators code should be fully separated into the
      abstract graph algorithm and have that put in Support where it becomes
      obvious that evn Clang's CFGBlock's can use it. Then the verifier can
      manually construct dominance information from the Support-driven
      interface while the Analysis library can provide a pass which both
      caches, reconstructs, and supports a nice update API.
      
      But those are very long term, and so I don't want to leave the really
      confusing structure until that day arrives.
      
      llvm-svn: 199082
      5ad5f15c
    • Chandler Carruth's avatar
      [PM] Wire up support for writing bitcode with new PM. · b7bdfd65
      Chandler Carruth authored
      This moves the old pass creation functionality to its own header and
      updates the callers of that routine. Then it adds a new PM supporting
      bitcode writer to the header file, and wires that up in the opt tool.
      A test is added that round-trips code into bitcode and back out using
      the new pass manager.
      
      llvm-svn: 199078
      b7bdfd65
  3. Jan 12, 2014
  4. Jan 11, 2014
  5. Jan 10, 2014
  6. Jan 09, 2014
Loading