This is an archive of the discontinued LLVM Phabricator instance.

[Polly] [NFC] [IslNodeBuilder, GPUNodeBuilder] Unify mechanism for looking up replacement Values.
ClosedPublic

Authored by bollu on Jul 28 2017, 8:40 AM.

Details

Summary

We populate IslNodeBuilder::ValueMap which contains replacements for
llvm::Values. There was no simple method to pick up a replacement if
it exists, otherwise fall back to the original.

Create a method IslNodeBuilder::getLatestValue which provides this
functionality.

This will be used in the next patch to fix bugs in PPCGCodeGeneration
where the latest value is not being used.

Event Timeline

bollu created this revision.Jul 28 2017, 8:40 AM
bollu added a comment.Jul 28 2017, 8:41 AM

@grosser | @Meinersbur | @singam-sanjay : review please.

include/polly/CodeGen/IslNodeBuilder.h
271

@grosser, @Meinersbur, @singam-sanjay - I wanted some thought on the name.

grosser accepted this revision.Aug 1 2017, 4:57 AM

LGTM

lib/CodeGen/IslNodeBuilder.cpp
296

Unrelated?

This revision is now accepted and ready to land.Aug 1 2017, 4:57 AM
This revision was automatically updated to reflect the committed changes.