[LLVMdev] RE: Port to Solaris' Sun Studio 8
Chris Lattner
sabre at nondot.org
Wed Mar 15 09:49:36 PST 2006
On Wed, 15 Mar 2006, Vladimir Prus wrote:
> The error above suggests that "isa<AllocationInst>(whatever)" was invoked,
> and in current CVS, the only use of AllocationInst in
> LoadValueNumbering.cpp is on line 305:
>
> if (isa<AllocationInst>(I))
> RetVals.push_back(UndefValue::get(LI->getType()));
>
> I think changing this to
>
> if (isa<AllocationInst>(*I))
> RetVals.push_back(UndefValue::get(LI->getType()));
>
> should work,
Yes, quite true.
> and be more robust anyway then relying on implicit
> interator->value conversion anyway.
I don't think this is a robustness issue: the casting machinery has
explicit knowledge that it should autodereference these iterators.
Somehow this is getting picked up on GCC but not on Sun CC. I think
that it's just a missing specialization (which I posted).
> You should get one compile error on attempt to call 'no_such_method' on
> results of 'getSimplifiedValue', and the error message should name the type
> of the object you call method on. With gcc/Linux, that type is
> 'llvm::Instruction*'. If you see anything else, this means 'simplify_type'
> is broken, and most probable reason is that the compiler has broken partial
> template specialisation.
Agreed 100%.
> Some workarounds may be possible, but adding '*' everywhere dynamic casting
> is used might be easier solution.
If it comes to that, we can do that. :(
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list