summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-02-28 23:09:18 +0000
committerEli Bendersky <eliben@google.com>2013-02-28 23:09:18 +0000
commit33ebf836bce6e4343badf83ba75a61dac804dc8c (patch)
tree57debe58b4d58836bd3546def8a2cf5046286b25 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent706469b4530bfeed161e55f006145354b97eada2 (diff)
downloadbcm5719-llvm-33ebf836bce6e4343badf83ba75a61dac804dc8c.tar.gz
bcm5719-llvm-33ebf836bce6e4343badf83ba75a61dac804dc8c.zip
A small refactoring + adding comments.
SelectionDAGIsel::LowerArguments needs a function, not a basic block. So it makes sense to pass it the function instead of extracting a basic-block from the function and then tossing it. This is also more self-documenting (functions have arguments, BBs don't). In addition, added comments to a couple of Select* methods. llvm-svn: 176305
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index e3c2c2e8ef5..3742aef879a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -6596,9 +6596,7 @@ static bool isOnlyUsedInEntryBlock(const Argument *A, bool FastISel) {
return true;
}
-void SelectionDAGISel::LowerArguments(const BasicBlock *LLVMBB) {
- // If this is the entry block, emit arguments.
- const Function &F = *LLVMBB->getParent();
+void SelectionDAGISel::LowerArguments(const Function &F) {
SelectionDAG &DAG = SDB->DAG;
DebugLoc dl = SDB->getCurDebugLoc();
const DataLayout *TD = TLI.getDataLayout();
OpenPOWER on IntegriCloud