[PATCH] D46500: [WebAssembly] CFG sort support for exception handling
    Derek Schuff via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jul  3 12:36:15 PDT 2018
    
    
  
dschuff added a comment.
This change is really quite nice and minimal other than the renaming.
================
Comment at: lib/Target/WebAssembly/WebAssemblyCFGSort.cpp:41
+// Wrapper for loops and exceptions
+class SortUnit {
+public:
----------------
'SortUnit' to me implies that this is a thing that is being sorted, i.e. compared against other units, which isn't correct. What about if we called this a 'Region'?
================
Comment at: lib/Target/WebAssembly/WebAssemblyCFGSort.cpp:200
                   const MachineBasicBlock *B) const {
+    // We give a higher priority to an EH pad
+    if (A->isEHPad() && !B->isEHPad())
----------------
Even when comparing backwards? I don't quite understand why this shouldn't just be the inverse of forward comparison.
Repository:
  rL LLVM
https://reviews.llvm.org/D46500
    
    
More information about the llvm-commits
mailing list