[PATCH] D66155: [Attributor] Liveness for internal functions.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 16:55:27 PDT 2019


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

A few minor comments, otherwise LGTM.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1289
+
+    if (AssumedLiveBlocks.size() == 0) {
+      F.replaceAllUsesWith(UndefValue::get(F.getType()));
----------------
maybe `(!...empty())`


================
Comment at: llvm/test/Transforms/FunctionAttrs/align.ll:140
 ; Better than IR information
 ; ATTRIBUTOR: define align 32 i32* @test7(i32* returned align 32 %p)
+define align 4 i32* @test7(i32* align 32 %p, i8* readnone %c) #0 {
----------------
This will not pass lit


================
Comment at: llvm/test/Transforms/FunctionAttrs/liveness.ll:18
+
+; CHECK: Function Attrs: nofree noreturn nosync nounwind
+; CHECK-NEXT: define internal i32 @dead_internal_func(i32 %0)
----------------
sstefan1 wrote:
> jdoerfert wrote:
> > These should not be derived anymore. We stopped annotating dead stuff.
> Didn't intend to include this. This is actually a leftover. Didn't see you committed that.
Make sure this passes after rebase. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66155





More information about the llvm-commits mailing list