summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/llvm
AgeCommit message (Collapse)AuthorLines
2018-08-31Provide a way of accessing the ThinLTO module import map in rustc.Michael Woerister-0/+9
2018-08-28Fix warnings about the `native` target-cpuAlex Crichton-0/+1
This fixes a regression from #53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes #53322
2018-08-19Add Builder::array_alloca.Masaki Hara-0/+5
2018-08-14Rollup merge of #53290 - whitequark:fix-35741, r=nagisakennytm-1/+2
Make LLVM emit assembly comments with -Z asm-comments Fixes #35741, and makes `-Z asm-comments` actually do something useful. Before: ``` .section .text.main,"ax",@progbits .globl main .p2align 4, 0x90 .type main,@function main: .cfi_startproc pushq %rax .cfi_def_cfa_offset 16 movslq %edi, %rax leaq _ZN1t4main17he95a7d4f1843730eE(%rip), %rdi movq %rsi, (%rsp) movq %rax, %rsi movq (%rsp), %rdx callq _ZN3std2rt10lang_start17h3121da83b2bc3697E movl %eax, %ecx movl %ecx, %eax popq %rcx .cfi_def_cfa_offset 8 retq .Lfunc_end8: .size main, .Lfunc_end8-main .cfi_endproc ``` After: ``` .section .text.main,"ax",@progbits .globl main # -- Begin function main .p2align 4, 0x90 .type main,@function main: # @main .cfi_startproc # %bb.0: pushq %rax .cfi_def_cfa_offset 16 movslq %edi, %rax leaq _ZN1t4main17he95a7d4f1843730eE(%rip), %rdi movq %rsi, (%rsp) # 8-byte Spill movq %rax, %rsi movq (%rsp), %rdx # 8-byte Reload callq _ZN3std2rt10lang_start17h3121da83b2bc3697E movl %eax, %ecx movl %ecx, %eax popq %rcx .cfi_def_cfa_offset 8 retq .Lfunc_end8: .size main, .Lfunc_end8-main .cfi_endproc # -- End function ```
2018-08-13Auto merge of #53161 - michaelwoerister:cstrings, r=wesleywiserbors-2/+3
Avoid many allocations for CStrings during codegen. Giving in to my irrational fear of dynamic allocations. Let's see what perf says to this.
2018-08-12Make LLVM emit assembly comments with -Z asm-comments.whitequark-1/+2
Fixes #35741.
2018-08-10[nll] librustc_codegen_llvm: change Child signature to fix error pointed out ↵memoryruins-1/+1
by nll As explained by eddyb in #53221, "An &ArchiveChild doesn't point into the archive itself, it points to an owned object that itself points to the archive, and LLVMRustArchiveMemberNew copies the ArchiveChild (whereas the current signature suggests it keeps the &ArchiveChild)."
2018-08-10Introduce SmallCStr and use it where applicable.Michael Woerister-2/+3
2018-08-07Auto merge of #51007 - AstralSorcerer:master, r=nagisabors-0/+1
Make globals with private linkage unnamed. Fixes #50862. cc @oli-obk @nagisa
2018-07-31Make globals with private linkage unnamed. Fixes #50862.Colin Pronovost-0/+1
2018-07-31rustc: Handle linker diagnostic from LLVMAlex Crichton-0/+5
Previously linker diagnostic were being hidden when two modules were linked together but failed to link. This commit fixes the situation by ensuring that we have a diagnostic handler installed and also adds support for handling linker diagnostics.
2018-07-30rustc_codegen_llvm: fix ownership of DIBuilder.Irina Popa-30/+31
2018-07-30rustc_codegen_llvm: fix ownership of Builder.Irina Popa-94/+103
2018-07-30rustc_codegen_llvm: fix tidy errors.Irina Popa-4/+11
2018-07-30rustc_codegen_llvm: use safe references for ThinLTOData.Irina Popa-6/+6
2018-07-30rustc_codegen_llvm: use safe references for ThinLTOBuffer.Irina Popa-4/+4
2018-07-30rustc_codegen_llvm: use safe references for ModuleBuffer.Irina Popa-4/+4
2018-07-30rustc_codegen_llvm: use safe references for RustArchiveMember.Irina Popa-6/+6
2018-07-30rustc_codegen_llvm: use safe references for ArchiveChild.Irina Popa-35/+53
2018-07-30rustc_codegen_llvm: use safe references for ArchiveIterator.Irina Popa-9/+6
2018-07-30rustc_codegen_llvm: use safe references for Linker.Irina Popa-5/+4
2018-07-30rustc_codegen_llvm: use safe references for SectionIterator.Irina Popa-14/+13
2018-07-30rustc_codegen_llvm: use safe references for PassManager.Irina Popa-18/+17
2018-07-30rustc_codegen_llvm: use safe references for OperandBundleDef.Irina Popa-18/+20
2018-07-30rustc_codegen_llvm: use safe mutable references for output parameters.Irina Popa-10/+10
2018-07-30rustc_codegen_llvm: use safe references for RustString.Irina Popa-30/+33
2018-07-30rustc_codegen_llvm: use safe references for Twine, DiagnosticInfo, SMDiagnostic.Irina Popa-24/+21
2018-07-30rustc_codegen_llvm: use safe references for Archive.Irina Popa-17/+11
2018-07-30rustc_codegen_llvm: use safe references for TargetMachine.Irina Popa-8/+7
2018-07-30rustc_codegen_llvm: use safe references for Pass.Irina Popa-4/+3
2018-07-30rustc_codegen_llvm: use safe references for PassManagerBuilder.Irina Popa-14/+13
2018-07-30rustc_codegen_llvm: use safe references for MemoryBuffer and ObjectFile.Irina Popa-17/+14
2018-07-30rustc_codegen_llvm: remove more unused functions.Irina Popa-176/+19
2018-07-30rustc_codegen_llvm: remove unused UseRef type.Irina Popa-7/+0
2018-07-30rustc_codegen_llvm: use safe references for BasicBlock.Irina Popa-25/+24
2018-07-30rustc_codegen_llvm: use safe references for Value.Irina Popa-506/+510
2018-07-30rustc_codegen_llvm: remove _opaque suffix.Irina Popa-49/+49
2018-07-30rustc_codegen_llvm: remove #![allow(dead_code)] from llvm.Irina Popa-37/+2
2018-07-30rustc_codegen_llvm: remove unused ExecutionEngineRef type.Irina Popa-2/+0
2018-07-30rustc_codegen_llvm: use safe references for Metadata and DI*.Irina Popa-108/+102
2018-07-30rustc_codegen_llvm: use safe references for DIBuilder.Irina Popa-29/+28
2018-07-30rustc_codegen_llvm: use safe references for Builder.Irina Popa-141/+140
2018-07-30rustc_codegen_llvm: use safe references for Type.Irina Popa-82/+81
2018-07-30rustc_codegen_llvm: use safe references for Context and Module.Irina Popa-87/+83
2018-07-30rustc_codegen_llvm: move from empty enums to extern types.Irina Popa-87/+68
2018-07-30rustc_llvm: move to rustc_codegen_llvm::llvm.Irina Popa-0/+2431