[PATCH] D37267: AMDGPU: Use set for tracked registers

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 13:31:48 PDT 2017


javed.absar added inline comments.


================
Comment at: lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:148
+    bool Inserted = Defs.insert(Def.getReg()).second;
+    (void)Inserted;
+    assert(Inserted);
----------------
This doesn't seem necessary.


================
Comment at: lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:149
+    (void)Inserted;
+    assert(Inserted);
   }
----------------
Generally one should have a message string with the assertion so that when it fails, it is clear why it did e.g. assert( Inserted && "No valid defs") 


https://reviews.llvm.org/D37267





More information about the llvm-commits mailing list