This is an archive of the discontinued LLVM Phabricator instance.

[NFC][CodeGen] Add a setTargetDAGCombine use ArrayRef
ClosedPublic

Authored by s on Mar 28 2022, 12:16 AM.

Diff Detail

Event Timeline

s created this revision.Mar 28 2022, 12:16 AM
s requested review of this revision.Mar 28 2022, 12:16 AM

Nothing against it in principle, but might it be better to have it take an ArrayRef instead? Then people can use this in other ways, e.g., an array or dynamically constructing a SmallVector. Also I think it'd be good if other targets were changed to use this.

s retitled this revision from [NFC][CodeGen] Add a setTargetDAGCombine use initializer_list to [NFC][CodeGen] Add a setTargetDAGCombine use ArrayRef.Mar 28 2022, 10:57 AM
s added a reviewer: luismarques.
s updated this revision to Diff 418653.Mar 28 2022, 11:18 AM

Address @frasercrmck's comment.

craig.topper added inline comments.Mar 28 2022, 11:26 AM
llvm/lib/Target/XCore/XCoreISelLowering.cpp
1316

Don't make unrelated formatting changes. Use the clang-format-diff.py script https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting

s updated this revision to Diff 418661.Mar 28 2022, 11:33 AM
s marked an inline comment as done.

Revert unrelated formatting changes.

arsenm accepted this revision.Mar 28 2022, 1:17 PM
arsenm added inline comments.
llvm/include/llvm/CodeGen/TargetLowering.h
2346

Could also use std::initializer_list

This revision is now accepted and ready to land.Mar 28 2022, 1:17 PM
craig.topper added inline comments.Mar 28 2022, 1:20 PM
llvm/include/llvm/CodeGen/TargetLowering.h
2346

That's what it started as. @frasercrmck suggested ArrayRef.

This revision was landed with ongoing or failed builds.Mar 28 2022, 6:53 PM
This revision was automatically updated to reflect the committed changes.
s marked 2 inline comments as done.