This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Document and use getConstant's splat-building feature.
ClosedPublic

Authored by ab on Feb 12 2016, 5:56 PM.

Details

Summary

As discussed in D17176, getConstant already supports splats; let's use it!

As I mention there, I do think that the name "getConstant" could be confusing. In practice I don't think it's a problem, with proper names and context. That's not ideal though, so perhaps we should add "getConstantVec" (or "getConstantSplat"?) versions of the 6 getConstant variants we already have?

Diff Detail

Repository
rL LLVM

Event Timeline

ab updated this revision to Diff 47883.Feb 12 2016, 5:56 PM
ab retitled this revision from to [CodeGen] Document and use getConstant's splat-building feature..
ab updated this object.
ab added subscribers: RKSimon, spatel, arsenm, llvm-commits.
spatel accepted this revision.Feb 13 2016, 9:36 AM
spatel added a reviewer: spatel.

Thanks for the documentation and clean-up! LGTM.

I agree that the naming is vague, but exploding this API further seems like more mess than it's worth.

This revision is now accepted and ready to land.Feb 13 2016, 9:36 AM
This revision was automatically updated to reflect the committed changes.