1. 09 7月, 2013 16 次提交
  2. 08 7月, 2013 19 次提交
    • B
      auto merge of #7645 : dotdash/rust/immediate_retvals, r=cmr · ed69ef0b
      bors 提交于
      There are lots of unneeded allocas and Store/Load cycles for calls with
      immediate return values. This is a first step towards removing that, allowing
      immediate return values to be directly returned from trans_call_inner and
      trans_lang_call (for now), instead of always stuffing them into an alloca.
      
      For now, only a few things take advantage of the new behaviour, but this
      already saves 16k allocas and 43k lines in total in the unoptimized IR
      for librustc. Running "make check" under time shows that CPU time for
      the unoptimized test suite is reduced by about 7%.
      ed69ef0b
    • B
      Improve handling of immediate return values · 00ba8b3a
      Björn Steinbrink 提交于
      We currently still handle immediate return values a lot like
      non-immediate ones. We provide a slot for them and store them into
      memory, often just to immediately load them again. To improve this
      situation, trans_call_inner has to return a Result which contains the
      immediate return value.
      
      Also, it also needs to accept "No destination" in addition to just
      SaveIn and Ignore. Since "No destination" isn't something that fits
      well into the Dest type, I've chosen to simply use Option<Dest>
      instead, paired with an assertion that checks that "None" is only
      allowed for immediate return values.
      00ba8b3a
    • B
      auto merge of #7568 : alexcrichton/rust/check-lite, r=huonw · 65ed8033
      bors 提交于
      A lot of cross-platform issues stem from rusti/rustpkg, so include these two test suites in the 'check-lite' target which is run on the cross-compile bots. It shouldn't be much of a performance hit because these suites are pretty fast to run.
      
      Hopefully this will make snapshot/tarball creation easier in the future. 
      65ed8033
    • B
      Avoid unused allocas for immediate return values · 4a485f8c
      Björn Steinbrink 提交于
      There's no need to allocate a return slot for anykind of immediate
      return value, not just not for nils. Also, when the return value is
      ignored, we only have to copy it to a temporary alloca if it's actually
      required to call drop_ty on it.
      4a485f8c
    • B
      auto merge of #7605 : thestinger/rust/vec, r=Aatch · 48ad726f
      bors 提交于
      This is work continued from the now landed #7495 and #7521 pulls.
      
      Removing the headers from unique vectors is another project, so I've separated the allocator.
      48ad726f
    • D
      remove headers from exchange allocations · 90f1db10
      Daniel Micay 提交于
      90f1db10
    • D
      Merge pull request #7595 from thestinger/iterator · 44770ae3
      Daniel Micay 提交于
      remove some method resolve workarounds
      44770ae3
    • D
      add a temporary vector_exchange_malloc lang item · 0aedecf9
      Daniel Micay 提交于
      0aedecf9
    • D
      vec: make vec_reserve_shared_actual private · 7bf34c34
      Daniel Micay 提交于
      7bf34c34
    • B
      auto merge of #7497 : alexcrichton/rust/issue-7394, r=huonw · 96ae0008
      bors 提交于
      96ae0008
    • B
      auto merge of #7591 : alexcrichton/rust/fix-warnings, r=huonw · e07ae9e6
      bors 提交于
      Closes #7589
      e07ae9e6
    • A
      Add rusti/rustpkg to check-lite · d49acef0
      Alex Crichton 提交于
      Ironically also disable rusti tests for now, but mainly because they're awaiting
      LLVM upgrades before proceeding
      d49acef0
    • A
      Fix a warning when generating tests · a02e37c3
      Alex Crichton 提交于
      a02e37c3
    • B
      auto merge of #7586 : g5pw/rust/master, r=cmr · 6d6b1a8b
      bors 提交于
      This updates the script in src/etc/local_stage0.sh to copy the correct libraries
      to stage0.
      6d6b1a8b
    • D
      remove some method resolve workarounds · 641aec74
      Daniel Micay 提交于
      641aec74
    • B
      auto merge of #7629 : thestinger/rust/rope, r=graydon · ddf8247d
      bors 提交于
      It's broken/unmaintained and needs to be rewritten to avoid managed
      pointers and needless copies. A full rewrite is necessary and the API
      will need to be redone so it's not worth keeping this around (#7628).
      
      Closes #2236, #2744
      ddf8247d
    • B
      auto merge of #7456 : graydon/rust/better-trans-stats, r=cmr · 28643d41
      bors 提交于
      This way when you compile with -Z trans-stats you'll get a per-function cost breakdown, sorted with the most expensive functions first. Should help highlight pathological code.
      28643d41
    • B
      auto merge of #7636 : dotdash/rust/scope_cleanup, r=graydon · 52abd1cc
      bors 提交于
      Currently, scopes are tied to LLVM basic blocks. For each scope, there
      are two new basic blocks, which means two extra jumps in the unoptimized
      IR. These blocks aren't actually required, but only used to act as the
      boundary for cleanups.
      
      By keeping track of the current scope within a single basic block, we
      can avoid those extra blocks and jumps, shrinking the pre-optimization
      IR quite considerably. For example, the IR for trans_intrinsic goes
      from ~22k lines to ~16k lines, almost 30% less.
      
      The impact on the build times of optimized builds is rather small (about
      1%), but unoptimized builds are about 11% faster. The testsuite for
      unoptimized builds runs between 15% (CPU time) and 7.5% (wallclock time on
      my i7) faster.
      
      Also, in some situations this helps LLVM to generate better code by
      inlining functions that it previously considered to be too large.
      Likely because of the pointless blocks/jumps that were still present at
      the time the inlining pass runs.
      
      Refs #7462
      52abd1cc
    • B
      auto merge of #7602 : blake2-ppc/rust/vec-pop-opt, r=cmr · 3c44265d
      bors 提交于
      Implement methods `.pop_opt() -> Option<T>` and `.shift_opt() -> Option<T>` to allow retrieval of front/back of a vec in one operation without fail. .pop() and .shift() are changed to reuse the former two methods.
      
      Follows the naming of the previous method .head_opt()
      3c44265d
  3. 07 7月, 2013 5 次提交
    • B
      auto merge of #7594 : chris-morgan/rust/proper-net-module-structure, r=huonw · 005c9bde
      bors 提交于
      Where * = tcp, ip, url.
      
      Formerly, extra::net::* were aliases of extra::net_*, but were the
      recommended path to use. Thus, the documentation talked of the `net_*`
      modules while everything else was written expecting `net::*`.
      
      This moves the actual modules so that `extra::net::*` is the actual
      location of the modules.
      
      This will naturally break any code which used `extra::net_*` directly.
      They should be altered to use `extra::net::*` (which has been the
      documented way of doing things for some time).
      
      This ensures that there is one, and only one, obvious way of doing
      things.
      005c9bde
    • B
      Implement scopes independent of LLVM basic blocks · e41e4358
      Björn Steinbrink 提交于
      Currently, scopes are tied to LLVM basic blocks. For each scope, there
      are two new basic blocks, which means two extra jumps in the unoptimized
      IR. These blocks aren't actually required, but only used to act as the
      boundary for cleanups.
      
      By keeping track of the current scope within a single basic block, we
      can avoid those extra blocks and jumps, shrinking the pre-optimization
      IR quite considerably. For example, the IR for trans_intrinsic goes
      from ~22k lines to ~16k lines, almost 30% less.
      
      The impact on the build times of optimized builds is rather small (about
      1%), but unoptimized builds are about 11% faster. The testsuite for
      unoptimized builds runs between 15% (CPU time) and 7.5% (wallclock time on
      my i7) faster.
      
      Also, in some situations this helps LLVM to generate better code by
      inlining functions that it previously considered to be too large.
      Likely because of the pointless blocks/jumps that were still present at
      the time the inlining pass runs.
      
      Refs #7462
      e41e4358
    • B
      auto merge of #7615 : Aatch/rust/syntax-deshare, r=graydon · 0f251558
      bors 提交于
      In an ideal world, the AST would be completely sendable, this gets us a step closer.
      
      It removes the local heap allocations for `view_item`, `Path`, `Lifetime` `trait_ref` `OptVec<TyParamBounds>` and `Ty`. There are also a few other smaller changes I made as things went along.
      0f251558
    • J
      Fix merge-fallout-typo · 280e4245
      James Miller 提交于
      280e4245
    • J
      Fix broken tests · 1fd735d3
      James Miller 提交于
      1fd735d3