Skip to content

MTM: fix issues after cursory reading #100404

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

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

artagnon
Copy link
Contributor

No description provided.

@artagnon artagnon changed the title MTM: fix style after cursory reading (NFC) MTM: fix issues after cursory reading Jul 24, 2024
Copy link
Contributor

@michaelmaitland michaelmaitland left a comment

Choose a reason for hiding this comment

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

LGTM

@artagnon artagnon merged commit 0760aec into llvm:main Jul 24, 2024
8 checks passed
@artagnon artagnon deleted the mtm-style-nfc branch July 24, 2024 18:33
@@ -146,15 +140,14 @@ MachineTraceMetrics::getProcReleaseAtCycles(unsigned MBBNum) const {
"getResources() must be called before getProcReleaseAtCycles()");
unsigned PRKinds = SchedModel.getNumProcResourceKinds();
assert((MBBNum+1) * PRKinds <= ProcReleaseAtCycles.size());
return ArrayRef(ProcReleaseAtCycles.data() + MBBNum * PRKinds, PRKinds);
return ArrayRef{ProcReleaseAtCycles.data() + MBBNum * PRKinds, PRKinds};
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't really use ClassName{} style constructors inside LLVM unless there is some specific reason to do so. This should either stay as ArrayRef() or become {} without mentioning the name at all.

@joker-eph
Copy link
Collaborator

This broke the gcc7 build here: https://lab.llvm.org/buildbot/#/builders/116/builds/1724 , I reverted for now to unbreak.

yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary: 

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250547
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
Reverts #100404

This broke the gcc7 build here:
https://lab.llvm.org/buildbot/#/builders/116/builds/1724

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants