summaryrefslogtreecommitdiff
path: root/devel/llvm37/files/patch-llvm-svn-243590
diff options
context:
space:
mode:
Diffstat (limited to 'devel/llvm37/files/patch-llvm-svn-243590')
-rw-r--r--devel/llvm37/files/patch-llvm-svn-24359073
1 files changed, 0 insertions, 73 deletions
diff --git a/devel/llvm37/files/patch-llvm-svn-243590 b/devel/llvm37/files/patch-llvm-svn-243590
deleted file mode 100644
index 643ce3a92b22..000000000000
--- a/devel/llvm37/files/patch-llvm-svn-243590
+++ /dev/null
@@ -1,73 +0,0 @@
-------------------------------------------------------------------------
-r243590 | matze | 2015-07-29 23:22:48 +0000 (Wed, 29 Jul 2015) | 9 lines
-
-IR: Implement Value::mergeUseLists() iteratively
-
-This avoids stack overflows when the the compiler does not perform tail call
-elimination. Apparently this happens for MSVC with the /Ob2 switch which
-may be used by external code including this header.
-
-Reported by and based on a patch from Jean-Francois Riendeau.
-
-Related to rdar://21900756
-------------------------------------------------------------------------
-Index: include/llvm/IR/Value.h
-===================================================================
---- include/llvm/IR/Value.h (revision 243589)
-+++ include/llvm/IR/Value.h (revision 243590)
-@@ -493,7 +493,28 @@
- template <class Compare>
- static Use *mergeUseLists(Use *L, Use *R, Compare Cmp) {
- Use *Merged;
-- mergeUseListsImpl(L, R, &Merged, Cmp);
-+ Use **Next = &Merged;
-+
-+ for (;;) {
-+ if (!L) {
-+ *Next = R;
-+ break;
-+ }
-+ if (!R) {
-+ *Next = L;
-+ break;
-+ }
-+ if (Cmp(*R, *L)) {
-+ *Next = R;
-+ Next = &R->Next;
-+ R = R->Next;
-+ } else {
-+ *Next = L;
-+ Next = &L->Next;
-+ L = L->Next;
-+ }
-+ }
-+
- return Merged;
- }
-
-@@ -586,25 +607,6 @@
- }
- }
-
--template <class Compare>
--void Value::mergeUseListsImpl(Use *L, Use *R, Use **Next, Compare Cmp) {
-- if (!L) {
-- *Next = R;
-- return;
-- }
-- if (!R) {
-- *Next = L;
-- return;
-- }
-- if (Cmp(*R, *L)) {
-- *Next = R;
-- mergeUseListsImpl(L, R->Next, &R->Next, Cmp);
-- return;
-- }
-- *Next = L;
-- mergeUseListsImpl(L->Next, R, &L->Next, Cmp);
--}
--
- // isa - Provide some specializations of isa so that we don't have to include
- // the subtype header files to test to see if the value is a subclass...
- //