This is an archive of the discontinued LLVM Phabricator instance.

Migrate `IIT_Info` into `Intrinsics.td`
ClosedPublic

Authored by chapuni on Mar 26 2023, 6:58 AM.

Details

Summary
  • Define IIT_Info in Intrinsics.td
  • Implement EmitIITInfo in IntrinsicEmitter.cpp
  • Use generated IIT_Info in Function.cpp

Depends on D145873 and D146179

Diff Detail

Event Timeline

chapuni created this revision.Mar 26 2023, 6:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2023, 6:58 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
chapuni requested review of this revision.Mar 26 2023, 6:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2023, 6:58 AM
chapuni updated this revision to Diff 508680.Mar 27 2023, 8:46 AM
chapuni edited the summary of this revision. (Show Details)
  • Reduce depends
arsenm added a subscriber: arsenm.Mar 30 2023, 11:39 AM
arsenm added inline comments.
llvm/utils/TableGen/IntrinsicEmitter.cpp
194

assert(isUInt<8>(Number))

arsenm added inline comments.Mar 30 2023, 11:58 AM
llvm/utils/TableGen/IntrinsicEmitter.cpp
190

std::array

chapuni updated this revision to Diff 509861.Mar 30 2023, 5:32 PM
chapuni marked 2 inline comments as done.
  • Use std::array
chapuni updated this revision to Diff 509862.Mar 30 2023, 5:34 PM
  • Add <array>
chapuni updated this revision to Diff 511418.Apr 6 2023, 7:46 AM
  • Update comment header
  • Rebase
arsenm accepted this revision.Apr 8 2023, 4:48 AM
arsenm added inline comments.
llvm/utils/TableGen/IntrinsicEmitter.cpp
194

This isn't done? isUInt<8> would be clearer (or at least swap the compare to be Number >= 0)

This revision is now accepted and ready to land.Apr 8 2023, 4:48 AM
chapuni added inline comments.Apr 9 2023, 2:52 AM
llvm/utils/TableGen/IntrinsicEmitter.cpp
190

Could we use other expression instead of 256 here?
Kinda max<uint8_t> + 1 is not smart, I think. 256 is the obvious value for us.

194

I think I can rely on size of array.
Or may I remove mention uint8_t in the failure message?

m <= x && x < n is my preference as in_range.

This revision was automatically updated to reflect the committed changes.