summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/Attributor.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-10-13 02:24:02 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-10-13 02:24:02 +0000
commitea1e81f54b953ac6846578e074ff7bb265b030ca (patch)
tree21309c071e4f2928367a552e3cbf76b051908a83 /llvm/lib/Transforms/IPO/Attributor.cpp
parent92694eba933ef4ea0b1b6377809ff266df37d61b (diff)
downloadbcm5719-llvm-ea1e81f54b953ac6846578e074ff7bb265b030ca.tar.gz
bcm5719-llvm-ea1e81f54b953ac6846578e074ff7bb265b030ca.zip
[Attributor][FIX] Avoid modifying naked/optnone functions
The check for naked/optnone was insufficient for different reasons. We now check before we initialize an abstract attribute and we do it for all abstract attributes. llvm-svn: 374694
Diffstat (limited to 'llvm/lib/Transforms/IPO/Attributor.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 787a36cb60c..eb6756c53e7 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -4847,11 +4847,6 @@ static bool runAttributorOnModule(Module &M, AnalysisGetter &AG) {
else
NumFnWithoutExactDefinition++;
- // For now we ignore naked and optnone functions.
- if (F.hasFnAttribute(Attribute::Naked) ||
- F.hasFnAttribute(Attribute::OptimizeNone))
- continue;
-
// We look at internal functions only on-demand but if any use is not a
// direct call, we have to do it eagerly.
if (F.hasLocalLinkage()) {
OpenPOWER on IntegriCloud