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

Replace the SetOperand() with SetInOperand() and SetResultType() #354

Closed

Conversation

Qining
Copy link
Contributor

@Qining Qining commented Aug 16, 2016

The result id of an instruction should never be changed, as it can be considered as another representation of the instruction.

@Qining Qining force-pushed the make-instruction-result-id-immutable branch 2 times, most recently from 266b2ed to 1c848fa Compare August 16, 2016 15:15
@@ -86,8 +86,17 @@ bool DefUseManager::ReplaceAllUsesWith(uint32_t before, uint32_t after) {

for (auto it = id_to_uses_[before].cbegin(); it != id_to_uses_[before].cend();
++it) {
// Make the modification in the instruction.
it->inst->SetOperand(it->operand_index, {after});
uint32_t type_result_id_count =
Copy link
Contributor

Choose a reason for hiding this comment

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

const

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in a7c772a

@Qining Qining force-pushed the make-instruction-result-id-immutable branch 3 times, most recently from 80c7770 to 6e96663 Compare August 16, 2016 18:28
@antiagainst
Copy link
Contributor

+2

@Qining Qining closed this Aug 16, 2016
@Qining Qining force-pushed the make-instruction-result-id-immutable branch from 6e96663 to e8b7c7b Compare August 16, 2016 19:05
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.

2 participants