@@ -646,6 +646,7 @@ private class RawIndirectOperand extends Node, TRawIndirectOperand {
646646 /** Gets the underlying instruction. */
647647 Operand getOperand ( ) { result = operand }
648648
649+ /** Gets the underlying indirection index. */
649650 int getIndirectionIndex ( ) { result = indirectionIndex }
650651
651652 override Function getFunction ( ) { result = this .getOperand ( ) .getDef ( ) .getEnclosingFunction ( ) }
@@ -665,6 +666,15 @@ private class RawIndirectOperand extends Node, TRawIndirectOperand {
665666 }
666667}
667668
669+ /**
670+ * INTERNAL: Do not use.
671+ *
672+ * A node that represents the indirect value of an operand in the IR
673+ * after `index` number of loads.
674+ *
675+ * Note: Unlike `RawIndirectOperand`, a value of type `IndirectOperand` may
676+ * be an `OperandNode`.
677+ */
668678class IndirectOperand extends Node {
669679 Operand operand ;
670680 int indirectionIndex ;
@@ -676,10 +686,16 @@ class IndirectOperand extends Node {
676686 this .( OperandNode ) .getOperand ( ) = Ssa:: getIRBackedIndirectOperand ( operand , indirectionIndex )
677687 }
678688
689+ /** Gets the underlying operand. */
679690 Operand getOperand ( ) { result = operand }
680691
692+ /** Gets the underlying indirection index. */
681693 int getIndirectionIndex ( ) { result = indirectionIndex }
682694
695+ /**
696+ * Holds if this `IndirectOperand` is represented directly in the IR instead of
697+ * a `RawIndirectionOperand` with operand `op` and indirection index `index`.
698+ */
683699 predicate isIRBackedBy ( Operand op , int index ) {
684700 this instanceof OperandNode and
685701 (
@@ -723,6 +739,7 @@ private class RawIndirectInstruction extends Node, TRawIndirectInstruction {
723739 /** Gets the underlying instruction. */
724740 Instruction getInstruction ( ) { result = instr }
725741
742+ /** Gets the underlying indirection index. */
726743 int getIndirectionIndex ( ) { result = indirectionIndex }
727744
728745 override Function getFunction ( ) { result = this .getInstruction ( ) .getEnclosingFunction ( ) }
@@ -742,6 +759,15 @@ private class RawIndirectInstruction extends Node, TRawIndirectInstruction {
742759 }
743760}
744761
762+ /**
763+ * INTERNAL: Do not use.
764+ *
765+ * A node that represents the indirect value of an instruction in the IR
766+ * after `index` number of loads.
767+ *
768+ * Note: Unlike `RawIndirectInstruction`, a value of type `IndirectInstruction` may
769+ * be an `InstructionNode`.
770+ */
745771class IndirectInstruction extends Node {
746772 Instruction instr ;
747773 int indirectionIndex ;
@@ -754,10 +780,16 @@ class IndirectInstruction extends Node {
754780 Ssa:: getIRBackedIndirectInstruction ( instr , indirectionIndex )
755781 }
756782
783+ /** Gets the underlying instruction. */
757784 Instruction getInstruction ( ) { result = instr }
758785
786+ /** Gets the underlying indirection index. */
759787 int getIndirectionIndex ( ) { result = indirectionIndex }
760788
789+ /**
790+ * Holds if this `IndirectInstruction` is represented directly in the IR instead of
791+ * a `RawIndirectionInstruction` with instruction `i` and indirection index `index`.
792+ */
761793 predicate isIRBackedBy ( Instruction i , int index ) {
762794 this instanceof InstructionNode and
763795 (
0 commit comments