This is an archive of the discontinued LLVM Phabricator instance.

Implement TypeSig generator in `Intrinsics.td`
ClosedPublic

Authored by chapuni on Mar 26 2023, 7:00 AM.

Details

Summary

This commit doesn't replace IntrinsicEmitter::ComputeFixedEncoding(),
but compares outputs to it, to make sure implementation correct.

Depends on D145871, D145872, D145874, and D146914

Diff Detail

Event Timeline

chapuni created this revision.Mar 26 2023, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2023, 7:00 AM
chapuni requested review of this revision.Mar 26 2023, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2023, 7:00 AM
arsenm added a subscriber: arsenm.Mar 30 2023, 11:44 AM
arsenm added inline comments.
llvm/utils/TableGen/CodeGenIntrinsics.cpp
123

Leftover dead code?

chapuni added inline comments.
llvm/utils/TableGen/CodeGenIntrinsics.cpp
123

Two reason.

  • I would like to notify to downstreams with this change.
  • I would like to leave the history for someone to visit.

I could squash D145937 into this.

chapuni updated this revision to Diff 511420.Apr 6 2023, 7:54 AM
  • Rebase
arsenm accepted this revision.Apr 8 2023, 4:53 AM
arsenm added inline comments.
llvm/include/llvm/IR/Intrinsics.td
185

I don't know what Idx means here in relation to the constant 0x100

215

Should be on previous line

614

Ditto

llvm/utils/TableGen/CodeGenIntrinsics.cpp
123

I don't expect the encoding of intrinsics to be a meaningful place for downstream users. Ok as long as the OLD stuff is removed in the next patch

This revision is now accepted and ready to land.Apr 8 2023, 4:53 AM
chapuni updated this revision to Diff 511976.Apr 9 2023, 3:34 AM
  • s/DecArgCode/ResolveArgCode/
  • Update ArgCode encoders
  • Reformat typelist
chapuni marked 3 inline comments as done.Apr 9 2023, 3:38 AM
chapuni added inline comments.
llvm/include/llvm/IR/Intrinsics.td
185

I have rewritten more descriptive.

215

I have reindented typelist deeper since I was afraid it would cause less readable.

chapuni updated this revision to Diff 511986.Apr 9 2023, 4:30 AM
chapuni marked 2 inline comments as done.
  • Fix isOverloaded (intrinsic-pointer-to-any.td was failing)
chapuni updated this revision to Diff 516807.Apr 25 2023, 7:58 AM
  • Avoid D145872 -- dynamic subscript

I have introduced ListIntAt, ListLLVMTypeAt, and ListListIntAt.
I will rewind them when D145872 (dynamic subscript) is landed.

This revision was landed with ongoing or failed builds.Apr 26 2023, 7:50 AM
This revision was automatically updated to reflect the committed changes.