[llvm-commits] [llvm] r165726 - in /llvm/trunk: include/llvm-c/ include/llvm/ include/llvm/Target/ include/llvm/Transforms/Utils/ lib/Analysis/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/ExecutionEngine/ lib/ExecutionEngin

Eli Friedman eli.friedman at gmail.com
Thu Oct 11 14:29:56 PDT 2012


On Thu, Oct 11, 2012 at 2:19 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Oct 11, 2012, at 10:21 AM, Micah Villmow <villmow at gmail.com> wrote:
>
>> Author: mvillmow
>> Date: Thu Oct 11 12:21:41 2012
>> New Revision: 165726
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=165726&view=rev
>> Log:
>> Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.
>
> Hi Micah,
>
> You've added this code to ExecutionEngine.cpp:
>
>     case Instruction::PtrToInt: {
>       GenericValue GV = getConstantValue(Op0);
>       unsigned AS = cast<PtrToIntInst>(CE)->getPointerAddressSpace();
>       uint32_t PtrWidth = TD->getPointerSizeInBits(AS);
>       GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal));
>
> This is completely incorrect, because "CE" is a ConstantExpr, not an Instruction.  This error is repeated in several other places.  Please fix soon or revert the patch.
>
> Was this patch reviewed?

Yes, I reviewed it, but clearly not carefully enough.

-Eli



More information about the llvm-commits mailing list