mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
Consolidate instruction operand bounds checks
This commit is contained in:
@@ -187,11 +187,10 @@ size_t Inst::NumPhiBlocks() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Value Inst::Arg(size_t index) const {
|
Value Inst::Arg(size_t index) const {
|
||||||
|
EXIT_IF(index >= NumArgs());
|
||||||
if (num_args <= InlineArity) {
|
if (num_args <= InlineArity) {
|
||||||
EXIT_IF(index >= num_args);
|
|
||||||
return fixed_args[index];
|
return fixed_args[index];
|
||||||
}
|
}
|
||||||
EXIT_IF(index >= NumArgs());
|
|
||||||
return num_args == PhiArity ? phi_args[index].second : large_args[index];
|
return num_args == PhiArity ? phi_args[index].second : large_args[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user