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

PPU LLVM: Reduce PRX/OVL compilation memory usage a little #9766

Merged
merged 1 commit into from Feb 13, 2021

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Feb 12, 2021

Enhancements

  • Clear elf_object and decrypted file memory before compiling PPU LLVM cache.
  • Set initial error of elf_object to "file not found" instead of no error as it makes more sense.

@@ -329,6 +324,21 @@ class elf_object
}
}

elf_object& operator=(elf_error error)
Copy link
Member

Choose a reason for hiding this comment

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

Sad. Could just make set_error public. This operator indirectly violates the rule of 0/3/5. For instance, the elf object has its own implicit copy/move constructors and operators.
xxx = elf_object{} must be called explicitly if you want to clear it.

Copy link
Member

Choose a reason for hiding this comment

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

Another tiny public method clear could do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

rpcs3/Loader/ELF.h Outdated Show resolved Hide resolved
@@ -190,6 +185,8 @@ class elf_object

public:
elf_object() = default;
elf_object(const elf_object&) = delete; // Disabled for performance reasons
Copy link
Member

Choose a reason for hiding this comment

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

What performance reasons? I don't see any. This object should be freely copyable or moveable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Optimization Optimizes existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants