[llvm] r178147 - Cleanup the simplify_type implementation.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jul 16 20:16:15 PDT 2013


>>> In terms of the patch itself, if I recall correctly, the enable_ifs
>>> you're removing are necessary to reject a T* where T is simplifiable.
>>> I could be wrong, though.
>>
>> Sorry, can you give an example of what you want to reject?
>
> Something like the following (there are probably better examples, but
> I can't remember off the top of my head):
>
>     llvm::Value *V;
>     llvm::Use *U = &V->use_begin().getUse();
>     llvm::Constant *XXX = cast<llvm::Constant>(U);

We used to accept

Constant *foobar(Use *U) {
  return cast<Constant>(U);
}

before r178147. Why would you want to reject it?

> -Eli

Cheers,
Rafael



More information about the llvm-commits mailing list