[LLVMdev] Instruction does not dominate all uses

Anurag kumar singh anuragks at iitk.ac.in
Tue Apr 16 08:34:40 PDT 2013


Hi,
I am writing an alias profiler using the points-to relation.
For this I'm inserting a function call of external function with the
following type
profile(int,int,int,void*,void*,...)
I'm trying to pass the dereferenced pointer's memory address and the
address of the location who are in alias set of the pointer.

For this i'm using BitCastInst 
	BitCastInst *init1= new
BitCastInst(arg1,PointerType::getInt8PtrTy(Context),"bitcast",li2);

But every time i have a dereferenced pointer inside a for loop I get an
Instruction does not dominate all uses error.
Instruction does not dominate all uses!
  %9 = load i32** %x2, align 4
  %bitcast6 = bitcast i32* %9 to i8*
Instruction does not dominate all uses!
  %bitcast5 = bitcast i32* %7 to i8*
  %newargc7 = call i32 (i32, i32, i32, i8*, i8*, ...)* @profile(i32 1,
i32 4, i32 1, i8* %bitcast2, i8* %bitcast3, i8* %bitcast4, i8* %
bitcast5, i8* %bitcast6)

Can someone please help me ASAP




More information about the llvm-dev mailing list