AgenPeeps.h 1022 B

123456789101112131415161718192021222324252627282930
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. // Shared for x86 and x64
  7. class AgenPeeps
  8. {
  9. private:
  10. Func * func;
  11. public:
  12. AgenPeeps(Func *func) : func(func){}
  13. void PeepFunc();
  14. bool DependentInstrs(IR::Instr *instr1, IR::Instr *instr2);
  15. private:
  16. int MoveInstrUp(IR::Instr *instr, IR::Instr *startBlock, int distance);
  17. bool AlwaysDependent(IR::Instr *instr);
  18. bool DependentOpnds(IR::Opnd *opnd1, IR::Opnd *opnd2);
  19. bool AgenDependentInstrs(IR::Instr *instr1, IR::Instr *instr2);
  20. bool IsMemoryInstr(IR::Instr *instr);
  21. bool IsLoad(IR::Instr *instr);
  22. bool IsStore(IR::Instr *instr);
  23. bool IsMemoryOpnd(IR::Opnd *opnd);
  24. };