]> granicus.if.org Git - llvm/commit
[GlobalOpt] Swap the expensive check for cold calls with the cheap TTI check
authorJustin Bogner <mail@justinbogner.com>
Fri, 26 Apr 2019 00:12:50 +0000 (00:12 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 26 Apr 2019 00:12:50 +0000 (00:12 +0000)
commitbaf32fac2bf72513cf012b86f7c675d1e1ce52fd
tree0b90d88dc6e6ed1e15f29558319008c267afb8ca
parent79fafc77f9208f033b1e2af9191c61a461dbcf7e
[GlobalOpt] Swap the expensive check for cold calls with the cheap TTI check

isValidCandidateForColdCC is much more expensive than
TTI.useColdCCForColdCall, which by default just returns false. Avoid
doing this work if we're not going to look at the answer anyway.

This change is NFC, but I see significant compile time improvements on
some code with pathologically many functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359253 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp