1. 28 6月, 2022 1 次提交
  2. 20 4月, 2022 2 次提交
  3. 11 4月, 2022 1 次提交
  4. 14 1月, 2022 1 次提交
    • A
      Remove LLVMRustMarkAllFunctionsNounwind · 606d9c0c
      Amanieu d'Antras 提交于
      This was originally introduced in #10916 as a way to remove all landing
      pads when performing LTO. However this is no longer necessary today
      since rustc properly marks all functions and call-sites as nounwind
      where appropriate.
      
      In fact this is incorrect in the presence of `extern "C-unwind"` which
      must create a landing pad when compiled with `-C panic=abort` so that
      foreign exceptions are caught and properly turned into aborts.
      606d9c0c
  5. 13 12月, 2021 2 次提交
  6. 11 11月, 2021 1 次提交
  7. 09 11月, 2021 2 次提交
  8. 06 11月, 2021 1 次提交
    • T
      Initialize LLVM time trace profiler on each code generation thread · 5a09e121
      Tomasz Miąsko 提交于
      In https://reviews.llvm.org/D71059 LLVM 11, the time trace profiler was
      extended to support multiple threads.
      
      `timeTraceProfilerInitialize` creates a thread local profiler instance.
      When a thread finishes `timeTraceProfilerFinishThread` moves a thread
      local instance into a global collection of instances. Finally when all
      codegen work is complete `timeTraceProfilerWrite` writes data from the
      current thread local instance and the instances in global collection
      of instances.
      
      Previously, the profiler was intialized on a single thread only. Since
      this thread performs no code generation on its own, the resulting
      profile was empty.
      
      Update LLVM codegen to initialize & finish time trace profiler on each
      code generation thread.
      5a09e121
  9. 23 10月, 2021 2 次提交
  10. 18 10月, 2021 1 次提交
  11. 12 10月, 2021 1 次提交
    • J
      Add -Z no-unique-section-names to reduce ELF header bloat. · 4ed846ad
      Javier Blazquez 提交于
      This change adds a new compiler flag that can help reduce the size of
      ELF binaries that contain many functions.
      
      By default, when enabling function sections (which is the default for most
      targets), the LLVM backend will generate different section names for each
      function. For example, a function "func" would generate a section called
      ".text.func". Normally this is fine because the linker will merge all those
      sections into a single one in the binary. However, starting with LLVM 12
      (llvm/llvm-project@ee5d1a0), the backend will
      also generate unique section names for exception handling, resulting in
      thousands of ".gcc_except_table.*" sections ending up in the final binary
      because some linkers don't currently merge or strip these EH sections.
      This can bloat the ELF headers and string table significantly in
      binaries that contain many functions.
      
      The new option is analogous to Clang's -fno-unique-section-names, and
      instructs LLVM to generate the same ".text" and ".gcc_except_table"
      section for each function, resulting in smaller object files and
      potentially a smaller final binary.
      4ed846ad
  12. 07 10月, 2021 1 次提交
    • M
      Enable AutoFDO. · a17193db
      Michael Benfield 提交于
      This largely involves implementing the options debug-info-for-profiling
      and profile-sample-use and forwarding them on to LLVM.
      
      AutoFDO can be used on x86-64 Linux like this:
      rustc -O -Cdebug-info-for-profiling main.rs -o main
      perf record -b ./main
      create_llvm_prof --binary=main --out=code.prof
      rustc -O -Cprofile-sample-use=code.prof main.rs -o main2
      
      Now `main2` will have feedback directed optimization applied to it.
      
      The create_llvm_prof tool can be obtained from this github repository:
      https://github.com/google/autofdo
      
      Fixes #64892.
      a17193db
  13. 28 9月, 2021 1 次提交
    • A
      PassWrapper: handle function rename from upstream D36850 · 12c3f50a
      Augie Fackler 提交于
      thinLTOResolvePrevailingInModule became thinLTOFinalizeInModule and
      gained the ability to propagate noRecurse and noUnwind function
      attributes. I ran codegen tests with it both on and off, as the upstream
      patch uses it in both modes, and the tests pass both ways. Given that,
      it seemed reasonable to go ahead and let the propagation be enabled in
      rustc, and see what happens. See https://reviews.llvm.org/D36850 for
      more examples of how the new version of the function gets used.
      12c3f50a
  14. 25 9月, 2021 1 次提交
    • N
      Use correct pipeline for LTO at O0 · 074bbc6b
      Nikita Popov 提交于
      Unlike the pre-link piplines, the LTO pipelines do support O0,
      and using them is required to avoid leaving behind undefined
      references for the linker.
      074bbc6b
  15. 17 9月, 2021 3 次提交
  16. 16 9月, 2021 1 次提交
    • A
      PassWrapper: handle separate Module*SanitizerPass · a97f89ae
      Augie Fackler 提交于
      Change ab41eef9aca3 in LLVM split MemorySanitizerPass into
      MemorySanitizerPass for functions and ModuleMemorySanitizerPass for
      modules. There's a related change for ThreadSanitizerPass, and in here
      since we're using a ModulePassManager I only add the module flavor of
      the pass on LLVM 14.
      
      r? @nikic cc @nagisa
      a97f89ae
  17. 20 8月, 2021 1 次提交
    • A
      PassWrapper: adapt for LLVM 14 changes · c4e61853
      Augie Fackler 提交于
      These API changes appear to have all taken place in
      https://reviews.llvm.org/D105007, which moved HWAddressSanitizerPass and
      AddressSanitizerPass to only accept their options type as a ctor
      argument instead of the sequence of bools etc. This required a couple of
      parameter additions, which I made match the default prior to the
      mentioned upstream LLVM change.
      
      This patch restores rustc to building (though not quite passing all
      tests, I've mailed other patches for those issues) against LLVM HEAD.
      c4e61853
  18. 07 8月, 2021 1 次提交
  19. 18 5月, 2021 1 次提交
  20. 08 5月, 2021 3 次提交
  21. 30 4月, 2021 1 次提交
  22. 09 4月, 2021 1 次提交
  23. 23 3月, 2021 2 次提交
  24. 20 3月, 2021 1 次提交
  25. 17 3月, 2021 1 次提交
  26. 12 3月, 2021 2 次提交
  27. 04 3月, 2021 1 次提交
  28. 28 2月, 2021 1 次提交
  29. 08 2月, 2021 1 次提交
  30. 16 12月, 2020 1 次提交
    • D
      llvm: update ffi bindings for split dwarf · 341aa97a
      David Wood 提交于
      This commit modifies the FFI bindings to LLVM required for Split DWARF
      support in rustc. In particular:
      
      - `addPassesToEmitFile`'s wrapper, `LLVMRustWriteOutputFile` now takes
        a `DwoPath` `const char*`. When disabled, `nullptr` should be provided
        which will preserve existing behaviour. When enabled, the path to the
        `.dwo` file should be provided.
      - `createCompileUnit`'s wrapper, `LLVMRustDIBuilderCreateCompileUnit`
        now has two additional arguments, for the `DWOId` and to enable
        `SplitDebugInlining`. `DWOId` should always be zero.
      - `createTargetMachine`'s wrapper, `LLVMRustCreateTargetMachine` has an
        additional argument which should be provided the path to the `.dwo`
        when enabled.
      Signed-off-by: NDavid Wood <david@davidtw.co>
      341aa97a