diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-04-22 21:38:15 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-04-22 21:38:15 +0000 |
commit | dc012fa26690bef5cd7b56e28bbbe9d1aa17349a (patch) | |
tree | 98eea4882cb0f30190beef442b48c562bff7a89a /clang/lib/CodeGen/CGCleanup.h | |
parent | 952d95141828eeb787d17c7f92d9dd6ea455cd0c (diff) | |
download | bcm5719-llvm-dc012fa26690bef5cd7b56e28bbbe9d1aa17349a.tar.gz bcm5719-llvm-dc012fa26690bef5cd7b56e28bbbe9d1aa17349a.zip |
Revert "Revert r234581, it might have caused a few miscompiles in Chromium."
This reverts commit r234700. It turns out that the lifetime markers
were not the cause of Chromium failing but a bug which was uncovered by
optimizations exposed by the markers.
llvm-svn: 235553
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.h')
-rw-r--r-- | clang/lib/CodeGen/CGCleanup.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h index 5f94aec4978..81c64123dfd 100644 --- a/clang/lib/CodeGen/CGCleanup.h +++ b/clang/lib/CodeGen/CGCleanup.h @@ -62,6 +62,9 @@ protected: /// Whether this cleanup is currently active. unsigned IsActive : 1; + /// Whether this cleanup is a lifetime marker + unsigned IsLifetimeMarker : 1; + /// Whether the normal cleanup should test the activation flag. unsigned TestFlagInNormalCleanup : 1; @@ -75,7 +78,7 @@ protected: /// The number of fixups required by enclosing scopes (not including /// this one). If this is the top cleanup scope, all the fixups /// from this index onwards belong to this scope. - unsigned FixupDepth : 32 - 17 - NumCommonBits; // currently 13 + unsigned FixupDepth : 32 - 18 - NumCommonBits; // currently 13 }; class FilterBitFields { @@ -272,6 +275,7 @@ public: CleanupBits.IsNormalCleanup = isNormal; CleanupBits.IsEHCleanup = isEH; CleanupBits.IsActive = isActive; + CleanupBits.IsLifetimeMarker = false; CleanupBits.TestFlagInNormalCleanup = false; CleanupBits.TestFlagInEHCleanup = false; CleanupBits.CleanupSize = cleanupSize; @@ -295,6 +299,9 @@ public: bool isActive() const { return CleanupBits.IsActive; } void setActive(bool A) { CleanupBits.IsActive = A; } + bool isLifetimeMarker() const { return CleanupBits.IsLifetimeMarker; } + void setLifetimeMarker() { CleanupBits.IsLifetimeMarker = true; } + llvm::AllocaInst *getActiveFlag() const { return ActiveFlag; } void setActiveFlag(llvm::AllocaInst *Var) { ActiveFlag = Var; } |