This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Introduce an API for MemOp
ClosedPublic

Authored by gchatelet on Feb 4 2020, 6:30 AM.

Details

Summary

This patch introduces an API for MemOp in order to simplify and tighten the client code.

Diff Detail

Event Timeline

gchatelet created this revision.Feb 4 2020, 6:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2020, 6:30 AM
gchatelet updated this revision to Diff 242322.Feb 4 2020, 6:33 AM
  • Remove unrelated changes
courbet added inline comments.Feb 4 2020, 6:40 AM
llvm/include/llvm/CodeGen/TargetLowering.h
156–157

LGTM with the understanding that this will go away and be replaced with Align eventually.

180

I think you can make AlignCheck an Align (here and below).

gchatelet marked 3 inline comments as done.Feb 4 2020, 7:21 AM
gchatelet added inline comments.
llvm/include/llvm/CodeGen/TargetLowering.h
156–157

I've done it in this patch eventually.

gchatelet updated this revision to Diff 242332.Feb 4 2020, 7:21 AM
gchatelet marked an inline comment as done.
  • Address comments
courbet added inline comments.Feb 5 2020, 7:43 AM
llvm/include/llvm/CodeGen/TargetLowering.h
170

To be consistent with isMemcpyWithFixedDstAlign this should be isMemset() && ZeroMemset (and the only usage is as a conjunction anyway)

nhaehnle removed a subscriber: nhaehnle.Feb 5 2020, 8:59 AM
gchatelet updated this revision to Diff 243104.Feb 7 2020, 2:13 AM
gchatelet marked an inline comment as done.

Address comments and rebase

courbet accepted this revision.Feb 7 2020, 2:18 AM
This revision is now accepted and ready to land.Feb 7 2020, 2:18 AM
This revision was automatically updated to reflect the committed changes.
arsenm added inline comments.Aug 12 2020, 5:06 PM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
904

Why isn't this always passing the alignment? Why does isFixedDstAlign matter?

Passing 0 is broken in any case