remove_function_reduction_opportunity_finder.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2019 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #ifndef SOURCE_REDUCE_REMOVE_FUNCTION_REDUCTION_OPPORTUNITY_FINDER_H_
  15. #define SOURCE_REDUCE_REMOVE_FUNCTION_REDUCTION_OPPORTUNITY_FINDER_H_
  16. #include "source/reduce/reduction_opportunity_finder.h"
  17. namespace spvtools {
  18. namespace reduce {
  19. // A finder of opportunities to remove unreferenced functions.
  20. class RemoveFunctionReductionOpportunityFinder
  21. : public ReductionOpportunityFinder {
  22. public:
  23. RemoveFunctionReductionOpportunityFinder() = default;
  24. ~RemoveFunctionReductionOpportunityFinder() override = default;
  25. std::string GetName() const final;
  26. std::vector<std::unique_ptr<ReductionOpportunity>> GetAvailableOpportunities(
  27. opt::IRContext* context, uint32_t target_function) const final;
  28. private:
  29. };
  30. } // namespace reduce
  31. } // namespace spvtools
  32. #endif // SOURCE_REDUCE_REMOVE_FUNCTION_REDUCTION_OPPORTUNITY_FINDER_H_