Skip to content
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

Several changes to the codegen backend organization #65340

Merged
merged 10 commits into from
Oct 15, 2019

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Oct 12, 2019

  • Split functions from values in cg_ssa BackendTypes.
  • Remove is_const_integral function from ConstMethods.
  • Actually register the invalid monomorphization of intrinsic long diagnostic and remove the diagnostics method from CodegenBackends, as it was unused.
  • Add cg_ssa and cg_utils provided methods to default_provide, so codegen backend don't have to do it themself.

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2019
@Centril
Copy link
Contributor

Centril commented Oct 12, 2019

cc @rkruppe @eddyb

@eddyb
Copy link
Member

eddyb commented Oct 12, 2019

r? @eddyb I'll look into this ASAP (please ping me elsewhere otherwise)

@rust-highfive rust-highfive assigned eddyb and unassigned cramertj Oct 12, 2019
@@ -86,6 +86,8 @@ impl Funclet<'ll> {

impl BackendTypes for CodegenCx<'ll, 'tcx> {
type Value = &'ll Value;
type FuncId = &'ll Value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have a newtype of Value to force this to be correctly typed (LLVM has a class for functions which IIRC is a subclass of GlobalValue). But this is a low-priority cleanup.

@@ -34,7 +34,7 @@ pub trait BuilderMethods<'a, 'tcx>:
+ HasTargetSpec

{
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::Value, name: &'b str) -> Self;
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::FuncId, name: &'b str) -> Self;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we'll have to replace all of these ll prefixes in variable names.

@bors
Copy link
Contributor

bors commented Oct 13, 2019

☔ The latest upstream changes (presumably #65182) made this pull request unmergeable. Please resolve the merge conflicts.

@eddyb
Copy link
Member

eddyb commented Oct 14, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Oct 14, 2019

📌 Commit f0e2fc7 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 14, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 15, 2019
Several changes to the codegen backend organization

* Split functions from values in cg_ssa `BackendTypes`.
* Remove `is_const_integral` function from `ConstMethods`.
* Actually register the invalid monomorphization of intrinsic long diagnostic and remove the `diagnostics` method from `CodegenBackends`, as it was unused.
* Add cg_ssa and cg_utils provided methods to `default_provide`, so codegen backend don't have to do it themself.
bors added a commit that referenced this pull request Oct 15, 2019
Rollup of 10 pull requests

Successful merges:

 - #65170 (rustc_metadata: Privatize private code and remove dead code)
 - #65260 (Optimize `LexicalResolve::expansion`.)
 - #65261 (Remove `Option` from `TokenStream`)
 - #65332 (std::fmt: reorder docs)
 - #65340 (Several changes to the codegen backend organization)
 - #65365 (Include const generic arguments in metadata)
 - #65398 (Bring attention to suggestions when the only difference is capitalization)
 - #65410 (syntax: add parser recovery for intersection- / and-patterns `p1 @ p2`)
 - #65415 (Remove an outdated test output file)
 - #65416 (Minor sync changes)

Failed merges:

r? @ghost
@bors bors merged commit f0e2fc7 into rust-lang:master Oct 15, 2019
@bjorn3 bjorn3 deleted the cg_ssa_refactor4 branch October 15, 2019 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants