{"push_id":1072540867,"size":60,"distinct_size":1,"ref":"refs/heads/stable-swift-3.0-merge-branch","head":"861171a79434b253d7fd200503e792934af4c240","before":"38cbd5a6642005766cf61ea2119eeec947611b01","commits":[{"sha":"2c5c7ead586c4ccc07a4ba35c9bb0e8968ec55e7","author":{"email":"ff3f0acc1ab6fb30452aec66b92fdbf642dbaabd@91177308-0d34-0410-b5e6-96231b3b80d8","name":"mehdi_amini"},"message":"Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)\n\nThis remove totally any malloc from this function on my\nprofile (from 155k before).\n\nFrom: Mehdi Amini <mehdi.amini@apple.com>\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266700 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/2c5c7ead586c4ccc07a4ba35c9bb0e8968ec55e7"},{"sha":"10ee5d2ed955a41a5898803f8ee60c8adc5559a1","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"AArch64: Don't modify other modules in AArch64PromoteConstant\n\nAvoid modifying other modules in `AArch64PromoteConstant` when the\nconstant is `ConstantData` (a horrible accident, I'm sure, caught by an\nexperimental follow-up to r261464).\n\nPreviously, this walked through all the users of a constant, but that\nreaches into other modules when the constant doesn't depend transitively\non a `GlobalValue`!  Since we're walking instructions anyway, just\nmodify the instructions we actually see.\n\nAs a drive-by, instead of storing `Use` and getting the instructions\nagain via `Use::getUser()` (which is not a constantant time lookup),\nstore `std::pair<Instruction, unsigned>`.  Besides being cheaper, this\nmakes it easier to drop use-lists form `ConstantData` in the future.\n(I threw this in because I was touching all the code anyway.)\n\nBecause the patch completely changes the traversal logic, it looks\nlike a rewrite of the pass, but the core logic is all the same (or\nshould be, minus the out-of-module changes).  In other words, there\nshould be NFC as long as the LLVMContext only has a single Module.\n\nI didn't think of a good way to test this, but I hope to submit a patch\neventually that makes walking these use-lists illegal/impossible.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263853 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit a41843d06795bce4d262169e328e183e05e7bf6d)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/10ee5d2ed955a41a5898803f8ee60c8adc5559a1"},{"sha":"fea9fa4b5a5b1fe4b4656079ac5a3f3289a76e18","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"Fix -Wdocumentation warnings from r263853\n\nThanks to chapuni for catching this.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263993 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 814be6ba00531c849bbe2f844dcde25e5a06bdd3)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/fea9fa4b5a5b1fe4b4656079ac5a3f3289a76e18"},{"sha":"e5d814158774072d5039438aa12ab6ba08b17be0","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"IR: Constify LLVMContext::discardValueNames, NFC\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264823 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 540e0f57f59d7acc03f3145305501bbf18812043)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/e5d814158774072d5039438aa12ab6ba08b17be0"},{"sha":"3442409f9f145a7f21325bb5387a995791789c0c","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"IRMover: Steal arguments when moving functions, NFC\n\nInstead of copying arguments from the source function to the\ndestination, steal them.  This has a few advantages.\n\n  - The ValueMap doesn't need to be seeded with (or cleared of)\n    Arguments.\n\n  - Often the destination function won't have created any arguments yet,\n    so this avoids malloc traffic.\n\n  - Argument names don't need to be copied.\n\nBecause argument lists are lazy, this required a new\nFunction::stealArgumentListFrom helper.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265519 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit e49dfa7e9a39fb67f80146ebf1948110711241f5)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/3442409f9f145a7f21325bb5387a995791789c0c"},{"sha":"6634591fc83a6295f83d01c0b87e101b876be583","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"IR: Move MDStrings to a BumpPtrAllocator\n\nWe never delete any MDString until the context is destroyed.  Might as\nwell throw them onto a BumpPtrAllocator.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265520 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit adb72b91cb8bd25dded64c4248d45eeff050e61b)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/6634591fc83a6295f83d01c0b87e101b876be583"},{"sha":"ad55eaaf272ce3bc362e030838227b46917c7058","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"IR: Stop explicitly clearing the MDStringCache\n\nThe MDStringCache doesn't need to be explicitly cleared before\ndestruction.  The destructor handles it at least as efficiently.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265576 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 9148a0a560f8eb509a9abb6bcb4250396a9bdf50)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/ad55eaaf272ce3bc362e030838227b46917c7058"},{"sha":"d00a81533fcb2de49171bdd832fee1c23b3a8f9a","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"IR: Use DenseSet instead of DenseMap for ConstantUniqueMap; NFC\n\nUse a DenseSet instead of a DenseMap for constants in LLVMContextImpl.\nLast time I looked at this was some time before r223588, when\nDenseSet<V> had no advantage over DenseMap<V,char>.  After r223588,\nthere's a 50% memory savings.\n\nThis is all mechanical.  There were little bits of missing API from\nDenseSet so I added the trivial implementations:\n\n  - iterator::operator++(int)\n  - template <class LookupKeyT> insert_as(ValueTy, LookupKeyT)\n\nThere should be no functionality change, just reduced memory consumption\n(this wasn't on a profile or anything; just a cleanup I stumbled on).\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265577 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit a15c0e9ce0a12a95c783533daec390e91b33f5e7)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/d00a81533fcb2de49171bdd832fee1c23b3a8f9a"},{"sha":"81b4a289330fad7af9efb671f1f38d423690f080","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: clang-format ValueMapper.h, NFC\n\nAlso remove duplicated identifiers from comments.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265611 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit fb23bd1e2efd7adb5e40d9ac872b4d87829995b2)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/81b4a289330fad7af9efb671f1f38d423690f080"},{"sha":"abe329116de15d5f8cb7a3373ec27f4bb0ad5089","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"IR: RF_IgnoreMissingValues => RF_IgnoreMissingLocals, NFC\n\nClarify what this RemapFlag actually means.\n\n  - Change the flag name to match its intended behaviour.\n  - Clearly document that it's not supposed to affect globals.\n  - Add a host of FIXMEs to indicate how to fix the behaviour to match\n    the intent of the flag.\n\nRF_IgnoreMissingLocals should only affect the behaviour of\nRemapInstruction for function-local operands; namely, for operands of\ntype Argument, Instruction, and BasicBlock.  Currently, it is *only*\npassed into RemapInstruction calls (and the transitive MapValue calls\nthat it makes).\n\nWhen I split Metadata from Value I didn't understand the flag, and I\nused it in a bunch of places for \"global\" metadata.\n\nThis commit doesn't have any functionality change, but prepares to\ncleanup MapMetadata and MapValue.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265628 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit fff8357845884c25ccdcada6cbd0a0fb37869cfd)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/abe329116de15d5f8cb7a3373ec27f4bb0ad5089"},{"sha":"89d9f95e53c75fa45229d95d12e037fdd2e0cfa1","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: Make LocalAsMetadata match function-local Values\n\nStart treating LocalAsMetadata similarly to function-local members of\nthe Value hierarchy in MapValue and MapMetadata.\n\n  - Don't memoize them.\n  - Return nullptr if they are missing.\n\nThis also cleans up ConstantAsMetadata to stop listening to the\nRF_IgnoreMissingLocals flag.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265631 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit a10355896bab41256bad5bba96640e57abeb4321)\n\nConflicts:\n\tunittests/Transforms/Utils/ValueMapperTest.cpp\n\nDifferent #includes.","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/89d9f95e53c75fa45229d95d12e037fdd2e0cfa1"},{"sha":"5f6ef37fe07687e2edc38312ab116c0ec48eaa4f","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: Allow RF_IgnoreMissingLocals and RF_NullMapMissingGlobalValues\n\nRemove the assertion that disallowed the combination, since\nRF_IgnoreMissingLocals should have no effect on globals.  As it happens,\nRF_NullMapMissingGlobalValues asserted in MapValue(Constant*,...), so I\nalso changed a cast to a cast_or_null to get my test passing.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265633 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 5c7a97c89b5a16d117aa252e8f77822ef69760d7)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/5f6ef37fe07687e2edc38312ab116c0ec48eaa4f"},{"sha":"c4346eab70092b5cf3648d08271c74e2fe679e20","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"Revert \"ValueMapper: Make LocalAsMetadata match function-local Values\"\n\nThis reverts commit r265631, since it caused bot failures:\nhttp://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3256\nhttp://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/7272\n\nLooks like something is depending on the old behaviour.  I'll try to\ntrack it down and recommit.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265637 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit fcdd17bc646f13095d11a5271f433da5680a69fc)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/c4346eab70092b5cf3648d08271c74e2fe679e20"},{"sha":"c4779faed9a234c90f20117b97eecabf8e31b58d","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: Treat LocalAsMetadata more like function-local Values\n\nThis is a partial re-commit -- maybe more of a re-implementation -- of\nr265631 (reverted in r265637).\n\nThis makes RF_IgnoreMissingLocals behave (almost) consistently between\nthe Value and the Metadata hierarchy.  In particular:\n\n  - MapValue returns nullptr or \"metadata !{}\" for missing locals in\n    MetadataAsValue/LocalAsMetadata bridging paris, depending on\n    the RF_IgnoreMissingLocals flag.\n\n  - MapValue doesn't memoize LocalAsMetadata-related results.\n\n  - MapMetadata no longer deals with LocalAsMetadata or\n    RF_IgnoreMissingLocals at all.  (This wasn't in r265631 at all, but\n    I realized during testing it would make the patch simpler with no\n    loss of generality.)\n\nr265631 went too far, making both functions universally ignore\nRF_IgnoreMissingLocals.  This broke building (e.g.) compiler-rt.\nReassociate (and possibly other passes) don't currently maintain\ndominates-use invariants for metadata operands, resulting in IR like\nthis:\n\n    define void @foo(i32 %arg) {\n      call void @llvm.some.intrinsic(metadata i32 %x)\n      %x = add i32 1, i32 %arg\n    }\n\nIf the inliner chooses to inline @foo into another function, then\nRemapInstruction will call `MapValue(metadata i32 %x)` and assert that\nthe return is not nullptr.\n\nI've filed PR27273 to add a Verifier check and fix the underlying\nproblem in the optimization passes.\n\nAs a workaround, return `!{}` instead of nullptr for unmapped\nLocalAsMetadata when RF_IgnoreMissingLocals is unset.  Otherwise, match\nthe behaviour of r265631.\n\nOriginal commit message:\n\n    ValueMapper: Make LocalAsMetadata match function-local Values\n\n    Start treating LocalAsMetadata similarly to function-local members of\n    the Value hierarchy in MapValue and MapMetadata.\n\n      - Don't memoize them.\n      - Return nullptr if they are missing.\n\n    This also cleans up ConstantAsMetadata to stop listening to the\n    RF_IgnoreMissingLocals flag.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265759 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 698c0a7097957bf4c8fecbff126f30b6ce65acae)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/c4779faed9a234c90f20117b97eecabf8e31b58d"},{"sha":"4f185fcebbbf55d3b21062a2232424743ab9f80f","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: Unduplicate RF_NoModuleLevelChanges check, NFC\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265761 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 86c8abfe54731b40f468f9039a4df510fcc57706)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/4f185fcebbbf55d3b21062a2232424743ab9f80f"},{"sha":"ff973aa2be4aad717140e50bb010d7f2e04d336b","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"Revert \"ValueMapper: Treat LocalAsMetadata more like function-local Values\"\n\nThis reverts commit r265759, since even this limited version breaks some\nbots:\n  http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3311\n  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/17696\n\nThis also reverts r265761 \"ValueMapper: Unduplicate\nRF_NoModuleLevelChanges check, NFC\", since I had trouble separating it\nfrom r265759.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265765 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 50c7f32d75bdb7724547d39300048c54f23afdc9)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/ff973aa2be4aad717140e50bb010d7f2e04d336b"},{"sha":"cc9284973aef0943b37773a88056d0523832c46b","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"Reapply \"ValueMapper: Treat LocalAsMetadata more like function-local Values\"\n\nThis reverts commit r265765, reapplying r265759 after changing a call from\nLocalAsMetadata::get to ValueAsMetadata::get (and adding a unit test).  When a\nlocal value is mapped to a constant (like \"i32 %a\" => \"i32 7\"), the new debug\nintrinsic operand may no longer be pointing at a local.\n\n    http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/19020/\n\nThe previous coommit message follows:\n\n--\n\nThis is a partial re-commit -- maybe more of a re-implementation -- of\nr265631 (reverted in r265637).\n\nThis makes RF_IgnoreMissingLocals behave (almost) consistently between\nthe Value and the Metadata hierarchy.  In particular:\n\n  - MapValue returns nullptr or \"metadata !{}\" for missing locals in\n    MetadataAsValue/LocalAsMetadata bridging paris, depending on\n    the RF_IgnoreMissingLocals flag.\n\n  - MapValue doesn't memoize LocalAsMetadata-related results.\n\n  - MapMetadata no longer deals with LocalAsMetadata or\n    RF_IgnoreMissingLocals at all.  (This wasn't in r265631 at all, but\n    I realized during testing it would make the patch simpler with no\n    loss of generality.)\n\nr265631 went too far, making both functions universally ignore\nRF_IgnoreMissingLocals.  This broke building (e.g.) compiler-rt.\nReassociate (and possibly other passes) don't currently maintain\ndominates-use invariants for metadata operands, resulting in IR like\nthis:\n\n    define void @foo(i32 %arg) {\n      call void @llvm.some.intrinsic(metadata i32 %x)\n      %x = add i32 1, i32 %arg\n    }\n\nIf the inliner chooses to inline @foo into another function, then\nRemapInstruction will call `MapValue(metadata i32 %x)` and assert that\nthe return is not nullptr.\n\nI've filed PR27273 to add a Verifier check and fix the underlying\nproblem in the optimization passes.\n\nAs a workaround, return `!{}` instead of nullptr for unmapped\nLocalAsMetadata when RF_IgnoreMissingLocals is unset.  Otherwise, match\nthe behaviour of r265631.\n\nOriginal commit message:\n\n    ValueMapper: Make LocalAsMetadata match function-local Values\n\n    Start treating LocalAsMetadata similarly to function-local members of\n    the Value hierarchy in MapValue and MapMetadata.\n\n      - Don't memoize them.\n      - Return nullptr if they are missing.\n\n    This also cleans up ConstantAsMetadata to stop listening to the\n    RF_IgnoreMissingLocals flag.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265768 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 41e362dd894a21a528ad7fc3933f8df13e3bcba2)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/cc9284973aef0943b37773a88056d0523832c46b"},{"sha":"5e80c0a6b4b238e56e1f8522ead84881552d802b","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: Stop memoizing MDStrings\n\nStop adding MDString to the Metadata section of the ValueMap in\nMapMetadata.  It blows up the size of the map for no benefit, since we\ncan always return quickly anyway.\n\nThere is a potential follow-up that I don't think I'll push on right\naway, but maybe someone else is interested:  stop checking for a\npre-mapped MDString, and move the `isa<MDString>()` checks in\nMapper::mapSimpleMetadata and MDNodeMapper::getMappedOp in front of the\n`VM.getMappedMD()` calls.  While this would preclude explicitly\nremapping MDStrings it would probably be a little faster.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265827 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit ae29a03172bff733617791323f5a6c01b7695ba0)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/5e80c0a6b4b238e56e1f8522ead84881552d802b"},{"sha":"402302c30fa63ed5f69755530c1f93d660177255","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"ValueMapper: Don't memoize metadata when RF_NoModuleLevelChanges\n\nPrevent the Metadata side-table in ValueMap from growing unnecessarily\nwhen RF_NoModuleLevelChanges.  As a drive-by, make ValueMap::hasMD,\nwhich apparently had no users until I used it here for testing, actually\ncompile.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265828 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 81361659c523e6cef9cd66046334fe46619b9c00)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/402302c30fa63ed5f69755530c1f93d660177255"},{"sha":"12ca2b434d73b9408b07ca3f8b60af19d513ff23","author":{"email":"20d921fc546146872790792fbd1b5fc4bad0eb3d@apple.com","name":"Duncan P. N. Exon Smith"},"message":"Linker: Always pass RF_IgnoreMissingLocals; NFC\n\nThis is a cleanup after clarifying the meaning of RF_IgnoreMissingLocals\nin r265628 and truly limiting it to locals in r265768.\n\nThis should have no functionality change, since the only context that\nthe flag has an effect is when we could hit function-local Value and\nMetadata, and we were already passing it in those contexts.\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265831 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 6900b6439360da3012ba97dfa05788c18f47f212)","distinct":false,"url":"https://api.github.com/repos/apple/swift-llvm/commits/12ca2b434d73b9408b07ca3f8b60af19d513ff23"}]}