[PATCH] D64106: Summary:[Attributor] liveness analysis. This is only a first draft and should be modified heavily.

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 15:26:58 PDT 2019


sstefan1 updated this revision to Diff 207642.
sstefan1 added a comment.

- fix diff

Updating D64106: Summary:
=========================

[Attributor] liveness analysis. This is only a first draft and should be modified heavily.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64106

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/Attributor.cpp


Index: llvm/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Attributor.cpp
+++ llvm/lib/Transforms/IPO/Attributor.cpp
@@ -1252,9 +1252,6 @@
     Function &F, InformationCache &InfoCache,
     DenseSet</* Attribute::AttrKind */ unsigned> *Whitelist) {
 
-  // Check for dead code in every function.
-  registerAA(*new AAIsAssumedDeadFunction(F, InfoCache));
-
   // Return attributes are only appropriate if the return type is non void.
   Type *ReturnType = F.getReturnType();
   if (!ReturnType->isVoidTy()) {
Index: llvm/include/llvm/Transforms/IPO/Attributor.h
===================================================================
--- llvm/include/llvm/Transforms/IPO/Attributor.h
+++ llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -702,21 +702,21 @@
 };
 
 struct AAIsAssumedDead : public AbstractAttribute {
-  /// An abstract interface for liveness abstract attribute.
-  AAIsAssumedDead(Value &V, InformationCache &InfoCache)
-      : AbstractAttribute(V, InfoCache) {}
+    /// An abstract interface for liveness abstract attribute.
+    AAIsAssumedDead(Value &V, InformationCache &InfoCache)
+        : AbstractAttribute(V, InfoCache) {}
 
-  /// See AbstractAttribute::getAttrKind()/
-  virtual Attribute::AttrKind getAttrKind() const override { return ID; }
+    /// See AbstractAttribute::getAttrKind()/
+    virtual Attribute::AttrKind getAttrKind() const override { return ID; }
 
-  static constexpr Attribute::AttrKind ID =
-      Attribute::AttrKind(Attribute::None + 1);
+    static constexpr Attribute::AttrKind ID =
+        Attribute::AttrKind(Attribute::None + 1);
 
-  /// Returns true if nounwind is assumed.
-  virtual bool isAssumedDead() const = 0;
+    /// Returns true if nounwind is assumed.
+    virtual bool isAssumedDead() const = 0;
 
-  /// Returns true if nounwind is known.
-  virtual bool isKnownDead() const = 0;
+    /// Returns true if nounwind is known.
+    virtual bool isKnownDead() const = 0;
 };
 
 } // end namespace llvm


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64106.207642.patch
Type: text/x-patch
Size: 2052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190702/10ae964c/attachment.bin>


More information about the llvm-commits mailing list