-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc_codegen_llvm: traitification of LLVM-specific CodegenCx and Builder methods #55627
Merged
Merged
Changes from 20 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
5a9e6b8
rustc_codegen_llvm: begin generalizing over backend values.
irinagpopa c76fc3d
Work around to fix issue https://github.com/rust-lang/rust/issues/53912
denismerigoux 83b2152
Reduced line length to pass tidy
denismerigoux 34c5dc0
Generalized base.rs#call_memcpy and everything that it uses
denismerigoux 14798d6
Generalized BasicBlocks in BuilderMethods trait
denismerigoux 51b7f27
Generalized IntPredicate in the BuilderMethods trait
denismerigoux 8590336
Generalized RealPredicate
denismerigoux bc86624
Removed useless traits for IntPredicate and RealPredicate
denismerigoux 1bcb4df
Generalized OperandBundleDef in BuilderMethods
denismerigoux 2755891
Generalized AtomicRmwBinOp for BuilderMethods
denismerigoux b699866
Generalized AtomicOrdering for BuilderMethods
denismerigoux b761538
Generalized SynchronisationScope for BuilderMethods
denismerigoux 1ca7506
Generalized AsmDialect for BuilderMethods
denismerigoux 9c41e1a
Removed genericity over Value in various functions
denismerigoux 89825f2
Use associated types instead of type parameters inside the BuilderMet…
denismerigoux a16d85b
Removed parasite yaml file and put explicit lifetimes
denismerigoux 7a2670e
Use real type names rather than Self::
denismerigoux d577ec7
New files and folders for traits
denismerigoux 3889c2d
New Backend trait containing associated types
denismerigoux 8714e6b
Traitification of common.rs methods
denismerigoux d325844
Replaced Codegen field access by trait method
denismerigoux 83e07f9
Added self argument for Codegen CommonMethod trait methods
denismerigoux 3aee772
Split CommonMethods to accomodate for use in back/write.rs
denismerigoux 4cc18d3
CommonWriteMethods are not static any more
denismerigoux 33eee83
Removed code duplication for CommonWriteMethods
denismerigoux 6c5b990
All CommonMethods now real methods (not static)
denismerigoux 3e77f2f
Use the method form for CodegenCx everywhere
denismerigoux 5f28e0a
Added definition of type trait
denismerigoux 730b13a
Traitification of type_ methods
denismerigoux 6d42574
Prefixed const methods with "const" instead of "c"
denismerigoux e224f06
Prefixed type methods & removed trait impl for write::CodegenContext
denismerigoux a1d0d4f
Removing LLVM content from CommonMethods -> ConstMethods
denismerigoux 4787b7c
Removed phantomdata no longer necessary
denismerigoux 1929ac2
Fixed typos
denismerigoux c487b82
Attempt at including CodegenCx within Builder with Associated types
denismerigoux 0514c7b
Generalized some base.rs methods
denismerigoux d77e34f
Generalized memset and memcpy
denismerigoux 3c082a2
Added StaticMethods trait
denismerigoux a5aeb8e
Transfered memcpy and memset to BuilderMethods
denismerigoux 0a1c509
Traitified IntrinsicCallMethods
denismerigoux 484e07c
[eddyb/rebase cleanup] s/&self./self.
eddyb 034f697
Generalized base::unsized_info
denismerigoux 78dd95f
Generalized base::unsize_thin_ptr
denismerigoux cbe31a4
Generalized base::coerce_unsized_into
denismerigoux 6a993fe
Generalized mir::codegen_mir (and all subsequent functions)
denismerigoux 441a7c1
Generalized mono_item.rs and base.rs:codegen_instance
denismerigoux b14f3e5
Adapt code to latest rustc master changes
denismerigoux ac34068
Generalized base:maybe_create_entry_wrapper
denismerigoux 97825a3
Move doc to trait declarations
denismerigoux 8d530db
Generalized base:codegen_crate
denismerigoux 91a2a80
Renamed lifetimes for better understanding
denismerigoux 6819e6e
Preparing the generalization of base:compile_coodegen_unit
denismerigoux 4ba09ab
Added compile codegen to backend trait
denismerigoux 39fd4d9
Starting to move backend-agnostic code into codegen_utils
denismerigoux 566fa4d
Moved common.rs enums
denismerigoux 35b40f5
[eddyb/rebase cleanup] abstracted Funclet
eddyb b06836e
[eddyb/rebase cleanup] move type_{needs_drop,is_sized,is_freeze} to r…
eddyb b02e5cc
Moved Backend interface into rustc_codegen_utils
denismerigoux c9f26c2
Beginning of moving all backend-agnostic code to rustc_codegen_ssa
denismerigoux 915382f
Moved DeclareMethods, MiscMethods and StaticMethods
denismerigoux c0a428e
Great separation of librustc_codegen_llvm: librustc_codegen_ssa compiles
denismerigoux 015e444
Finished moving backend-agnostic code to rustc_codegen_ssa
denismerigoux 1ebdfbb
Added some docs + start to &mut self builder methods
denismerigoux 54dd3a4
All Builder methods now take &mut self instead of &self
denismerigoux b25b804
Added default impl for DerivedTypeMethods + empty impl for Cranelift …
denismerigoux b9e5cf9
Separating the back folder between backend-agnostic and LLVM-specific…
denismerigoux bf7f8cd
Added README explaining the refactoring
denismerigoux 9bb6663
[eddyb] rustc_codegen_ssa: handle LLVM unsafety correctly.
eddyb 9f49a26
[eddyb] rustc_codegen_utils: remove extraneous `#![allow(dead_code)]`.
eddyb 47c84c4
[eddyb] rustc_codegen_llvm: remove unnecessary `'a` from `LlvmCodegen…
eddyb d1410ad
[eddyb] rustc_codegen_ssa: avoid a `Clone` bound on `TargetMachine`.
eddyb 0b56924
[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.
eddyb 756f84d
[eddyb] rustc_codegen_llvm: remove unused parametrization of `Codegen…
eddyb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -740,7 +740,7 @@ fn link_natively(sess: &Session, | |
// with some thread pool working in the background. It seems that no one | ||
// currently knows a fix for this so in the meantime we're left with this... | ||
info!("{:?}", &cmd); | ||
let retry_on_segfault = env::var("RUSTC_RETRY_LINKER_ON_SEGFAULT").is_ok(); | ||
let retry_on_segfault = env::var("RUSTc_RETRY_LINKER_ON_SEGFAULT").is_ok(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was this change in capitalization intentional? I doubt it =) |
||
let mut prog; | ||
let mut i = 0; | ||
loop { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a LLVM-ism, does Cranelift support getting at the function params from a builder? What I'd do instead is also pass a slice of values, alongside the index.