aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-08-03 21:26:24 +0000
committerBob Wilson <bob.wilson@apple.com>2012-08-03 21:26:24 +0000
commit982dc84762fc0c2ca35e6947d648a690dd22343c (patch)
tree35bb0712834aa0e97c82dfb442143fed8ca057a8 /lib/CodeGen/SelectionDAG/FastISel.cpp
parent772af92cb16a5e11bd580f576643a6268e8a5bce (diff)
Try to reduce the compile time impact of r161232.
The previous change caused fast isel to not attempt handling any calls to builtin functions. That included things like "printf" and caused some noticable regressions in compile time. I wanted to avoid having fast isel keep a separate list of functions that had to be kept in sync with what the code in SelectionDAGBuilder.cpp was handling. I've resolved that here by moving the list into TargetLibraryInfo. This is somewhat redundant in SelectionDAGBuilder but it will ensure that we keep things consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 635752ab65..683fac6744 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -790,15 +790,14 @@ FastISel::SelectInstruction(const Instruction *I) {
MachineBasicBlock::iterator SavedInsertPt = FuncInfo.InsertPt;
- // As a special case, don't even try to handle calls to builtin library
- // functions so that calls to builtin functions get translated to
- // instructions when supported by the target.
+ // As a special case, don't handle calls to builtin library functions that
+ // may be translated directly to target instructions.
if (const CallInst *Call = dyn_cast<CallInst>(I)) {
const Function *F = Call->getCalledFunction();
LibFunc::Func Func;
if (F && !F->hasLocalLinkage() && F->hasName() &&
LibInfo->getLibFunc(F->getName(), Func) &&
- LibInfo->has(Func))
+ LibInfo->hasOptimizedCodeGen(Func))
return false;
}