summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Expose install_fatal_error_handler() through the C API.Filip Pizlo2013-10-171-0/+17
| | | | | | | | | | | | | | | | | I expose the API with some caveats: - The C++ API involves a traditional void* opaque pointer for the fatal error callback. The C API doesn’t do this. I don’t think that the void* opaque pointer makes any sense since this is a global callback - there will only be one of them. So if you need to pass some data to your callback, just put it in a global variable. - The bindings will ignore the gen_crash_diag boolean. I ignore it because (1) I don’t know what it does, (2) it’s not documented AFAIK, and (3) I couldn’t imagine any use for it. I made the gut call that it probably wasn’t important enough to expose through the C API. llvm-svn: 192864
* [projects/test-suite] White space and long line fixes.Jack Carter2013-10-171-15/+21
| | | | | | No functionality changes. llvm-svn: 192863
* Add the subprogram DIEs to the context they're created with onlyEric Christopher2013-10-171-3/+6
| | | | | | | if they're a declaration, otherwise they're owned by the compile unit. llvm-svn: 192861
* Re-commit r192758 - MC: quote tricky symbol names in asm outputHans Wennborg2013-10-175-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | The reason this got reverted was that the @feat.00 symbol which was emitted for every TU became quoted, and on cygwin/mingw we use the gas assembler which couldn't handle the quotes. This commit fixes the problem by only emitting @feat.00 for win32, where we use clang -cc1as to assemble. gas would just drop this symbol anyway, so there is no loss there. With @feat.00 gone, there shouldn't be quoted symbols showing up on cygwin since it uses the Itanium ABI, which doesn't put these funny characters in symbols. > Because of win32 mangling, we produce symbol and section names with > funny characters in them, most notably @ characters. > > MC would choke on trying to parse its own assembly output. This patch addresses > that by: > > - Making @ trigger quoting of symbol names > - Also quote section names in the same way > - Just parse section names like other identifiers (to allow for quotes) > - Don't assume @ signifies a symbol variant if it is in a string. llvm-svn: 192859
* DIEHash: Include the type's context in the type hash.David Blaikie2013-10-171-0/+3
| | | | llvm-svn: 192856
* DIEHash: Use DW_FORM_sdata for integers, per spec.David Blaikie2013-10-162-5/+28
| | | | | | | This allows us to produce the same hash as GCC for at least some simple examples. llvm-svn: 192855
* llvm-c: Add LLVMDumpTypeAnders Waldenborg2013-10-161-0/+4
| | | | | | | | | | The C API currently allows to dump values (LLVMDumpValue), but a similar method for types was not exported. Patch by Peter Zotov Differential Revision: http://llvm-reviews.chandlerc.com/D1911 llvm-svn: 192852
* [AArch64] Add support for NEON scalar negate instruction.Chad Rosier2013-10-161-0/+4
| | | | llvm-svn: 192843
* [AArch64] Add support for NEON scalar absolute value instruction.Chad Rosier2013-10-161-8/+21
| | | | llvm-svn: 192842
* Remove ambiguity introduced in r192836David Blaikie2013-10-161-1/+1
| | | | llvm-svn: 192840
* Add support for the VSX target attribute. No functional changeEric Christopher2013-10-162-0/+3
| | | | | | as we don't actually use it to emit any code yet. llvm-svn: 192837
* DIEHash: Include the trailing zero byte after the children of a DIEDavid Blaikie2013-10-161-0/+3
| | | | llvm-svn: 192836
* Enabling 3DNow! prefetch instruction for a few AMD processors: bobcat, jaguar,Yunzhong Gao2013-10-162-7/+7
| | | | | | | | | bulldozer and piledriver. Support for the instruction itself seems to have already been added in r178040. Differential Revision: http://llvm-reviews.chandlerc.com/D1933 llvm-svn: 192828
* Create an atom with just the data that failed to disassemble.Rafael Espindola2013-10-161-2/+4
| | | | | | Patch by Stephen Checkoway. llvm-svn: 192827
* After PostRA scheduling, don't set kill flags on undef operands.Andrew Trick2013-10-161-2/+2
| | | | | | This should fix the ATOM buildbot failing on break-avx-dep.ll. llvm-svn: 192824
* Fix MCDataAtom never calling remap when adding data.Rafael Espindola2013-10-161-1/+1
| | | | | | | | | | | | | | | | This patch fixes a small mistake in MCDataAtom::addData() where it doesn't ever call remap(): - if (Data.size() > Begin - End - 1) + if (Data.size() > End + 1 - Begin) remap(Begin, End + 1); This is currently not visible because of another bug is the disassembler, so the patch includes a unit test. Patch by Stephen Checkoway. llvm-svn: 192823
* [llvm-c] Add LLVMPrintModuleToString.Anders Waldenborg2013-10-161-0/+10
| | | | | | | | | Like LLVMDumpModule but returns the string (that needs to be freed with LLVMDisposeMessage) instead of printing it to stderr. Differential Revision: http://llvm-reviews.chandlerc.com/D1941 llvm-svn: 192821
* SLPVectorizer: Don't vectorize volatile memory operationsArnold Schwaighofer2013-10-161-3/+8
| | | | | | | | | | radar://15231682 Reapply r192799, http://lab.llvm.org:8011/builders/lldb-x86_64-debian-clang/builds/8226 showed that the bot is still broken even with this out. llvm-svn: 192820
* Revert "SLPVectorizer: Don't vectorize volatile memory operations"Arnold Schwaighofer2013-10-161-8/+3
| | | | | | This speculatively reverts commit 192799. It might have broken a linux buildbot. llvm-svn: 192816
* R600: Fix a crash in the AMDILCFGStructurizerTom Stellard2013-10-161-2/+68
| | | | | | | | | | We were calling llvm_unreachable() when failing to optimize the branch into if case. However, it is still possible for us to structurize the CFG by duplicating blocks even if this optimization fails. Reviewed-by: Vincent Lejeune<vljn at ovi.com> llvm-svn: 192813
* R600: Remove some dead code from the AMDILCFGStructurizerTom Stellard2013-10-161-21/+4
| | | | | Reviewed-by: Vincent Lejeune<vljn at ovi.com> llvm-svn: 192812
* Adding oprofile support for MCJIT.Andrew Kaylor2013-10-162-1/+72
| | | | | | Patch by Dmitry Stogov llvm-svn: 192809
* Fix comment.Chad Rosier2013-10-161-1/+1
| | | | llvm-svn: 192805
* Assert on duplicate registration. Don't depend on function pointer equality.Rafael Espindola2013-10-161-3/+0
| | | | | | | | | | | | | | | | | | | | Before this patch we would assert when building llvm as multiple shared libraries (cmake's BUILD_SHARED_LIBS). The problem was the line if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer) which returns false because of -fvisibility-inlines-hidden. It is easy to fix just this one case, but I decided to try to also make the registration more strict. It looks like the old logic for ignoring followup registration was just a temporary hack that outlived its usefulness. This patch converts the ifs to asserts, fixes the few cases that were registering twice and makes sure all the asserts compare with null. Thanks for Joerg for reporting the problem and reviewing the patch. llvm-svn: 192803
* [AArch64] Add support for NEON scalar signed saturating accumulated of unsignedChad Rosier2013-10-161-2/+52
| | | | | | value and unsigned saturating accumulate of signed value instructions. llvm-svn: 192800
* SLPVectorizer: Don't vectorize volatile memory operationsArnold Schwaighofer2013-10-161-3/+8
| | | | | | radar://15231682 llvm-svn: 192799
* DAGCombiner: Don't fold xor into not if getNOT would introduce an illegal ↵Benjamin Kramer2013-10-161-1/+1
| | | | | | | | | | | constant. This happens e.g. with <2 x i64> -1 on x86_32. It cannot be generated directly because i64 is illegal. It would be nice if getNOT would handle this transparently, but I don't see a way to generate a legal constant there right now. Fixes PR17487. llvm-svn: 192795
* [asan] Optimize accesses to global arrays with constant indexKostya Serebryany2013-10-161-6/+33
| | | | | | | | | | | | | | | | | | | | Summary: Given a global array G[N], which is declared in this CU and has static initializer avoid instrumenting accesses like G[i], where 'i' is a constant and 0<=i<N. Also add a bit of stats. This eliminates ~1% of instrumentations on SPEC2006 and also partially helps when asan is being run together with coverage. Reviewers: samsonov Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1947 llvm-svn: 192794
* [SystemZ] Handle extensions in RxSBG optimizationsRichard Sandiford2013-10-161-8/+26
| | | | | | | The input to an RxSBG operation can be narrower as long as the upper bits are don't care. This fixes a FIXME added in r192783. llvm-svn: 192790
* [SystemZ] Improve handling of SETCCRichard Sandiford2013-10-165-4/+120
| | | | | | | | We previously used the default expansion to SELECT_CC, which in turn would expand to "LHI; BRC; LHI". In most cases it's better to use an IPM-based sequence instead. llvm-svn: 192784
* Handle (shl (anyext (shr ...))) in SimpilfyDemandedBitsRichard Sandiford2013-10-161-0/+25
| | | | | | | | | | This is really an extension of the current (shl (shr ...)) -> shl optimization. The main difference is that certain upper bits must also not be demanded. The motivating examples are the first two in the testcase, which occur in llvmpipe output. llvm-svn: 192783
* Add a 'deleteModule' method to the Linker class.Bill Wendling2013-10-162-1/+9
| | | | | | | | This deletes the Module ivar instead of having the LTO code generater do it. It also sets the pointer to 'NULL', so that if it's used again it will abort quickly. llvm-svn: 192778
* Revert r192758 (and r192759), "MC: Better handling of tricky symbol and ↵NAKAMURA Takumi2013-10-164-38/+20
| | | | | | | | | | | | | | | section names" GNU AS didn't like quotes in symbol names. Error: junk at end of line, first unrecognized character is `"' .def "@feat.00"; "@feat.00" = 1 Reproduced on Cygwin's 2.23.52.20130309 and mingw32's 2.20.1.20100303. llvm-svn: 192775
* Really fix build warning/error that I think r192756 was trying to fix.Craig Topper2013-10-161-4/+4
| | | | llvm-svn: 192773
* TypeFinder: prefer iterative algorithm to keep stack usage low.Will Dietz2013-10-161-10/+18
| | | | | | | Introduce subtype_reverse_iterator to maintain the numbering assigned during the recursive type walk. llvm-svn: 192770
* Fix a bug in Windows resource file detection.Rui Ueyama2013-10-161-1/+1
| | | | | | The magic bytes should not include the trailing NUL byte. llvm-svn: 192769
* Add support for metadata representing .ident directives.Rafael Espindola2013-10-162-0/+38
| | | | llvm-svn: 192764
* Fix a pair of bugs in the emission of pubname tables:Eric Christopher2013-10-162-6/+16
| | | | | | | | | | | | | | | | 1) Make sure we emit static member variables by checking at the end of createGlobalVariableDIE rather than piecemeal in the function. (As a note, createGlobalVariableDIE needs rewriting.) 2) Make sure we use the definition rather than declaration DIE for two things: a) determining linkage for gnu pubnames, and b) as the address of the DIE for global variables. (As a note, createGlobalVariableDIE really needs rewriting.) Adjust the testcase to make sure we're checking the correct DIEs. llvm-svn: 192761
* Add a MCAsmInfoELF class and factor some code into it.Rafael Espindola2013-10-1622-32/+45
| | | | | | We had a MCAsmInfoCOFF, but no common class for all the ELF MCAsmInfos before. llvm-svn: 192760
* MC: Better handling of tricky symbol and section namesHans Wennborg2013-10-164-20/+38
| | | | | | | | | | | | | | | | | Because of win32 mangling, we produce symbol and section names with funny characters in them, most notably @ characters. MC would choke on trying to parse its own assembly output. This patch addresses that by: - Making @ trigger quoting of symbol names - Also quote section names in the same way - Just parse section names like other identifiers (to allow for quotes) - Don't assume @ signifies a symbol variant if it is in a string. Differential Revision: http://llvm-reviews.chandlerc.com/D1945 llvm-svn: 192758
* Move .ident handling to MCStreamer.Rafael Espindola2013-10-168-24/+44
| | | | | | | | No functionality change, but exposes the API so that codegen can use it too. Patch by Katya Romanova. llvm-svn: 192757
* Fixing build warning/errorAndrew Kaylor2013-10-161-2/+3
| | | | llvm-svn: 192756
* Simplify zero initialization of DIEAttrs variable.David Blaikie2013-10-161-2/+1
| | | | llvm-svn: 192755
* Adding padding to the .eh_frame section in RuntimeDyldAndrew Kaylor2013-10-161-1/+15
| | | | llvm-svn: 192754
* Adding support for deregistering EH frames with MCJIT.Andrew Kaylor2013-10-167-7/+113
| | | | | | Patch by Yaron Keren llvm-svn: 192753
* Fix typoMatt Arsenault2013-10-151-1/+1
| | | | llvm-svn: 192752
* Fix missing C++ mode thing in headerMatt Arsenault2013-10-151-1/+1
| | | | llvm-svn: 192751
* Enable MI Sched for x86.Andrew Trick2013-10-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the SelectionDAG scheduling preference to source order. Soon, the SelectionDAG scheduler can be bypassed saving a nice chunk of compile time. Performance differences that result from this change are often a consequence of register coalescing. The register coalescer is far from perfect. Bugs can be filed for deficiencies. On x86 SandyBridge/Haswell, the source order schedule is often preserved, particularly for small blocks. Register pressure is generally improved over the SD scheduler's ILP mode. However, we are still able to handle large blocks that require latency hiding, unlike the SD scheduler's BURR mode. MI scheduler also attempts to discover the critical path in single-block loops and adjust heuristics accordingly. The MI scheduler relies on the new machine model. This is currently unimplemented for AVX, so we may not be generating the best code yet. Unit tests are updated so they don't depend on SD scheduling heuristics. llvm-svn: 192750
* Make sure we're not attempting to construct a subprogram DIEEric Christopher2013-10-151-16/+18
| | | | | | | | twice and just look up the value. Fix the one case where we were trying to create a subprogram DIE and we should already have had one. Reflow formatting in collectDeadVariables while fixing. llvm-svn: 192749
* Add an assert that we have a scope that matters for methodsEric Christopher2013-10-151-1/+4
| | | | | | | and remove a call to getNonCompileUnitScope as a method shouldn't be in the compile unit scope. llvm-svn: 192748
OpenPOWER on IntegriCloud