PPCCCState.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //===---- PPCCCState.cpp - CCState with PowerPC specific extensions ---------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include "PPCCCState.h"
  9. #include "PPCSubtarget.h"
  10. #include "llvm/IR/Module.h"
  11. using namespace llvm;
  12. // Identify lowered values that originated from ppcf128 arguments and record
  13. // this.
  14. void PPCCCState::PreAnalyzeCallOperands(
  15. const SmallVectorImpl<ISD::OutputArg> &Outs) {
  16. for (const auto &I : Outs) {
  17. if (I.ArgVT == llvm::MVT::ppcf128)
  18. OriginalArgWasPPCF128.push_back(true);
  19. else
  20. OriginalArgWasPPCF128.push_back(false);
  21. }
  22. }
  23. void PPCCCState::PreAnalyzeFormalArguments(
  24. const SmallVectorImpl<ISD::InputArg> &Ins) {
  25. for (const auto &I : Ins) {
  26. if (I.ArgVT == llvm::MVT::ppcf128) {
  27. OriginalArgWasPPCF128.push_back(true);
  28. } else {
  29. OriginalArgWasPPCF128.push_back(false);
  30. }
  31. }
  32. }