1. 06 1月, 2018 1 次提交
    • S
      Use name-discarding LLVM context · b719578f
      Simonas Kazlauskas 提交于
      This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not
      requested.
      
      In case either of these outputs are wanted, but the benefits of such context are
      desired as well, -Zfewer_names option provides the same functionality regardless
      of the outputs requested.
      b719578f
  2. 04 1月, 2018 3 次提交
  3. 13 12月, 2017 1 次提交
  4. 06 12月, 2017 1 次提交
  5. 02 12月, 2017 1 次提交
  6. 21 11月, 2017 1 次提交
  7. 19 11月, 2017 2 次提交
  8. 08 11月, 2017 2 次提交
    • R
    • R
      Saturating casts between integers and floats (both directions). · 0d6b52c2
      Robin Kruppe 提交于
      This affects regular code generation as well as constant evaluation in trans,
      but not the HIR constant evaluator because that one returns an error for
      overflowing casts and NaN-to-int casts. That error is conservatively
      correct and we should be careful to not accept more code in constant
      expressions.
      The changes to code generation are guarded by a new -Z flag, to be able
      to evaluate the performance impact. The trans constant evaluation changes
      are unconditional because they have no run time impact and don't affect
      type checking either.
      0d6b52c2
  9. 10 10月, 2017 1 次提交
    • A
      Band-aid fix to stop race conditions in llvm errors · 8628d51c
      Aidan Hobson Sayers 提交于
      This is a big hammer, but should be effective at completely removing a
      few issues, including inconsistent error messages and segfaults when
      LLVM workers race to report results
      
      LLVM_THREAD_LOCAL has been present in LLVM since 8 months before 3.7
      (the earliest supported LLVM version that Rust can use)
      
      Maybe fixes #43402 (third time lucky?)
      8628d51c
  10. 30 9月, 2017 1 次提交
    • A
      rustc: Enable LTO and multiple codegen units · ded38dbf
      Alex Crichton 提交于
      This commit is a refactoring of the LTO backend in Rust to support compilations
      with multiple codegen units. The immediate result of this PR is to remove the
      artificial error emitted by rustc about `-C lto -C codegen-units-8`, but longer
      term this is intended to lay the groundwork for LTO with incremental compilation
      and ultimately be the underpinning of ThinLTO support.
      
      The problem here that needed solving is that when rustc is producing multiple
      codegen units in one compilation LTO needs to merge them all together.
      Previously only upstream dependencies were merged and it was inherently relied
      on that there was only one local codegen unit. Supporting this involved
      refactoring the optimization backend architecture for rustc, namely splitting
      the `optimize_and_codegen` function into `optimize` and `codegen`. After an LLVM
      module has been optimized it may be blocked and queued up for LTO, and only
      after LTO are modules code generated.
      
      Non-LTO compilations should look the same as they do today backend-wise, we'll
      spin up a thread for each codegen unit and optimize/codegen in that thread. LTO
      compilations will, however, send the LLVM module back to the coordinator thread
      once optimizations have finished. When all LLVM modules have finished optimizing
      the coordinator will invoke the LTO backend, producing a further list of LLVM
      modules. Currently this is always a list of one LLVM module. The coordinator
      then spawns further work to run LTO and code generation passes over each module.
      
      In the course of this refactoring a number of other pieces were refactored:
      
      * Management of the bytecode encoding in rlibs was centralized into one module
        instead of being scattered across LTO and linking.
      * Some internal refactorings on the link stage of the compiler was done to work
        directly from `CompiledModule` structures instead of lists of paths.
      * The trans time-graph output was tweaked a little to include a name on each
        bar and inflate the size of the bars a little
      ded38dbf
  11. 22 7月, 2017 2 次提交
  12. 21 7月, 2017 4 次提交
  13. 28 5月, 2017 1 次提交
  14. 01 5月, 2017 1 次提交
    • W
      Add profiling support, through the rustc -Z profile flag. · 42754ce7
      whitequark 提交于
      When -Z profile is passed, the GCDAProfiling LLVM pass is added
      to the pipeline, which uses debug information to instrument the IR.
      After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno
      file is created, containing initial profiling information.
      After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda
      file is created, containing branch counters.
      
      The created *.gcno and *.gcda files can be processed using
      the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM
      generates does not faithfully follow the GCC's format for *.gcno
      and *.gcda files, and so it will probably not work with other tools
      (such as gcov itself) that consume these files.
      42754ce7
  15. 13 4月, 2017 1 次提交
  16. 17 3月, 2017 3 次提交
  17. 12 2月, 2017 1 次提交
  18. 11 2月, 2017 1 次提交
  19. 09 2月, 2017 1 次提交
  20. 05 2月, 2017 1 次提交
    • T
      Emit DW_AT_main_subprogram · b037c521
      Tom Tromey 提交于
      This changes rustc to emit DW_AT_main_subprogram on the "main" program.
      This lets gdb suitably stop at the user's main in response to
      "start" (rather than the library's main, which is what happens
      currently).
      
      Fixes #32620
      r? michaelwoerister
      b037c521
  21. 04 2月, 2017 2 次提交
    • D
      [llvm] Use 32-bits for alignment · b4e6f70e
      Dylan McKay 提交于
      LLVM 4.0 changes this. This change is fine to make for LLVM 3.9 as we
      won't have alignments greater than 2^32-1.
      b4e6f70e
    • D
      Support a debug info API change for LLVM 4.0 · 768c6c08
      Dylan McKay 提交于
      Instead of directly creating a 'DIGlobalVariable', we now have to create
      a 'DIGlobalVariableExpression' which itself contains a reference to a
      'DIGlobalVariable'.
      
      This is a straightforward change.
      
      In the future, we should rename 'DIGlobalVariable' in the FFI
      bindings, assuming we will only refer to 'DIGlobalVariableExpression'
      and not 'DIGlobalVariable'.
      768c6c08
  22. 27 1月, 2017 1 次提交
  23. 14 1月, 2017 1 次提交
    • R
      Fix covered-switch-default warnings in RustWrapper · 004f18d9
      Ruud van Asseldonk 提交于
      These switch statements cover all possible values, so the default case
      is dead code (it contains an llvm_unreachable anyway), triggering a
      -Wcovered-switch-default warning. Moving the unreachable after the
      switch resolves these warnings. This keeps the build output clean.
      004f18d9
  24. 01 1月, 2017 1 次提交
    • I
      Improve naming style in rustllvm. · e6f97114
      Ian Kerins 提交于
      As per the LLVM style guide, use CamelCase for all locals and classes,
      and camelCase for all non-FFI functions.
      Also, make names of variables of commonly used types more consistent.
      
      Fixes #38688.
      e6f97114
  25. 30 12月, 2016 4 次提交
  26. 22 12月, 2016 1 次提交