about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back/write.rs
AgeCommit message (Collapse)AuthorLines
2019-10-08Rollup merge of #65081 - Mark-Simulacrum:remove-profile-queries, ↵Mazdak Farrokhzad-3/+1
r=michaelwoerister Remove -Zprofile-queries r? @michaelwoerister Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
2019-10-05Replaces some instances of `as *[const | mut] _` with `.cast()`memoryruins-7/+7
2019-10-03Remove -Zprofile-queriesMark Rousskov-3/+1
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-11/+14
2019-07-15Don't add extra passes into the function pass managerNikita Popov-39/+49
Exception for specific cases like linting, additional passes should be going into the module pass manager (even if they are function passes). The separate function pass manager is only used for very early optimization passes. Rather than apparending passes to the MPM, use the OptimizerLast and EnabledOnOptLevel0 pass manager builder extension hooks, which allow adding passes directly before finalization (alias canonicalization and name-anon-globals). The main effect and purpose of this change is to add sanitizer passes at the end of the pipeline, which is where they belong. In LLVM 9 the address sanitizer can't be used as a pass in the early function pass manager, because it has a dependence on a module-level analysis pass.
2019-07-03Remove needless lifetimesJeremy Stucki-3/+3
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-05-28Rename PgoGenerate to something more general.Michael Woerister-3/+3
2019-05-27Use a PathBuf instead of String for representing the pgo-use path internally.Michael Woerister-5/+3
2019-05-16add targetarch for CodegenContextChandler Deng-2/+2
2019-04-20Move some filename constants to cg_ssabjorn3-2/+2
2019-04-14Rollup merge of #59874 - michaelwoerister:pgo-updates-1, r=cramertjMazdak Farrokhzad-6/+16
Clean up handling of `-Z pgo-gen` commandline option. This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
2019-04-14Rollup merge of #59812 - michaelwoerister:profile-gen-msvc-imp, r=alexcrichtonMazdak Farrokhzad-1/+17
Exclude profiler-generated symbols from MSVC __imp_-symbol workaround. LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. Since these show up as globals in the LLVM IR, the compiler generates `dllimport`-related `__imp_` stubs for them. This can lead to linker errors because the instrumentation symbols have weak linkage or are in a comdat section, but the `__imp_` stubs aren't. Instead of trying to replicate the linkage/comdat setup for the stubs, this PR just excludes the profiler-related symbols from stub-generation since they aren't supposed to be referenced via `__declspec(dllimport)` anywhere anyway. r? @alexcrichton EDIT: I considered making this more general, i.e. inferring from the symbol name if it is a Rust symbol or not. But then I figured out that that would yield false negatives for `#[no_mangle]` et al, so I went with a blacklist approach.
2019-04-12Use measureme in self-profilerWesley Wiser-13/+11
Related to #58372 Related to #58967
2019-04-11Clean up handling of -Zpgo-gen commandline option.Michael Woerister-6/+16
2019-04-09Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.Michael Woerister-1/+17
2019-04-05Show better errors for LLVM IR outputJosh Stone-10/+15
I was trying to output LLVM IR directly to the console: $ rustc hello.rs --emit=llvm-ir -o /dev/stdout LLVM ERROR: IO failure on output stream: Bad file descriptor Now `LLVMRustPrintModule` returns an error, and we print: error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied ... which is more informative.
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-9/+10
Since there is nothing to optimise there...
2019-03-10Replace TimeLine with SelfProfilerWesley Wiser-27/+31
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-1/+1
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-15/+14
2019-02-12Stabilize linker-plugin based LTO.Michael Woerister-1/+1
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-22/+29
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-03Auto merge of #56358 - nikic:mergefunc-aliases, r=rkruppebors-4/+5
Enable -mergefunc-use-aliases If the Rust LLVM fork is used, enable the -mergefunc-use-aliases flag, which will create aliases for merged functions, rather than inserting a call from one to the other. A number of codegen tests needed to be adjusted, because functions that previously fell below the thunk limit are now being merged. Merging is prevented in various ways now. I expect that this is going to break something, somewhere, because it isn't able to deal with aliases properly, but we won't find out until we try :) This fixes #52651. r? @rkruppe
2018-12-02Run name-anon-globals after all other passesNikita Popov-4/+5
name-anon-globals should always be run at the very end of the pass pipeline, as optimization passes (in particular mergefunc) may introduce new anonymous globals. I believe we did not run into this earlier because it requires the rather specific combination of a) mergefunc merging two weak functions b) compilation not using thinlto.
2018-11-29Rename conversion util; remove duplicate util in librustc_codegen_llvm.Corey Farwell-5/+5
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16Separating the back folder between backend-agnostic and LLVM-specific codeDenis Merigoux-1827/+43
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-2/+1
2018-11-16Beginning of moving all backend-agnostic code to rustc_codegen_ssaDenis Merigoux-1/+1
2018-11-16Moved Backend interface into rustc_codegen_utilsDenis Merigoux-2/+2
2018-11-16Generalized base:codegen_crateDenis Merigoux-11/+11
2018-11-16Removed phantomdata no longer necessaryDenis Merigoux-11/+6
Because CodegenContext doesn't implement Backend anymore
2018-11-16Removing LLVM content from CommonMethods -> ConstMethodsDenis Merigoux-24/+5
2018-11-16Prefixed type methods & removed trait impl for write::CodegenContextDenis Merigoux-22/+3
2018-11-16Prefixed const methods with "const" instead of "c"Denis Merigoux-6/+6
2018-11-16Traitification of type_ methodsDenis Merigoux-1/+9
The methods are now attached to CodegenCx instead of Type
2018-11-16Added definition of type traitDenis Merigoux-0/+1
2018-11-16Removed code duplication for CommonWriteMethodsDenis Merigoux-13/+5
2018-11-16CommonWriteMethods are not static any moreDenis Merigoux-12/+54
2018-11-16Split CommonMethods to accomodate for use in back/write.rsDenis Merigoux-1/+1
2018-11-16Traitification of common.rs methodsDenis Merigoux-6/+6
2018-11-16Removed genericity over Value in various functionsDenis Merigoux-2/+1
Prelude to using associated types in traits rather than type parameters
2018-11-16Generalized base.rs#call_memcpy and everything that it usesDenis Merigoux-1/+2
Generalized operand.rs#nontemporal_store and fixed tidy issues Generalized operand.rs#nontemporal_store's implem even more With a BuilderMethod trait implemented by Builder for LLVM Cleaned builder.rs : no more code duplication, no more ValueTrait Full traitification of builder.rs
2018-11-10codegen_llvm_back: remove 'static from constsljedrz-2/+2
2018-11-10codegen_llvm_back: use to_owned instead of to_string with string literalsljedrz-1/+1
2018-11-10codegen_llvm_back: improve common patternsljedrz-9/+6