[llvm-commits] CVS: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
Chris Lattner
sabre at nondot.org
Sat Dec 16 13:22:08 PST 2006
Changes in directory llvm/lib/Transforms/IPO:
DeadArgumentElimination.cpp updated: 1.31 -> 1.32
---
Log message:
when inserting a dummy argument to work-around the CBE not supporting
zero arg vararg functions, pass undef instead of 'int 0', which is cheaper.
---
Diffs of the changes: (+1 -3)
DeadArgumentElimination.cpp | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.31 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.32
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.31 Wed Dec 6 11:46:32 2006
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Sat Dec 16 15:21:53 2006
@@ -499,8 +499,6 @@
// Work around LLVM bug PR56: the CWriter cannot emit varargs functions which
// have zero fixed arguments.
//
- // FIXME: once this bug is fixed in the CWriter, this hack should be removed.
- //
bool ExtraArgHack = false;
if (Params.empty() && FTy->isVarArg()) {
ExtraArgHack = true;
@@ -530,7 +528,7 @@
Args.push_back(*AI);
if (ExtraArgHack)
- Args.push_back(Constant::getNullValue(Type::IntTy));
+ Args.push_back(UndefValue::get(Type::IntTy));
// Push any varargs arguments on the list
for (; AI != CS.arg_end(); ++AI)
More information about the llvm-commits
mailing list