summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] use local variables to reduce code in foldICmpShlConstant; NFCSanjay Patel2016-08-191-21/+15
| | | | llvm-svn: 279282
* [Hexagon] Fix a few omissions in HexagonInstrInfoKrzysztof Parzyszek2016-08-191-0/+3
| | | | llvm-svn: 279280
* [InstCombine] rename variables in foldICmpShlConstant(); NFCSanjay Patel2016-08-191-34/+34
| | | | llvm-svn: 279279
* GlobalISel: support overflow arithmetic intrinsics.Tim Northover2016-08-193-15/+63
| | | | | | | | | | | | Unsigned addition and subtraction can reuse the instructions created to legalize large width operations (i.e. both produce and consume a carry flag). Signed operations and multiplies get a dedicated op-with-overflow instruction. Once this is produced the two values are combined into a struct register (which will almost always be merged with a corresponding G_EXTRACT as part of legalization). llvm-svn: 279278
* Revert "[asan] Optimize store size in FunctionStackPoisoner::poisonRedZones"Vitaly Buka2016-08-191-55/+40
| | | | | | | | This reverts commit r279178. Speculative revert in hope to fix asan crash on arm. llvm-svn: 279277
* Revert "[asan] Fix size of shadow incorrectly calculated in r279178"Vitaly Buka2016-08-191-2/+4
| | | | | | | | This reverts commit r279222. Speculative revert in hope to fix asan crash on arm. llvm-svn: 279276
* [RuntimeDyld] Revert r279182 and 279201 -- they broke some ARM bots.Lang Hames2016-08-191-16/+0
| | | | llvm-svn: 279275
* [AliasSetTracker] Degrade AliasSetTracker when may-alias sets get too large.Michael Kuperstein2016-08-191-9/+116
| | | | | | | | | | | | | | | | | | Repeated inserts into AliasSetTracker have quadratic behavior - inserting a pointer into AST is linear, since it requires walking over all "may" alias sets and running an alias check vs. every pointer in the set. We can avoid this by tracking the total number of pointers in "may" sets, and when that number exceeds a threshold, declare the tracker "saturated". This lumps all pointers into a single "may" set that aliases every other pointer. (This is a stop-gap solution until we migrate to MemorySSA) This fixes PR28832. Differential Revision: https://reviews.llvm.org/D23432 llvm-svn: 279274
* [X86][SSE] Generalised combining to VZEXT_MOVL to any vector sizeSimon Pilgrim2016-08-191-6/+8
| | | | | | This doesn't change tests codegen as we already combined to blend+zero which is what we lower VZEXT_MOVL to on SSE41+ targets, but it does put us in a better position when we improve shuffling for optsize. llvm-svn: 279273
* [Hexagon] Enforce LLSC packetization rulesKrzysztof Parzyszek2016-08-191-0/+18
| | | | | | | | | Ensure that load locked and store conditional instructions are only packetized with ALU32 instructions. Patch by Ben Craig. llvm-svn: 279272
* Fix regression in InstCombine introduced by r278944Reid Kleckner2016-08-191-3/+4
| | | | | | | | | | | The intended transform is: // Simplify icmp eq (or (ptrtoint P), (ptrtoint Q)), 0 // -> and (icmp eq P, null), (icmp eq Q, null). P and Q are both pointer types, but may have different types. We need two calls to getNullValue() to make the icmps. llvm-svn: 279271
* [Hexagon] Minor updates to register definitionsKrzysztof Parzyszek2016-08-191-4/+5
| | | | llvm-svn: 279269
* [CloneFunction] Don't remove unrelated nodes from the CGSSCDavid Majnemer2016-08-191-0/+6
| | | | | | | | CGSCC use a WeakVH to track call sites. RAUW a call within a function can result in that WeakVH getting confused about whether or not the call site is still around. llvm-svn: 279268
* [Hexagon] Fix incorrect generation of S4_subi_asl_riKrzysztof Parzyszek2016-08-191-14/+29
| | | | | | Patch by Jyotsna Verma. llvm-svn: 279267
* [InstCombine] use m_APInt to allow icmp (shl 1, Y), C folds for splat ↵Sanjay Patel2016-08-191-4/+5
| | | | | | constant vectors llvm-svn: 279266
* [Hexagon] Add missing pattern for C4_cmplteKrzysztof Parzyszek2016-08-191-0/+2
| | | | llvm-svn: 279265
* [InstCombine] use m_APInt to allow icmp X, C folds for splat constant vectorsSanjay Patel2016-08-191-5/+10
| | | | | | | | | Of course, we really need to refactor and fix all of the cmp predicates, but this one is interesting because without it, we later perform an information-losing transform of icmp (shl 1, Y), C, and we can't recover the better fold. llvm-svn: 279263
* [LTO] Remove dead-code: collectUsedGlobalVariables has been moved to Thin ↵Mehdi Amini2016-08-191-3/+1
| | | | | | and LTO specifc path (NFC) llvm-svn: 279261
* [Hexagon] Make p0 an explicit operand in VA1_clr* subinstructions, NFCKrzysztof Parzyszek2016-08-192-10/+15
| | | | llvm-svn: 279255
* [Hexagon] Add explicit default constructor for HexagonSelectionDAGInfoKrzysztof Parzyszek2016-08-191-0/+2
| | | | llvm-svn: 279254
* [Hexagon] Allow tail-call optimization when mixing C and fast calling convKrzysztof Parzyszek2016-08-191-3/+9
| | | | | | Patch by Arnold Schwaighofer. llvm-svn: 279251
* [Hexagon] Check for empty live intervalKrzysztof Parzyszek2016-08-191-0/+2
| | | | | | Patch by Brendon Cahoon. llvm-svn: 279249
* [Hexagon] Consider zext/sext of a load to i32 to be freeKrzysztof Parzyszek2016-08-192-0/+27
| | | | llvm-svn: 279248
* Revert r279242 - it's failing the testsAnton Korobeynikov2016-08-191-191/+117
| | | | llvm-svn: 279247
* [Hexagon] Handle J2_jumptpt and J2_jumpfpt instructionsKrzysztof Parzyszek2016-08-193-2/+16
| | | | llvm-svn: 279246
* [Hexagon] Fix indentation, NFCKrzysztof Parzyszek2016-08-191-3/+3
| | | | llvm-svn: 279245
* [Hexagon] Remove unnecessary llvm::, NFCKrzysztof Parzyszek2016-08-191-1/+1
| | | | llvm-svn: 279244
* [Hexagon] Rename the HEXAGON_MC namespace to Hexagon_MC, NFCKrzysztof Parzyszek2016-08-193-4/+4
| | | | llvm-svn: 279243
* Fix PR27500: on MSP430 the branch destination offset is measured in words, ↵Anton Korobeynikov2016-08-191-117/+191
| | | | | | | | | | | | not bytes. In addition, the branch instructions will have proper BB destinations, not offsets, like before. Patch by Vadzim Dambrouski! Differential Revision: https://reviews.llvm.org/D20162 llvm-svn: 279242
* [Hexagon] Mark PS_jumpret as pseudo-instruction, expand it into J2_jumprKrzysztof Parzyszek2016-08-194-23/+28
| | | | llvm-svn: 279241
* [Hexagon] Improvements to handling and generation of FP instructionsKrzysztof Parzyszek2016-08-194-17/+106
| | | | | | | | | Improved handling of fma, floating point min/max, additional load/store instructions for floating point types. Patch by Jyotsna Verma. llvm-svn: 279239
* [LoopVectorize] Don't copy std::vector in for-range loop.Benjamin Kramer2016-08-191-1/+1
| | | | llvm-svn: 279233
* [PM] Revert r279227 and r279228 until I can find someone to help meChandler Carruth2016-08-191-9/+6
| | | | | | | | solve completely opaque MSVC build errors. It complains about lots of stuff with this change without givin nearly enough information to even try to fix. llvm-svn: 279231
* [X86][SSE] Add support for matching commuted insertps patternsSimon Pilgrim2016-08-191-45/+67
| | | | | | INSERTPS doesn't fit well with our shuffle mask canonicalization, so we need to attempt both the original mask and the commuted mask to more likely get a match llvm-svn: 279230
* [SimplifyCFG] Rewrite SinkThenElseCodeToEndJames Molloy2016-08-191-150/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | The new version has several advantages: 1) IMSHO it's more readable and neater 2) It handles loads and stores properly 3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch. With this change we can now finally sink load-modify-store idioms such as: if (a) return *b += 3; else return *b += 4; => %z = load i32, i32* %y %.sink = select i1 %a, i32 5, i32 7 %b = add i32 %z, %.sink store i32 %b, i32* %y ret i32 %b When this works for switches it'll be even more powerful. llvm-svn: 279229
* [PM] Make the the new pass manager support fully generic extra argumentsChandler Carruth2016-08-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to run methods, both for transform passes and analysis passes. This also allows the analysis manager to use a different set of extra arguments from the pass manager where useful. Consider passes over analysis produced units of IR like SCCs of the call graph or loops. Passes of this nature will often want to refer to the analysis result that was used to compute their IR units (the call graph or LoopInfo). And for transformations, they may want to communicate special update information to the outer pass manager. With this change, it becomes possible to have a run method for a loop pass that looks more like: PreservedAnalyses run(Loop &L, AnalysisManager<Loop, LoopInfo> &AM, LoopInfo &LI, LoopUpdateRecord &UR); And to query the analysis manager like: AM.getResult<MyLoopAnalysis>(L, LI); This makes accessing the known-available analyses convenient and clear, and it makes passing customized data structures around easy. My initial use case is going to be in updating the pass manager layers when the analysis units of IR change. But there are more use cases here such as having a layer that lets inner passes signal whether certain additional passes should be run because of particular simplifications made. Two desires for this have come up in the past: triggering additional optimization after successfully unrolling loops, and triggering additional inlining after collapsing indirect calls to direct calls. Despite adding this layer of generic extensibility, the *only* change to existing, simple usage are for places where we forward declare the AnalysisManager template. We really shouldn't be doing this because of the fragility exposed here, but currently it makes coping with the legacy PM code easier. Differential Revision: http://reviews.llvm.org/D21462 llvm-svn: 279227
* [CodeGen] Fix a trivial type conversion bug dating back to pre-2008James Molloy2016-08-191-1/+1
| | | | | | | | The heuristic above this code is incredibly suspect, but disregarding that it mutates the cast opcode so we need to check the *mutated* opcode later to see if we need to emit an AssertSext or AssertZext node. Fixes PR29041. llvm-svn: 279223
* [asan] Fix size of shadow incorrectly calculated in r279178Vitaly Buka2016-08-191-4/+2
| | | | | | | | | | | | Summary: r279178 generates 8 times more stores than necessary. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23708 llvm-svn: 279222
* [PM] Rework the new PM support for building the ModuleSummaryIndex toChandler Carruth2016-08-192-35/+32
| | | | | | | | | | | | | | | | | | | | | | directly produce the index as the value type result. This requires making the index movable which is straightforward. It greatly simplifies things by allowing us to completely avoid the builder API and the layers of abstraction inherent there. Instead both pass managers can directly construct these when run by value. They still won't be constructed truly eagerly thanks to the optional in the legacy PM. The code that directly builds the index can also just share a direct function. A notable change here is that the result type of the analysis for the new PM is no longer a reference type. This was really problematic when making changes to how we handle result types to make our interface requirements *much* more strict and precise. But I think this is an overall improvement. Differential Revision: https://reviews.llvm.org/D23701 llvm-svn: 279216
* [Profile] Fix edge count read bugXinliang David Li2016-08-191-2/+2
| | | | | | Use uint64_t to avoid value truncation before scaling. llvm-svn: 279213
* [LTO] Move callback member from base class to the derived where it is used (NFC)Mehdi Amini2016-08-191-12/+10
| | | | llvm-svn: 279212
* Constify some path in the bitcode writer (NFC)Mehdi Amini2016-08-191-6/+6
| | | | llvm-svn: 279211
* [LTO] Add a move to inialize member in ctor initialization list (NFC)Mehdi Amini2016-08-191-1/+1
| | | | llvm-svn: 279210
* [Profile] Simple code refactoring for reuse /NFCXinliang David Li2016-08-191-12/+16
| | | | llvm-svn: 279209
* [XRay] Synthesize a reference to the xray_instr_mapDean Michael Berris2016-08-191-0/+12
| | | | | | | | | | | | | | | | | | | | | Without the synthesized reference to a symbol in the xray_instr_map, linker section garbage collection will helpfully remove the whole xray_instr_map section from the final executable (or archive). This will cause the runtime to not be able to identify the sleds and hot-patch the calls/jumps into the runtime trampolines. This change adds a reference from the text section at the end of the function to keep around the associated xray_instr_map section as well. We also make sure that we catch this reference in the test. Reviewers: chandlerc, echristo, majnemer, mehdi_amini Subscribers: mehdi_amini, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D23398 llvm-svn: 279204
* Revert "RegScavenging: Add scavengeRegisterBackwards()"Matthias Braun2016-08-194-347/+165
| | | | | | | | | | | The ppc64 multistage bot fails on this. This reverts commit r279124. Also Revert "CodeGen: Add/Factor out LiveRegUnits class; NFCI" because it depends on the previous change This reverts commit r279171. llvm-svn: 279199
* [RuntimeDyld] Add support for ELF R_ARM_REL32 and R_ARM_GOT_PREL.Lang Hames2016-08-191-0/+16
| | | | | | | | | | | | | | | | Patch by William Dillon. Thanks William! This patch adds support for the R_ARM_REL32 and R_ARM_GOT_PREL ELF ARM relocations to RuntimeDyld, which should allow JITing of code that produces these relocations. No test case: Unfortunately RuntimeDyldELF's GOT building mechanism (which uses a separate section for GOT entries) isn't compatible with RuntimeDyldChecker. The correct fix for this is to fix RuntimeDyldELF's GOT support (it's fundamentally broken at the moment: separate sections aren't guaranteed to be in range of a GOT entry load), but that's a non-trivial job. llvm-svn: 279182
* [asan] Optimize store size in FunctionStackPoisoner::poisonRedZonesVitaly Buka2016-08-181-40/+55
| | | | | | | | | | | | Summary: Reduce store size to avoid leading and trailing zeros. Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23648 llvm-svn: 279178
* Include X86CallFrameOptimization in the opt-bisect process.Andrew Kaylor2016-08-181-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D23683 llvm-svn: 279175
* AArch64: remove extraneous paddingSaleem Abdulrasool2016-08-181-3/+3
| | | | | | | | | | The structs BarrierOp, PrefetchOp, PSBHintOp are in AArch64AsmParser.cpp (inside anonymous namespace). This diff changes the order of fields and removes the excessive padding (8 bytes). Patch by Alexander Shaposhnikov! llvm-svn: 279173
OpenPOWER on IntegriCloud