//==-- llvm/CodeGen/ExecutionDomainFix.h - Execution Domain Fix -*- C++ -*--==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // /// \file Execution Domain Fix pass. /// /// Some X86 SSE instructions like mov, and, or, xor are available in different /// variants for different operand types. These variant instructions are /// equivalent, but on Nehalem and newer cpus there is extra latency /// transferring data between integer and floating point domains. ARM cores /// have similar issues when they are configured with both VFP and NEON /// pipelines. /// /// This pass changes the variant instructions to minimize domain crossings. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_EXECUTIONDOMAINFIX_H #define LLVM_CODEGEN_EXECUTIONDOMAINFIX_H #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/LoopTraversal.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/ReachingDefAnalysis.h" #include "llvm/CodeGen/TargetRegisterInfo.h" namespace llvm { class MachineInstr; class TargetInstrInfo; /// A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track /// of execution domains. /// /// An open DomainValue represents a set of instructions that can still switch /// execution domain. Multiple registers may refer to the same open /// DomainValue - they will eventually be collapsed to the same execution /// domain. /// /// A collapsed DomainValue represents a single register that has been forced /// into one of more execution domains. There is a separate collapsed /// DomainValue for each register, but it may contain multiple execution /// domains. A register value is initially created in a single execution /// domain, but if we were forced to pay the penalty of a domain crossing, we /// keep track of the fact that the register is now available in multiple /// domains. struct DomainValue { … }; class ExecutionDomainFix : public MachineFunctionPass { … }; } // namespace llvm #endif // LLVM_CODEGEN_EXECUTIONDOMAINFIX_H