[PATCH] D90095: [DSE] Enable MSSA DSE to optimize across PHIs

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 25 12:44:40 PDT 2021


fhahn added a comment.

IIUC the dependencies for the patch landed by now. Please let me know when this is ready for review. It would also be good to add a brief explanation of the approach both the the description and in code comments.

Also, I think this might need a bit more additional testing by building larger programs. For example, the following example crashes at the moment:

  @global = external global i64, align 8
  
  define i32 @widget(i1 %arg, i8* %arg1, i8* %arg2) {
  bb:
    store i64 777, i64* @global, align 8
    br i1 %arg, label %bb3, label %bb4
  
  bb3:                                              ; preds = %bb
    %tmp = getelementptr i8, i8* %arg1, i64 1
    store i8 11, i8* %tmp, align 8
    br label %bb4
  
  bb4:                                              ; preds = %bb3, %bb
    %tmp5 = phi i8* [ %arg1, %bb3 ], [ %arg2, %bb ]
    %tmp6 = getelementptr i8, i8* %tmp5, i64 1
    store i8 99, i8* %tmp6, align 8
    ret i32 10
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90095/new/

https://reviews.llvm.org/D90095



More information about the llvm-commits mailing list