diff options
author | Oliver Stannard <oliver.stannard@linaro.org> | 2019-07-19 09:59:26 +0000 |
---|---|---|
committer | Oliver Stannard <oliver.stannard@linaro.org> | 2019-07-19 09:59:26 +0000 |
commit | 0ed7732671b2b619937adc13376f89f52f2db572 (patch) | |
tree | 80125b19bc346993d6448dd70b608b50500c0591 /llvm/lib/CodeGen/RegUsageInfoPropagate.cpp | |
parent | 0b001f94a54a93e3e7ff080c829de8684f92630a (diff) | |
download | bcm5719-llvm-0ed7732671b2b619937adc13376f89f52f2db572.tar.gz bcm5719-llvm-0ed7732671b2b619937adc13376f89f52f2db572.zip |
[IPRA] Don't rely on non-exact function definitions
If a function definition is not exact, then the linker could select a
differently-compiled version of it, which could use different registers.
https://reviews.llvm.org/D64909
llvm-svn: 366557
Diffstat (limited to 'llvm/lib/CodeGen/RegUsageInfoPropagate.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegUsageInfoPropagate.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp b/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp index fc4be82d215..0205e619374 100644 --- a/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp +++ b/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp @@ -130,7 +130,11 @@ bool RegUsageInfoPropagation::runOnMachineFunction(MachineFunction &MF) { }; if (const Function *F = findCalledFunction(M, MI)) { - UpdateRegMask(*F); + if (F->isDefinitionExact()) { + UpdateRegMask(*F); + } else { + LLVM_DEBUG(dbgs() << "Function definition is not exact\n"); + } } else { LLVM_DEBUG(dbgs() << "Failed to find call target function\n"); } |