1. 08 9月, 2014 4 次提交
  2. 07 9月, 2014 10 次提交
  3. 06 9月, 2014 20 次提交
    • P
      Fix ICE with trans of calls to foreign fns · 808e039d
      Piotr Czarnecki 提交于
      It was failing occasionally.
      808e039d
    • P
      rustc: Refactor middle::trans::inline · 10935de0
      Piotr Czarnecki 提交于
      10935de0
    • V
      Disable test_lots_of_files on Windows · 6a7e6017
      Vadim Chugunov 提交于
      6a7e6017
    • H
      Use more jQuery to avoid displaying Expand Description more often. · 9151874f
      Huon Wilson 提交于
      Sometimes (e.g. on Rust CI) the "expand description" text of the
      collapse toggle was displayed by default, when a page is first
      loaded (even though the description is expanded), because some
      Content-Security-Policy settings disable inline CSS.
      
      Setting it the style with the `.css` method allows the output to be used
      in more places.
      9151874f
    • J
      Fix documentation typo. · 4755441f
      jamesluke 提交于
      4755441f
    • S
      don't use `ld -r` with `-C codegen-units=1` · 6d2d47b2
      Stuart Pernsteiner 提交于
      6d2d47b2
    • B
      Optimize Slice::reverse · 7e12e679
      Brian Anderson 提交于
      This makes the completely safe implementation of fannkuchredux perform
      the same as C++. Yay, Rust.
      7e12e679
    • S
      4d9a4786
    • S
      1b676fb7
    • S
    • S
      add tests for separate compilation · 4b702698
      Stuart Pernsteiner 提交于
      4b702698
    • S
      make separate compilation respect #[inline] attributes · 73f8adcb
      Stuart Pernsteiner 提交于
      Adjust the handling of `#[inline]` items so that they get translated into every
      compilation unit that uses them.  This is necessary to preserve the semantics
      of `#[inline(always)]`.
      
      Crate-local `#[inline]` functions and statics are blindly translated into every
      compilation unit.  Cross-crate inlined items and monomorphizations of
      `#[inline]` functions are translated the first time a reference is seen in each
      compilation unit.  When using multiple compilation units, inlined items are
      given `available_externally` linkage whenever possible to avoid duplicating
      object code.
      73f8adcb
    • S
      make symbols internal when possible · edc5cdcb
      Stuart Pernsteiner 提交于
      Add a post-processing pass to `trans` that converts symbols from external to
      internal when possible.  Translation with multiple compilation units initially
      makes most symbols external, since it is not clear when translating a
      definition whether that symbol will need to be accessed from another
      compilation unit.  This final pass internalizes symbols that are not reachable
      from other crates and not referenced from other compilation units, so that LLVM
      can perform more aggressive optimizations on those symbols.
      edc5cdcb
    • S
      avoid duplicate translation of monomorphizations, drop glue, and visit glue · e09bef81
      Stuart Pernsteiner 提交于
      Use a shared lookup table of previously-translated monomorphizations/glue
      functions to avoid translating those functions in every compilation unit where
      they're used.  Instead, the function will be translated in whichever
      compilation unit uses it first, and the remaining compilation units will link
      against that original definition.
      e09bef81
    • S
      translate into multiple llvm contexts · da960624
      Stuart Pernsteiner 提交于
      Rotate between compilation units while translating.  The "worker threads"
      commit added support for multiple compilation units, but only translated into
      one, leaving the rest empty.  With this commit, `trans` rotates between various
      compilation units while translating, using a simple stragtegy: upon entering a
      module, switch to translating into whichever compilation unit currently
      contains the fewest LLVM instructions.
      
      Most of the actual changes here involve getting symbol linkage right, so that
      items translated into different compilation units will link together properly
      at the end.
      da960624
    • S
      reuse original symbols for inlined items · 2e7bc0f8
      Stuart Pernsteiner 提交于
      When inlining an item from another crate, use the original symbol from that
      crate's metadata instead of generating a new symbol using the `ast::NodeId` of
      the inlined copy.  This requires exporting symbols in the crate metadata in a
      few additional cases.  Having predictable symbols for inlined items will be
      useful later to avoid generating duplicate object code for inlined items.
      2e7bc0f8
    • S
      run optimization and codegen on worker threads · cf672850
      Stuart Pernsteiner 提交于
      Refactor the code in `llvm::back` that invokes LLVM optimization and codegen
      passes so that it can be called from worker threads.  (Previously, it used
      `&Session` extensively, and `Session` is not `Share`.)  The new code can handle
      multiple compilation units, by compiling each unit to `crate.0.o`, `crate.1.o`,
      etc., and linking together all the `crate.N.o` files into a single `crate.o`
      using `ld -r`.  The later linking steps can then be run unchanged.
      
      The new code preserves the behavior of `--emit`/`-o` when building a single
      compilation unit.  With multiple compilation units, the `--emit=asm/ir/bc`
      options produce multiple files, so combinations like `--emit=ir -o foo.ll` will
      not actually produce `foo.ll` (they instead produce several `foo.N.ll` files).
      
      The new code supports `-Z lto` only when using a single compilation unit.
      Compiling with multiple compilation units and `-Z lto` will produce an error.
      (I can't think of any good reason to do such a thing.)  Linking with `-Z lto`
      against a library that was built as multiple compilation units will also fail,
      because the rlib does not contain a `crate.bytecode.deflate` file.  This could
      be supported in the future by linking together the `crate.N.bc` files produced
      when compiling the library into a single `crate.bc`, or by making the LTO code
      support multiple `crate.N.bytecode.deflate` files.
      cf672850
    • S
      move back::link::write into a separate file · e29aa143
      Stuart Pernsteiner 提交于
      e29aa143
    • S
      split CrateContext into shared and local pieces · 0ab27b1d
      Stuart Pernsteiner 提交于
      Break up `CrateContext` into `SharedCrateContext` and `LocalCrateContext`.  The
      local piece corresponds to a single compilation unit, and contains all
      LLVM-related components.  (LLVM data structures are tied to a specific
      `LLVMContext`, and we will need separate `LLVMContext`s to safely run
      multithreaded optimization.)  The shared piece contains data structures that
      need to be shared across all compilation units, such as the `ty::ctxt` and some
      tables related to crate metadata.
      0ab27b1d
    • S
      make CrateContext fields private · cf35cb36
      Stuart Pernsteiner 提交于
      cf35cb36
  4. 05 9月, 2014 6 次提交