[llvm-commits] [llvm] r51947 - in /llvm/trunk/lib: Analysis/IPA/CallGraph.cpp Transforms/IPO/DeadArgumentElimination.cpp

Chris Lattner clattner at apple.com
Wed Jun 4 10:34:40 PDT 2008


On Jun 4, 2008, at 10:30 AM, Matthijs Kooijman wrote:

> Hi Chris,
>
>> Actually, this can be checked in O(1) time by just calling
>> I.getOperandNo().  If the use_iterator is for the callee operand of
>> the function, then it is ok.  If not,  you know it is passing in the
>> address of the function.  The DeadArgElim code was written before
>> getOperandNo() existed on use_iterator.
> Sounds better, I'll change it to that way tomorrow.
>
> But, how about functions that have themselves as an argument? Or  
> would that
> solve itself because then both operands (callee and argument) would  
> be in the
> use list seperately? Must be the last one, so it sounds safe to  
> change this.

Yep, exactly.  BTW, are you seeing this build error?

llvm[2]: Compiling Optimize.cpp for Debug build
Undefined symbols:
   "llvm::GetElementPtrInst::init(llvm::Value*, llvm::Value* const*,  
unsigned int)", referenced from:
       void llvm::GetElementPtrInst::init<llvm::Value**>(llvm::Value*,  
llvm::Value**, llvm::Value**, std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > const&,  
std::random_access_iterator_tag)in  
libLLVMScalarOpts.a(InstructionCombining.o)
       void llvm::GetElementPtrInst::init<llvm::Value**>(llvm::Value*,  
llvm::Value**, llvm::Value**, std::basic_string<char,  
std::char_traits<char>, std::allocator<char> > const&,  
std::random_access_iterator_tag)in  
libLLVMScalarOpts.a(InstructionCombining.o)
       void llvm::GetElementPtrInst::init<llvm::Value**>(llvm::Value*,  
llvm::Value**, llvm::Value**, std::basic_string<char, std::char
...

Did you forget to commit a file?  I'm doing a clean rebuild to see if  
it is a local problem.

-Chris



More information about the llvm-commits mailing list