[LLVMdev] optimizing access to global
Jochen Wilhelmy
j.wilhelmy at arcor.de
Wed May 18 11:02:52 PDT 2011
Hi!
I'd like to optimize access to a global (write after read), but I didn't get
it to work. I used:
passManager.add(llvm::createGlobalsModRefPass());
passManager.add(llvm::createGVNPass());
Are these passes correct to do it?
And my global is
@global = internal global %0, align 16
I have for example
int a = global.a.b[0];
global.a.b[0] = a; // this should be removed
Does anybody have a hint? It's still llvm 2.8
Maybe the array access is the cause but all indexes are constant.
-Jochen
More information about the llvm-dev
mailing list