This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Standard] Implement constant folding for IndexCast
ClosedPublic

Authored by stephenneuendorffer on Jan 29 2020, 3:59 PM.

Diff Detail

Event Timeline

Unit tests: pass. 62315 tests passed, 0 failed and 838 were skipped.

clang-tidy: fail. clang-tidy found 0 errors and 1 warnings. 0 of them are added as review comments below (why?).

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

stephenneuendorffer edited the summary of this revision. (Show Details)

Unit tests: pass. 62315 tests passed, 0 failed and 838 were skipped.

clang-tidy: fail. clang-tidy found 0 errors and 1 warnings. 0 of them are added as review comments below (why?).

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

rriddle requested changes to this revision.Jan 29 2020, 5:03 PM
rriddle added inline comments.
mlir/lib/Dialect/StandardOps/Ops.cpp
1605

Few nits:

  • Can you use a more descriptive name than 'a'? e.g. 'value'?
  • Merge the variable into the if condition.
1611

nit: Why not just Attribute?

mlir/test/Transforms/canonicalize.mlir
897

Please follow the testing guidelines(e.g. don't capture SSA values directly):

https://mlir.llvm.org/getting_started/TestingGuide/

This revision now requires changes to proceed.Jan 29 2020, 5:03 PM

Unit tests: pass. 62518 tests passed, 0 failed and 844 were skipped.

clang-tidy: pass.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

rriddle accepted this revision.Feb 9 2020, 10:52 PM

Sorry for the delay. I was waiting for you to mark the comments as Done before returning to the review.

mlir/lib/Dialect/StandardOps/Ops.cpp
1594

Can you merge this variable into the if condition?

(Can you resolve this?)

This revision is now accepted and ready to land.Feb 9 2020, 10:52 PM
stephenneuendorffer marked 4 inline comments as done.Feb 10 2020, 9:35 AM
ftynse accepted this revision.Feb 10 2020, 9:46 AM
This revision was automatically updated to reflect the committed changes.