summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-01-09 15:41:00 +0000
committerSanjay Patel <spatel@rotateright.com>2018-01-09 15:41:00 +0000
commit37e28e40cbec436532bd60e7d00c4d1caea9edca (patch)
treee1e63366738bfb912a4982532792b502c7fbbc38 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent2b3bd306378a87737c238886856cc3a9d584fc1e (diff)
downloadbcm5719-llvm-37e28e40cbec436532bd60e7d00c4d1caea9edca.tar.gz
bcm5719-llvm-37e28e40cbec436532bd60e7d00c4d1caea9edca.zip
[SelectionDAG] lower math intrinsics to finite version of libcalls when possible (PR35672)
Ingredients in this patch: 1. Add HANDLE_LIBCALL defs for finite mathlib functions that correspond to LLVM intrinsics. 2. Plumbing to send TargetLibraryInfo down to SelectionDAGLegalize. 3. Relaxed math and library checking in SelectionDAGLegalize::ConvertNodeToLibcall() to choose finite libcalls. There was a bug about determining the availability of the finite calls that should be fixed with: rL322010 Not in this patch: This doesn't resolve the question/bug of clang creating the intrinsic IR in the first place. There's likely follow-up work needed to support the long double variants better. There's room for improvement to reduce the code duplication. Create finite calls that don't originate from a corresponding intrinsic or DAG node? Differential Revision: https://reviews.llvm.org/D41338 llvm-svn: 322087
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index befd797e75b..c3d782802eb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -414,7 +414,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
SplitCriticalSideEffectEdges(const_cast<Function &>(Fn), DT, LI);
- CurDAG->init(*MF, *ORE, this);
+ CurDAG->init(*MF, *ORE, this, LibInfo);
FuncInfo->set(Fn, *MF, CurDAG);
// Now get the optional analyzes if we want to.
OpenPOWER on IntegriCloud