[llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll

Duncan Sands baldrick at free.fr
Thu Jan 31 09:55:28 PST 2008


> > Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead?
> 
> Didn't know about this, thanks.  It recurses and I don't think that's  
> what I want in this case.  I did, however, steal its looping code:)

Are you sure you don't want it to be recursive?  I can take a global
variable, bitcast it, do a GEP 0 on that, bitcast the result, etc.
The final result will be equivalent to a single bitcast of the original
global.  So shouldn't this code handle it?  Of course if the optimizers
are run then they would simplify such a silly example.  But it seems
wrong to me to assume that the IR has been optimized...

Best wishes,

Duncan.



More information about the llvm-commits mailing list