[Lldb-commits] [lldb] [flang] [clang-tools-extra] [libcxx] [compiler-rt] [clang] [libc] [llvm] [RegAllocFast] Refactor dominates algorithm for large basic block (PR #72250)

2023-12-22 Thread via lldb-commits


@@ -62,6 +62,107 @@ static RegisterRegAlloc fastRegAlloc("fast", "fast register 
allocator",
 
 namespace {
 
+/// Assign ascending index for instructions in machine basic block. The index
+/// can be used to determine dominance between instructions in same MBB.
+class InstrPosIndexes {
+public:
+  void init(const MachineBasicBlock &MBB) {
+CurMBB = &MBB;
+Instr2PosIndex.clear();
+uint64_t LastIndex = 0;
+for (const MachineInstr &MI : MBB) {
+  LastIndex += InstrDist;
+  Instr2PosIndex[&MI] = LastIndex;
+}

HaohaiWen wrote:

#76275

https://github.com/llvm/llvm-project/pull/72250
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [flang] [clang-tools-extra] [libcxx] [compiler-rt] [clang] [libc] [llvm] [RegAllocFast] Refactor dominates algorithm for large basic block (PR #72250)

2023-12-22 Thread via lldb-commits

https://github.com/HaohaiWen edited 
https://github.com/llvm/llvm-project/pull/72250
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits