[llvm-commits] [llvm] r52315 - in /llvm/trunk: include/llvm/Analysis/ValueTracking.h lib/Analysis/ValueTracking.cpp lib/Transforms/Scalar/InstructionCombining.cpp

Dan Gohman gohman at apple.com
Mon Jun 16 11:39:22 PDT 2008


Hi Matthijs,

On Jun 16, 2008, at 5:48 AM, Matthijs Kooijman wrote:
> +  /// FindScalarValue - Given an aggregrate and an sequence of  
> indices, see if the
> +  /// scalar value indexed is already around as a register, for  
> example if it were
> +  /// inserted directly into the aggregrate.
> +  Value *FindInsertedValue(Value *V,
> +                         const unsigned *idx_begin,
> +                         const unsigned *idx_end,
> +                         Instruction &InsertBefore);

Well, there's no insertvalue instruction for a constant or an undef. I
thought of the name FindExtractedValue because it returns the value that
an extractvalue with the given arguments would extract. But if you  
prefer
FindInsertedValue, please update the comment to mention that it does the
useful thing for constants and undefs.

Also, the comment here still says FindScalarValue, and it's
now over 80 columns.

Thanks,

Dan




More information about the llvm-commits mailing list