Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument operand at the specified index.
*/
pragma[noinline]
final PositionalArgumentOperand getPositionalArgumentOperand(int index) {
result = getAnOperand() and
result.getIndex() = index
Expand All @@ -1585,6 +1586,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument at the specified index.
*/
pragma[noinline]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it necessary to add the pragma[noinline] to this predicate? Is annotating the other predicate not enough to avoid the problem if this predicate is inlined?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I feel more confident claiming that the other predicate, getPositionalArgumentOperand, can do without pragma[noinline]. The slow version of definitionByReferenceNodeFromArgument has getPositionalArgumentOperand in its tuple counts, so that predicate seems to not have been inlined.

In any case, I don't think it was strictly necessary to put the pragma on both predicates. I did it anyway because I worried we'd otherwise have a similar performance problem the next time we try and do a slightly different thing with these predicates. Joining on parameter indexes is always risky, and I wanted to reduce that risk.

final Instruction getPositionalArgument(int index) {
result = getPositionalArgumentOperand(index).getDef()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument operand at the specified index.
*/
pragma[noinline]
final PositionalArgumentOperand getPositionalArgumentOperand(int index) {
result = getAnOperand() and
result.getIndex() = index
Expand All @@ -1585,6 +1586,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument at the specified index.
*/
pragma[noinline]
final Instruction getPositionalArgument(int index) {
result = getPositionalArgumentOperand(index).getDef()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument operand at the specified index.
*/
pragma[noinline]
final PositionalArgumentOperand getPositionalArgumentOperand(int index) {
result = getAnOperand() and
result.getIndex() = index
Expand All @@ -1585,6 +1586,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument at the specified index.
*/
pragma[noinline]
final Instruction getPositionalArgument(int index) {
result = getPositionalArgumentOperand(index).getDef()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument operand at the specified index.
*/
pragma[noinline]
final PositionalArgumentOperand getPositionalArgumentOperand(int index) {
result = getAnOperand() and
result.getIndex() = index
Expand All @@ -1585,6 +1586,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument at the specified index.
*/
pragma[noinline]
final Instruction getPositionalArgument(int index) {
result = getPositionalArgumentOperand(index).getDef()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument operand at the specified index.
*/
pragma[noinline]
final PositionalArgumentOperand getPositionalArgumentOperand(int index) {
result = getAnOperand() and
result.getIndex() = index
Expand All @@ -1585,6 +1586,7 @@ class CallInstruction extends Instruction {
/**
* Gets the argument at the specified index.
*/
pragma[noinline]
final Instruction getPositionalArgument(int index) {
result = getPositionalArgumentOperand(index).getDef()
}
Expand Down