1 //===- InstructionMaps.cpp - Maps scalars to vectors and reverse ----------===// 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 9 #include "llvm/Transforms/Vectorize/SandboxVectorizer/InstrMaps.h" 10 #include "llvm/Support/Debug.h" 11 #include "llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h" 12 13 namespace llvm::sandboxir { 14 15 #ifndef NDEBUG print(raw_ostream & OS) const16void Action::print(raw_ostream &OS) const { 17 OS << Idx << ". " << *LegalityRes << " Depth:" << Depth << "\n"; 18 OS.indent(2) << "Bndl:\n"; 19 for (Value *V : Bndl) 20 OS.indent(4) << *V << "\n"; 21 OS.indent(2) << "UserBndl:\n"; 22 for (Value *V : UserBndl) 23 OS.indent(4) << *V << "\n"; 24 } 25 dump() const26void Action::dump() const { print(dbgs()); } 27 dump() const28void InstrMaps::dump() const { 29 print(dbgs()); 30 dbgs() << "\n"; 31 } 32 #endif // NDEBUG 33 34 } // namespace llvm::sandboxir 35