[PATCH] D52367: Remove address taken, add optnone

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 21 10:24:48 PDT 2018


hiraditya created this revision.
hiraditya added a reviewer: sebpop.

Address taken function may not always be cold.
optnone functions should not be optimized.


https://reviews.llvm.org/D52367

Files:
  lib/Transforms/IPO/HotColdSplitting.cpp


Index: lib/Transforms/IPO/HotColdSplitting.cpp
===================================================================
--- lib/Transforms/IPO/HotColdSplitting.cpp
+++ lib/Transforms/IPO/HotColdSplitting.cpp
@@ -291,7 +291,7 @@
   if (F.size() <= 2)
     return false;
 
-  if (F.hasAddressTaken())
+  if (F.hasFnAttribute(Attribute::OptimizeNone))
     return false;
 
   if (F.hasFnAttribute(Attribute::AlwaysInline))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52367.166501.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180921/7eb9b4a5/attachment.bin>


More information about the llvm-commits mailing list