[LLVMdev] Instruction->mayReadFromMemory
Silken Tiger
st at iss.tu-darmstadt.de
Fri May 12 09:49:52 PDT 2006
Hi
I am currently trying to schedule instructions with my own algorithm. For that
i need to get the data dependency between the instructions. So currently i am
dooing s.t. like:
for(BasicBlock::iterator j=B.begin(),bbe=B.end();j!=bbe;++j) {
InstructionList.push_back(j);
if (const AllocaInst *AI = dyn_cast<AllocaInst>(j)) {
ValueList.push_back(AI);
} else if(PHINode *PHI=dyn_cast<PHINode>(j)) {
ValueList.push_back(PHI);
} else if(GetElementPtrInst *GEPI= dyn_cast<GetElementPtrInst>(j)) {
ValueList.push_back(GEPI);
};
};
To find the first instructions which are not depending on others results. So
far it seems to be working but i am missing instructions like:
%tmp.1 = seteq int %argc, 2 ; <bool> [#uses=1]
There seems only an function like llvm::Instruction::mayWriteToMemory
but nothing like llvm::Instruction::mayReadFromMemory or s.t. with similiar
functionality?
Or else: if there is an even easier way to get the non data depending
instruction from a block i missed, i would be also happy.
Thanks
S.T.
More information about the llvm-dev
mailing list