What is the meaning of addRegisterDead function

Now I am writing a simulator by llvm IR. That is really a wonderful
tools for us. Now I use gprof try to
find the bottleneck of the simulator, the output as the following. And
I found addRegisterDead of llvm
is called too much. What is the functionality of addRegisterDead?
I try to understand it by reading the related code of llvm source but no idea.

  % cumulative self self total
time seconds seconds calls Ts/call Ts/call name
  5.16 0.33 0.33
llvm::MachineInstr::addRegisterDead(unsigned int,
llvm::TargetRegisterInfo const*, bool)

Thanks in advance.

Michael.Kang

It is called from the LiveVariables pass. It is the first part of register allocation.

I think this has been resolved on subversion trunk. Are you using 2.7? Try upgrading to svn.

You can also disable it by running with -regalloc=fast. That does not produce as good code, but it is much much faster.

/jakob