diff options
author | Davide Italiano <davide@freebsd.org> | 2017-02-02 00:46:54 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-02-02 00:46:54 +0000 |
commit | 861b997813f2727c614f916647096e444aa783c5 (patch) | |
tree | 40df9dd044360e1a4004daa46d1b23dc396061b4 /lib/Transforms/Scalar/SCCP.cpp | |
parent | 1b5750c5eaf1c96464438ec8a51b8f06a903da3e (diff) |
[IPSCCP] Restore the old behaviour (pre r293799).
It's not clear the change I made a good idea, and it definitely needs
further discussion. Thanks to Eli for pointing out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 054ad712d38..dd1123fd4fa 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1715,12 +1715,7 @@ static bool runIPSCCP(Module &M, const DataLayout &DL, // Don't touch naked functions. They may contain asm returning a // value we don't see, so we may end up interprocedurally propagating // the return value incorrectly. - // Also, don't touch functions marked as noinline. Trivial functions may - // essentially be inlined because of return value propagation. - // (e.g. int tinkywinky(void) { return 666; }) - if (F.hasExactDefinition() && - !(F.hasFnAttribute(Attribute::Naked) || - F.hasFnAttribute(Attribute::NoInline))) + if (F.hasExactDefinition() && !F.hasFnAttribute(Attribute::Naked)) Solver.AddTrackedFunction(&F); // If this function only has direct calls that we can see, we can track its |