about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/base.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-205/+0
2020-08-20Switch to Snappy compression for metadataJosh Triplett-5/+2
2020-07-17Generating the coverage mapRich Kadel-5/+6
rustc now generates the coverage map and can support (limited) coverage report generation, at the function level. Example: $ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu $ $BUILD/stage1/bin/rustc -Zinstrument-coverage \ $HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs $ LLVM_PROFILE_FILE="main.profraw" ./main called $ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata $ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main 1| 1|pub fn will_be_called() { 2| 1| println!("called"); 3| 1|} 4| | 5| 0|pub fn will_not_be_called() { 6| 0| println!("should not have been called"); 7| 0|} 8| | 9| 1|fn main() { 10| 1| let less = 1; 11| 1| let more = 100; 12| 1| 13| 1| if less < more { 14| 1| will_be_called(); 15| 1| } else { 16| 1| will_not_be_called(); 17| 1| } 18| 1|}
2020-06-29add spans to injected coverage countersRich Kadel-0/+5
added regions with counter expressions and counters. Added codegen_llvm/coverageinfo mod for upcoming coverage map Move coverage region collection to CodegenCx finalization Moved from `query coverageinfo` (renamed from `query coverage_data`), as discussed in the PR at: https://github.com/rust-lang/rust/pull/73684#issuecomment-649882503 Address merge conflict in MIR instrument_coverage test The MIR test output format changed for int types. moved debug messages out of block.rs This makes the block.rs calls to add coverage mapping data to the CodegenCx much more concise and readable. move coverage intrinsic handling into llvm impl I realized that having half of the coverage intrinsic handling in `rustc_codegen_ssa` and half in `rustc_codegen_llvm` meant that any non-llvm backend would be bound to the same decisions about how the coverage-related MIR terminators should be handled. To fix this, I moved the non-codegen portion of coverage intrinsic handling into its own trait, and implemented it in `rustc_codegen_llvm` alongside `codegen_intrinsic_call`. I also added the (required?) stubs for the new intrinsics to `IntrepretCx::emulate_intrinsic()`, to ensure calls to this function do not fail if called with these new but known intrinsics. address PR Feedback on 28 June 2020 2:48pm PDT
2020-06-14Diagnose use of incompatible sanitizersTomasz Miąsko-3/+3
Emit an error when incompatible sanitizer are configured through command line options. Previously the last one configured prevailed and others were silently ignored. Additionally use a set to represent configured sanitizers, making it possible to enable multiple sanitizers at once. At least in principle, since currently all of them are considered to be incompatible with others.
2020-05-20[self-profling] Record the cgu name when doing codegen for a moduleWesley Wiser-1/+1
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-5/+5
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-6/+6
2020-03-23Rollup merge of #69940 - tmiasko:llvm-api, r=hanna-kruppeMazdak Farrokhzad-2/+1
librustc_codegen_llvm: Replace deprecated API usage
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+1
2020-03-11librustc_codegen_llvm: Replace deprecated API usageTomasz Miąsko-2/+1
2020-02-05Apply LLVM sanitize attributes to generated entry wrapperTomasz Miąsko-2/+5
2020-01-09Compile some CGUs in parallel at the start of codegenJohn Kåre Alsaker-6/+4
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-9/+8
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-35/+20
2019-10-21Use `Symbol` for codegen unit names.Nicholas Nethercote-3/+3
This is a straightforward replacement except for two places where we have to convert to `LocalInternedString` to get a stable sort.
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-0/+2
2019-09-25Remove tx_to_llvm_workers from TyCtxtMark Rousskov-2/+6
This can be kept within the codegen backend crates entirely
2019-07-03Remove needless lifetimesJeremy Stucki-2/+2
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-4/+4
2019-06-12rustc_codegen_llvm: `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-2/+2
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-02remove unneeded depsMark Mansi-1/+0
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-19/+15
2019-04-30Move metadata encoding earlier.Nicholas Nethercote-36/+4
This commit separates metadata encoding (`tcx.encode_metadata`) from the creation of the metadata module (which is now handled by `write_compressed_metadata`, formerly `write_metadata`). The metadata encoding now occurs slightly earlier in the pipeline, at the very start of code generation within `start_codegen`. Metadata *writing* still occurs near the end of compilation; that will be moved forward in subsequent commits.
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-4/+2
Since there is nothing to optimise there...
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-3/+3
2019-02-21codegen and write_metadata can mutate ModuleLLvm.Gabriela Alexandra Moldovan-1/+1
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-7/+7
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5
2019-02-08Add a query type which is always marked as red if it runsJohn Kåre Alsaker-1/+3
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-29Remove static_replace_all_uses and statics_to_rauw from cg_ssabjorn3-1/+3
2018-11-16[eddyb] rustc_codegen_llvm: remove unused parametrization of `CodegenCx` and ↵Eduard-Mihai Burtescu-3/+3
`Builder` over `Value`s.
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16[eddyb] rustc_codegen_ssa: handle LLVM unsafety correctly.Eduard-Mihai Burtescu-1/+3
2018-11-16Separating the back folder between backend-agnostic and LLVM-specific codeDenis Merigoux-5/+3
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-45/+11
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-915/+9
2018-11-16Beginning of moving all backend-agnostic code to rustc_codegen_ssaDenis Merigoux-2/+2
2018-11-16Moved Backend interface into rustc_codegen_utilsDenis Merigoux-25/+1
2018-11-16Moved common.rs enumsDenis Merigoux-2/+2
2018-11-16Starting to move backend-agnostic code into codegen_utilsDenis Merigoux-1/+2
IntPredicate moved
2018-11-16Added compile codegen to backend traitDenis Merigoux-4/+5
2018-11-16Preparing the generalization of base:compile_coodegen_unitDenis Merigoux-35/+16
2018-11-16Generalized base:codegen_crateDenis Merigoux-40/+40