[LLVMdev] LiveIntervals invalidates LiveVariables?
Tzu-Chien Chiu
tzuchien.chiu at gmail.com
Wed Sep 7 03:24:20 PDT 2005
I though LiveVariables may be invalidated by LiveIntervals, but it's
declared not:
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const
{
AU.addPreserved<LiveVariables>();
AU.addRequired<LiveVariables>();
...
LiveInterval may coalesce virtual registers and remove identity moves
instructions:
bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
...
// perform a final pass over the instructions and compute spill
// weights, coalesce virtual registers and remove identity moves
but the data structure LiveVariables::VirtRegInfo is _not_ updated.
That is, VarInfo::DefInstr may point to an invalid (being coalesced)
instruction.
--
Tzu-Chien Chiu,
3D Graphics Hardware Architect
<URL:http://www.csie.nctu.edu.tw/~jwchiu>
More information about the llvm-dev
mailing list