summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] s/FunctionName/LinkageName/ for codeview dumpingReid Kleckner2015-12-152-25/+25
| | | | | | | The symbol being printed in this field comes from the main symbol table, not 0xF1 subsection. Use LinkageName to make that a lot clearer. llvm-svn: 255596
* Let operator/ with uint32_t rhs operand be a member of BranchProbability and ↵Cong Hou2015-12-151-6/+13
| | | | | | add a new operator /=. NFC. llvm-svn: 255595
* Add a C++11 ThreadPool implementation in LLVMMehdi Amini2015-12-156-0/+356
| | | | | | | | | | | | | | | | | | | | | | | | | This is a very simple implementation of a thread pool using C++11 thread. It accepts any std::function<void()> for asynchronous execution. Individual task can be synchronize using the returned future, or the client can block on the full queue completion. In case LLVM is configured with Threading disabled, it falls back to sequential execution using std::async with launch:deferred. This is intended to support parallelism for ThinLTO processing in linker plugin, but is generic enough for any other uses. This is a recommit of r255444 ; trying to workaround a bug in the MSVC 2013 standard library. I think I was hit by: http://connect.microsoft.com/VisualStudio/feedbackdetail/view/791185/std-packaged-task-t-where-t-is-void-or-a-reference-class-are-not-movable Recommit of r255589, trying to please g++ as well. Differential Revision: http://reviews.llvm.org/D15464 From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8> llvm-svn: 255593
* Revert "Add a C++11 ThreadPool implementation in LLVM"Mehdi Amini2015-12-156-354/+0
| | | | | | | This reverts commit r255589. Breaks g++ From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255591
* Add a C++11 ThreadPool implementation in LLVMMehdi Amini2015-12-156-0/+354
| | | | | | | | | | | | | | | | | | | | | | | This is a very simple implementation of a thread pool using C++11 thread. It accepts any std::function<void()> for asynchronous execution. Individual task can be synchronize using the returned future, or the client can block on the full queue completion. In case LLVM is configured with Threading disabled, it falls back to sequential execution using std::async with launch:deferred. This is intended to support parallelism for ThinLTO processing in linker plugin, but is generic enough for any other uses. This is a recommit of r255444 ; trying to workaround a bug in the MSVC 2013 standard library. I think I was hit by: http://connect.microsoft.com/VisualStudio/feedbackdetail/view/791185/std-packaged-task-t-where-t-is-void-or-a-reference-class-are-not-movable Differential Revision: http://reviews.llvm.org/D15464 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255589
* [PGO] make profile prefix even shorter and more readableXinliang David Li2015-12-1515-96/+96
| | | | llvm-svn: 255586
* [X86] Add relaxtion logic for SBB instructions.Quentin Colombet2015-12-152-0/+24
| | | | | | | | | Prior to this patch, we would wrongly stick to the variant with imm8 encoding even when the relocation could not fit that size. rdar://problem/23785506 llvm-svn: 255583
* sancov: coverage can be reported by multiple functions.Mike Aizatsky2015-12-141-10/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D15430 llvm-svn: 255582
* Yet another missing include.Rafael Espindola2015-12-141-0/+1
| | | | llvm-svn: 255579
* A better attempt to add a missing includeRafael Espindola2015-12-142-1/+1
| | | | llvm-svn: 255578
* Trying to fix the build in a bot.Rafael Espindola2015-12-141-0/+1
| | | | llvm-svn: 255577
* [PGO] Shorten profile symbol prefixesXinliang David Li2015-12-1415-97/+95
| | | | | | | | | Profile symbols have long prefixes which waste space and creating pressure for linker. This patch shortens the prefixes to minimal length without losing verbosity. Differential Revision: http://reviews.llvm.org/D15503 llvm-svn: 255575
* LoopRotate: Convert the methods of LoopRotate to utility functions. NFCJustin Bogner2015-12-141-79/+82
| | | | | | | | | | This moves the actual work to do loop rotation into standalone functions with the analysis results they need passed in as arguments, leaving the class itself as a relatively simple shim. This will make the functions easy to reuse when we're ready to port this transformation to the new pass manager. llvm-svn: 255574
* LoopRotate: Reorder some method implementations. NFCJustin Bogner2015-12-141-159/+159
| | | | | | | | | | This just moves some callers after their callees. My next patch will convert some of these methods to stand alone functions, and that diff is more obviously NFC if I move these first. That change, in turn, will make it much easier to port this pass to the new pass manager once the loop pass manager is in place. llvm-svn: 255573
* Use diagnostic handler in the LLVMContextRafael Espindola2015-12-1418-192/+158
| | | | | | | | | | | | | | | | This patch converts code that has access to a LLVMContext to not take a diagnostic handler. This has a few advantages * It is easier to use a consistent diagnostic handler in a single program. * Less clutter since we are not passing a handler around. It does make it a bit awkward to implement some C APIs that return a diagnostic string. I will propose new versions of these APIs and deprecate the current ones. llvm-svn: 255571
* [X86] Add relaxtion logic for ADC instructions.Quentin Colombet2015-12-142-0/+24
| | | | | | | | | Prior to this patch, we would wrongly stick to the variant with imm8 encoding even when the relocation could not fit that size. rdar://problem/23785506 llvm-svn: 255570
* Factor out some duplication. NFC.Pete Cooper2015-12-141-44/+20
| | | | llvm-svn: 255569
* [WebAssembly] Add type prefixes to call instructionsDan Gohman2015-12-147-28/+28
| | | | | | | | | Add return type information to call and call_indirect instructions. This allows them to be disambiguated without knowledge of the callee. Differential Revision: http://reviews.llvm.org/D15484 llvm-svn: 255565
* [WebAssembly] Implement a new algorithm for placing BLOCK markersDan Gohman2015-12-142-78/+766
| | | | | | | | | Implement a new BLOCK scope placement algorithm which better handles early-return blocks and early exists from nested scopes. Differential Revision: http://reviews.llvm.org/D15368 llvm-svn: 255564
* [WebAssembly] Avoid adding redundant EXPR_STACK uses.Dan Gohman2015-12-141-3/+4
| | | | llvm-svn: 255563
* Revert "Don't create unnecessary PHIs"Reid Kleckner2015-12-143-205/+4
| | | | | | | | | This reverts commit r255489. It causes test failures in Chromium and does not appear to respect the AlternativeV parameter. llvm-svn: 255562
* [X86] Part 2 to fix x86-64 fp128 calling convention.Chih-Hung Hsieh2015-12-1416-25/+1052
| | | | | | | | | | | | | | | | | | | | | | Part 1 was submitted in http://reviews.llvm.org/D15134. Changes in this part: * X86RegisterInfo.td, X86RecognizableInstr.cpp: Add FR128 register class. * X86CallingConv.td: Pass f128 values in XMM registers or on stack. * X86InstrCompiler.td, X86InstrInfo.td, X86InstrSSE.td: Add instruction selection patterns for f128. * X86ISelLowering.cpp: When target has MMX registers, configure MVT::f128 in FR128RegClass, with TypeSoftenFloat action, and custom actions for some opcodes. Add missed cases of MVT::f128 in places that handle f32, f64, or vector types. Add TODO comment to support f128 type in inline assembly code. * SelectionDAGBuilder.cpp: Fix infinite loop when f128 type can have VT == TLI.getTypeToTransformTo(Ctx, VT). * Add unit tests for x86-64 fp128 type. Differential Revision: http://reviews.llvm.org/D11438 llvm-svn: 255558
* add fast-math-flags to 'call' instructions (PR21290)Sanjay Patel2015-12-1414-45/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds optional fast-math-flags (the same that apply to fmul/fadd/fsub/fdiv/frem/fcmp) to call instructions in IR. Follow-up patches would use these flags in LibCallSimplifier, add support to clang, and extend FMF to the DAG for calls. Motivating example: %y = fmul fast float %x, %x %z = tail call float @sqrtf(float %y) We'd like to be able to optimize sqrt(x*x) into fabs(x). We do this today using a function-wide attribute for unsafe-math, but we really want to trigger on the instructions themselves: %z = tail call fast float @sqrtf(float %y) because in an LTO build it's possible that calls with fast semantics have been inlined into a function with non-fast semantics. The code changes and tests are based on the recent commits that added "notail": http://reviews.llvm.org/rL252368 and added FMF to fcmp: http://reviews.llvm.org/rL241901 Differential Revision: http://reviews.llvm.org/D14707 llvm-svn: 255555
* Reordering fields to reduce padding in LLVM. NFCBen Craig2015-12-143-31/+35
| | | | llvm-svn: 255554
* [WebAssembly] Add an assert to sanity-check dead flags.Dan Gohman2015-12-141-0/+3
| | | | | | | The WebAssemblyStoreResults pass runs before LiveVariables, so it doesn't expect to have to keep dead flags up to date; check this with an assert. llvm-svn: 255551
* Start implementing FDE dumping when printing the eh_frame.Pete Cooper2015-12-142-6/+113
| | | | | | | | | | This code adds some simple decoding of the FDE's in an eh_frame. There's still more to be done in terms of error handling and verification. Also, we need to be able to decode the CFI's. llvm-svn: 255550
* Print the eh_frame section in MachoDump.Pete Cooper2015-12-143-1/+198
| | | | | | | | | | | | | | This is the start of work to dump the contents of the eh_frame section. It currently emits CIE entries. FDE entries will come later. It also needs improved error checking which will follow soon. http://reviews.llvm.org/D15502 Reviewed by Kevin Enderby and Lang Hames. llvm-svn: 255546
* [Hexagon] Add "const" to function parameters in HexagonInstrInfoKrzysztof Parzyszek2015-12-142-35/+37
| | | | llvm-svn: 255544
* Fix formatting. NFC.Diego Novillo2015-12-141-8/+5
| | | | llvm-svn: 255541
* [Packetizer] Add AliasAnalysis as a parameter to the packetizerKrzysztof Parzyszek2015-12-144-10/+18
| | | | | | | | This will make the depedence graph more accurate if an alias analysis is provided. If nullptr is specified in its place, the behavior will remain as it is currently. llvm-svn: 255540
* Add missing vtable anchor's.Pete Cooper2015-12-142-0/+12
| | | | | | | | | | | | | | The following description is from http://reviews.llvm.org/D15481: ICmpInst, GetElementPtrInst and PHINode have no anchor functions. This causes the vtable and the type info (if RTTI is enabled in user code) to be emitted in multiple translation units. Before 3.7, the destructors were the key functions for these nodes, but they have been removed. There have been discussions about this here: http://lists.llvm.org/pipermail/llvm-dev/2015-August/089010.html and here: http://lists.llvm.org/pipermail/llvm-dev/2015-December/092921.html. Patch by Visoiu Mistrih Francis llvm-svn: 255538
* [Packetizer] Make endPacket virtualKrzysztof Parzyszek2015-12-141-2/+4
| | | | | | | This will allow custom handling of packet finalization. The current definition of endPacket will still perform the default finalization. llvm-svn: 255537
* [ConstantFold] Fix bitcast to gep constant folding transform.David Majnemer2015-12-143-1/+22
| | | | | | | | | | | | Make sure to check that the destination type is sized. A check was present but was incorrectly checking the source type instead. Patch by Amaury SECHET! Differential Revision: http://reviews.llvm.org/D15264 llvm-svn: 255536
* Save several std::string constructions using llvm::Twine.Yaron Keren2015-12-141-9/+6
| | | | llvm-svn: 255535
* docs: Correct wording in LangRef relating to available_externally linkage.Peter Collingbourne2015-12-141-8/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D15343 llvm-svn: 255534
* Remove the successor probabilities normalization in tail duplication pass.Cong Hou2015-12-141-1/+0
| | | | | | | | | | | | The normalization may cause assertion failures on SystemZ and some out-of-tree tests. The root cause is that unknown probabilities are materialized into known ones by calling getSuccProbability(), which is then used to add another successor to the same MBB which results in mixed known and unknown probabilities. But currently those mixed probabilities cannot be normalized. I will compose another patch to fix the root issue. llvm-svn: 255530
* [MergeFunctions] Use II instead of CI for InvokeInst; NFCSanjoy Das2015-12-142-5/+35
| | | | | | Using `CI` is slightly misleading. llvm-svn: 255529
* Teach MergeFunctions about operand bundlesSanjoy Das2015-12-142-0/+65
| | | | llvm-svn: 255528
* Teach haveSameSpecialState about operand bundlesSanjoy Das2015-12-143-3/+41
| | | | llvm-svn: 255527
* Add "const" to function arguments in DFAPacketizerKrzysztof Parzyszek2015-12-143-13/+13
| | | | llvm-svn: 255526
* [PGO] Value profiling text format reader/writer supportXinliang David Li2015-12-148-1/+284
| | | | | | | | | This patch adds the missing functionality in parsable text format support for value profiling. Differential Revision: http://reviews.llvm.org/D15212 llvm-svn: 255523
* [IR] Remove terminatepadDavid Majnemer2015-12-1441-771/+110
| | | | | | | | | | | | | It turns out that terminatepad gives little benefit over a cleanuppad which calls the termination function. This is not sufficient to implement fully generic filters but MSVC doesn't support them which makes terminatepad a little over-designed. Depends on D15478. Differential Revision: http://reviews.llvm.org/D15479 llvm-svn: 255522
* FastISel needs to remove dead code when it bails out.Paul Robinson2015-12-143-2/+182
| | | | | | | | | | | | | | | When FastISel fails to translate an instruction it hands off code generation to SelectionDAG. Before it does so, it may have generated local value instructions to feed phi nodes in successor blocks. These instructions will then be generated again by SelectionDAG, causing duplication and less efficient code, including extra spill instructions. Patch by Wolfgang Pieb! Differential Revision: http://reviews.llvm.org/D11768 llvm-svn: 255520
* [Power PC] llvm soft float support for ppc32Petar Jovanovic2015-12-147-8/+82
| | | | | | | | | | | This is the second in a set of patches for soft float support for ppc32, it enables soft float operations. Patch by Strahinja Petrovic. Differential Revision: http://reviews.llvm.org/D13700 llvm-svn: 255516
* AMDGPU: Use generic bitreverse intrinsicMatt Arsenault2015-12-148-37/+143
| | | | | | Also fix bug in vector legalization for bitreverse. llvm-svn: 255512
* getParent() ^ 3 == getModule() ; NFCISanjay Patel2015-12-1416-40/+28
| | | | llvm-svn: 255511
* Remove dead function AArch64TargetLowering::getFunctionAlignment. NFC.Geoff Berry2015-12-142-8/+0
| | | | | | | | | | Reviewers: t.p.northover, jmolloy, mcrosier Subscribers: aemerson, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D15458 llvm-svn: 255509
* AMDGPU: Fix splitting vector loads with existing offsetsMatt Arsenault2015-12-142-9/+122
| | | | | | | If the original MMO had an offset, it was dropped. Also use the correct alignment after adding the new offset. llvm-svn: 255508
* [InstCombine] fold trunc ([lshr] (bitcast vector) ) --> extractelement (PR25543)Sanjay Patel2015-12-142-66/+54
| | | | | | | | | | | | | | | | | | | | | | | This is a fix for PR25543: https://llvm.org/bugs/show_bug.cgi?id=25543 The idea is to take the existing fold of: bitcast ( trunc ( lshr ( bitcast X))) --> extractelement (bitcast X) ( http://reviews.llvm.org/rL112232 ) And break it into less specific transforms so we'll catch more cases such as the example in the bug report: bitcast ( trunc ( lshr ( bitcast X))) --> bitcast ( extractelement (bitcast X)) --> extractelement (bitcast X) Enabling patches for this change: http://reviews.llvm.org/rL255399 (combine bitcasts) http://reviews.llvm.org/rL255433 (canonicalize extractelement(bitcast X)) Differential Revision: http://reviews.llvm.org/D15392 llvm-svn: 255504
* [Hexagon] Subtarget features/default CPU correctionsKrzysztof Parzyszek2015-12-146-15/+22
| | | | llvm-svn: 255501
OpenPOWER on IntegriCloud