This is an archive of the discontinued LLVM Phabricator instance.

IRGen: Remove all uses of CreateDefaultAlignedLoad.
ClosedPublic

Authored by pcc on Nov 27 2016, 9:30 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 79370.Nov 27 2016, 9:30 PM
pcc retitled this revision from to IRGen: Remove all uses of CreateDefaultAlignedLoad..
pcc updated this object.
pcc added a reviewer: rsmith.
pcc added subscribers: cfe-commits, rjmccall.

Thanks for doing this! A couple minor questions / comments.

clang/lib/CodeGen/CGBuiltin.cpp
2195 ↗(On Diff #79370)

Why 4?

clang/lib/CodeGen/TargetInfo.cpp
3560 ↗(On Diff #79370)

Please leave a comment mentioning that this is probably pessimistic.

pcc updated this revision to Diff 79436.Nov 28 2016, 12:59 PM
pcc marked an inline comment as done.
  • Address review comments
clang/lib/CodeGen/CGBuiltin.cpp
2195 ↗(On Diff #79370)

__readfsdword is a Windows intrinsic which returns an unsigned long, which always has size/alignment 4 on Windows.

But now that I think about it I suppose we can get here on other platforms with MS extensions enabled, so I've changed this to query the alignment.

rjmccall added inline comments.Nov 28 2016, 1:33 PM
clang/lib/CodeGen/CGBuilder.h
126 ↗(On Diff #79436)

Oh, please remove this comment, too, since you've now achieved it. :)

clang/lib/CodeGen/CGBuiltin.cpp
2195 ↗(On Diff #79370)

Thanks.

pcc added inline comments.Nov 28 2016, 1:34 PM
clang/lib/CodeGen/CGBuilder.h
126 ↗(On Diff #79436)

We still have CreateDefaultAlignedStore though.

rjmccall added inline comments.Nov 28 2016, 2:30 PM
clang/lib/CodeGen/CGBuilder.h
126 ↗(On Diff #79436)

Oh, yes, of course. In that case, this LGTM.

This revision was automatically updated to reflect the committed changes.