MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / IsFoldable

Method IsFoldable

source/opt/instruction.cpp:774–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772}
773
774bool Instruction::IsFoldable() const {
775 return IsFoldableByFoldScalar() || IsFoldableByFoldVector() ||
776 context()->get_instruction_folder().HasConstFoldingRule(this);
777}
778
779bool Instruction::IsFoldableByFoldScalar() const {
780 const InstructionFolder& folder = context()->get_instruction_folder();

Callers 1

VisitAssignmentMethod · 0.80

Calls 1

HasConstFoldingRuleMethod · 0.80

Tested by

no test coverage detected