Page MenuHomePhabricator

[CodeExtractor] Allowing for caller to access final inputs and outputs.
ClosedPublic

Authored by AndrewLitteken on Jul 28 2021, 1:00 PM.

Details

Summary

The Code Extractor does not provide an easy mechanism for determining the inputs and outputs after extraction has occurred, this patch gives the ability to pass in empty SetVectors to be filled with the inputs and outputs if they need to be analyzed.

Diff Detail

Event Timeline

AndrewLitteken created this revision.Jul 28 2021, 1:00 PM
AndrewLitteken requested review of this revision.Jul 28 2021, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2021, 1:00 PM

Add a testcase to unittests/Transforms/Utils/CodeExtractorTest.cpp?

Adding a test and clang-format issues.

paquette accepted this revision.Tue, Aug 24, 12:57 PM

LGTM with documentation nit.

llvm/include/llvm/Transforms/Utils/CodeExtractor.h
142

Can you add documentation for Inputs and Outputs explaining that they are out-params?

This revision is now accepted and ready to land.Tue, Aug 24, 12:57 PM
paquette added inline comments.Tue, Aug 24, 12:59 PM
llvm/unittests/Transforms/Utils/CodeExtractorTest.cpp
118

Can all of these use EXPECT_EQ?

Updating for nits

paquette accepted this revision.Wed, Aug 25, 2:33 PM

LGTM with one more nit

llvm/include/llvm/Transforms/Utils/CodeExtractor.h
147

maybe just say "filled with input values to the outlined function"?

even though this is a typedef of SetVector, it's a little confusing when looking at this locally.

(similar nit with Outputs)

This revision was landed with ongoing or failed builds.Thu, Aug 26, 9:48 AM
This revision was automatically updated to reflect the committed changes.