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

Rename TR::ternary opcode to TR::select #681

Closed
fjeremic opened this issue Jan 18, 2017 · 7 comments · Fixed by #4865
Closed

Rename TR::ternary opcode to TR::select #681

fjeremic opened this issue Jan 18, 2017 · 7 comments · Fixed by #4865

Comments

@fjeremic
Copy link
Contributor

As per the discussion in #668 and the subsequent answer by @andrewcraik (#668 (comment)) it seems the TR::ternary IL opcode is slightly misleading to ignorant developers such as myself.

We should document that the semantics of this IL opcode are that all children will be evaluated and executed, and hence the children should have no side-effects should you try to emulate the canonical meaning of a ternary operator in many languages (:?).

An alternative here would be to rename the opcode all together to avoid the confusion.

@mgaudet
Copy link

mgaudet commented Jan 19, 2017

I would vote on rename-- it is too useful to get rid of in my opinion.

TR::select?

@0xdaryl
Copy link
Contributor

0xdaryl commented Mar 3, 2017

Given only opinions in favour of renaming, the TR::ternary IL opcode shall be renamed to TR::select. Some documentation describing its behaviour is in order as well.

@0xdaryl 0xdaryl changed the title Document or rename TR::ternary IL opcode Rename TR::ternary opcode to TR::select Jul 22, 2017
@alvee-unb
Copy link
Contributor

I am renaming all the variables such as- TR::bternary, TR::sternary etc. to TR::bselect, TR::sselect etc. respectively. Also renaming the other functions those were named depending on these variables such as- bternaryEvaluator etc. to bselectEvaluator etc. including all such comments.

@0xdaryl
Copy link
Contributor

0xdaryl commented Sep 19, 2019

Although this issue predates the Compiler Architecture Meetings and the current standard for community review for new opcodes (or changes to existing opcodes), I would like to tag this one for discussion at the next CAM in case there are any concerns. Prior to that, if anyone has any concerns or comments please bring that up in this PR.

@aarongraham9
Copy link
Contributor

Sounds good @0xdaryl, thanks!

@alvee-unb
Copy link
Contributor

alvee-unb commented Sep 20, 2019

Thanks @0xdaryl , can you please also let me know whether the following changes are needed for the components in the respective files (and more)-

~/omr/compiler/aarch64/codegen/OMRTreeEvaluator.hpp

  • vternaryEvaluator

~/omr/compiler/codegen/CodeGenPrep.cpp

  • >rematerializeCmpUnderTernary

~/omr/compiler/il/OMRIL.cpp

  • opCodesForTernarySelect

~/omr/compiler/il/OMRILOpCodeProperties.hpp

  • ILProp2::Ternary
  • TR::vternary

~/omr/compiler/il/OMRNode.cpp

  • ternarySeenCollected

We can discuss more on the next CAM.

alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 20, 2019
Part one of the iterations to replace the ternary OpCodes such as
TR::bternary etc. to TR::bselect etc.respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc..
- Corresponding outputs of texts such as- "iselect"

Partially Resolves: GitHub issue eclipse-omr#681

Signed-off-by: mnoor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 20, 2019
Part two of the iterations to replace the ternary OpCodes such as
TR::bternary etc. to TR::bselect etc.respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double etc.
  (iternary, vternary, iuternary etc)
- Corresponding comments where the above changes are made
- Corresponding outputs of texts such as- "iselect" etc.

Partially Resolves: GitHub issue eclipse-omr#681

Signed-off-by: mnoor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 20, 2019
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).

Closes: GitHub issue eclipse-omr#681

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
@alvee-unb
Copy link
Contributor

I have done the requested changes and would appreciate the review. Thank you.

alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 25, 2019
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.

Closes: GitHub issue eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 25, 2019
Part one of the iterations to replace the ternary OpCodes such as
TR::bternary etc. to TR::bselect etc.respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc..
- Corresponding outputs of texts such as- "iselect"

Partially Resolves: GitHub issue eclipse-omr#681

Signed-off-by: mnoor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 25, 2019
Part two of the iterations to replace the ternary OpCodes such as
TR::bternary etc. to TR::bselect etc.respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double etc.
  (iternary, vternary, iuternary etc)
- Corresponding comments where the above changes are made
- Corresponding outputs of texts such as- "iselect" etc.

Partially Resolves: GitHub issue eclipse-omr#681

Signed-off-by: mnoor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Nov 25, 2019
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.

Closes: GitHub issue eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Dec 16, 2019
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating the class names.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Dec 16, 2019
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating the class names.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Dec 20, 2019
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Jan 14, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Jan 14, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Feb 12, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.
- There are some duplicated usages of the opcodes (`aternary`) and
their respective functions for their dependencies on OpenJ9, they will
need to be deleted once the eclipse/openj9 #7797 PR is accepted.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Feb 19, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.
- There are some duplicated usages of the opcodes (`aternary`) and
their respective functions for their dependencies on OpenJ9, they will
need to be deleted once the eclipse/openj9 #7797 PR is accepted.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Feb 25, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.
- There are some duplicated usages of the opcodes (`aternary`) and
their respective functions for their dependencies on OpenJ9, they will
need to be deleted once the eclipse/openj9 #7797 PR is accepted.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Feb 25, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.
- There are some duplicated usages of the opcodes (`aternary`) and
their respective functions for their dependencies on OpenJ9, they will
need to be deleted once the eclipse/openj9 #7797 PR is accepted.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Feb 25, 2020
Removed deprecated functions (i.e. `getSupportsTernary` etc.)
which were introduced by the PR eclipse-omr#4578.

Closes: GitHub issue eclipse-omr#681

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Feb 25, 2020
Removed deprecated functions (i.e. `getSupportsTernary` etc.)
which were introduced by the PR eclipse-omr#4578.

Closes: GitHub issue eclipse-omr#681 and eclipse-omr#4847

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
AlenBadel pushed a commit to AlenBadel/omr that referenced this issue Feb 29, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.
- There are some duplicated usages of the opcodes (`aternary`) and
their respective functions for their dependencies on OpenJ9, they will
need to be deleted once the eclipse/openj9 #7797 PR is accepted.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/openj9 that referenced this issue Mar 2, 2020
Replaced the ternary OpCodes such as TR::aternary etc. to
TR::aselect etc. respectively.

Related OMR PR: eclipse-omr/omr#4578

Partially Resolves: Issue eclipse-omr/omr#681 and eclipse-omr/omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
alvee-unb added a commit to CAS-Atlantic/omr that referenced this issue Mar 3, 2020
Removed deprecated functions (i.e. `getSupportsTernary` etc.)
which were introduced by the PR eclipse-omr#4578.

Closes: GitHub issue eclipse-omr#681 and eclipse-omr#4847

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Replacing of the ternary OpCodes such as TR::bternary etc. to
TR::bselect etc. and the associated items respectively.

The changes are made onto the followings:
- Components of various data types such as- Int8, Float, Double
  (iternary, bternary, vternary etc) etc..
- Corresponding evaluators such as- bselectEvaluator, iselectEvaluator
  etc. and other functions where the IL OpCodes are used.
- Corresponding outputs of texts such as- "iselect" etc. and comments
  (//ternary).
- The IL opcode (and its respective evaluator to- vbitselectEvaluator)-
vselect has been updated to vbitselect.
- The new vselect opcode has been marked- unimplemented in the Z tree
evaluator.
- File names which involved updating of the class names.
- There are some duplicated usages of the opcodes (`aternary`) and
their respective functions for their dependencies on OpenJ9, they will
need to be deleted once the eclipse/openj9 #7797 PR is accepted.

Partially Resolves: GitHub issues eclipse-omr#681 and eclipse-omr#4590

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Removed deprecated functions (i.e. `getSupportsTernary` etc.)
which were introduced by the PR eclipse-omr#4578.

Closes: GitHub issue eclipse-omr#681 and eclipse-omr#4847

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants