aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-13 17:07:06 +0000
committerDan Gohman <gohman@apple.com>2010-04-13 17:07:06 +0000
commit4183e31978146ea529a87a2fc47b96aeb6cbe000 (patch)
tree424df9d105bb0bd73293c987d3c5e2581ed67741 /lib/CodeGen/SelectionDAG/FastISel.cpp
parent81bf03eb5cd68243eabb52505105aa5f4a831bf3 (diff)
Add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index b3e79a19e1..9b67b57c92 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -94,9 +94,11 @@ unsigned FastISel::getRegForValue(Value *V) {
Reg =
getRegForValue(Constant::getNullValue(TD.getIntPtrType(V->getContext())));
} else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
+ // Try to emit the constant directly.
Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF);
if (!Reg) {
+ // Try to emit the constant by using an integer constant with a cast.
const APFloat &Flt = CF->getValueAPF();
EVT IntVT = TLI.getPointerTy();
@@ -320,6 +322,7 @@ bool FastISel::SelectCall(User *I) {
Function *F = cast<CallInst>(I)->getCalledFunction();
if (!F) return false;
+ // Handle selected intrinsic function calls.
unsigned IID = F->getIntrinsicID();
switch (IID) {
default: break;
@@ -440,6 +443,8 @@ bool FastISel::SelectCall(User *I) {
break;
}
}
+
+ // An arbitrary call. Bail.
return false;
}