diff options
author | dim <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
commit | e39b9e36e5f2d2dd312004cf5f84bb382be47dcd (patch) | |
tree | 7376a0c71aad05d327e5b1dcbceb3311a10f9f29 /lib/Transforms/Utils/ValueMapper.cpp | |
parent | ff2ba393a56d9d99dcb76ceada542233db28af9a (diff) | |
download | FreeBSD-src-e39b9e36e5f2d2dd312004cf5f84bb382be47dcd.zip FreeBSD-src-e39b9e36e5f2d2dd312004cf5f84bb382be47dcd.tar.gz |
Vendor import of llvm trunk r257626:
https://llvm.org/svn/llvm-project/llvm/trunk@257626
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | lib/Transforms/Utils/ValueMapper.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index 2e361d3..f47ddb9 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -222,8 +222,17 @@ static void resolveCycles(Metadata *MD, bool AllowTemps) { if (auto *N = dyn_cast_or_null<MDNode>(MD)) { if (AllowTemps && N->isTemporary()) return; - if (!N->isResolved()) - N->resolveCycles(AllowTemps); + if (!N->isResolved()) { + if (AllowTemps) + // Note that this will drop RAUW support on any temporaries, which + // blocks uniquing. If this ends up being an issue, in the future + // we can experiment with delaying resolving these nodes until + // after metadata is fully materialized (i.e. when linking metadata + // as a postpass after function importing). + N->resolveNonTemporaries(); + else + N->resolveCycles(); + } } } |