summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
Commit message (Collapse)AuthorAgeFilesLines
* Fix misapplied patch in r193597Anders Waldenborg2013-10-291-2/+2
| | | | | | Sorry Peter Zotov, entirely my fault. llvm-svn: 193598
* llvm-c: Make LLVM{Get,Set}Alignment work on {Load,Store}Inst tooAnders Waldenborg2013-10-291-4/+22
| | | | | | | | Patch by Peter Zotov Differential Revision: http://llvm-reviews.chandlerc.com/D1910 llvm-svn: 193597
* Revert r193251 : Use address-taken to disambiguate global variable and ↵Shuxin Yang2013-10-272-4/+0
| | | | | | indirect memops. llvm-svn: 193489
* llvm-cov dump to dbgs() instead of outs().Yuchen Wu2013-10-251-13/+14
| | | | llvm-svn: 193390
* Support for reading program counts in llvm-cov.Yuchen Wu2013-10-251-12/+17
| | | | | | | | | | | | | llvm-cov will now be able to read program counts from the GCDA file and output it in the same format as gcov. The program summary tag was identified from gcov-io.h as "\0\0\0\a3". There is currently a bug in GCOVProfiling.cpp which does not generate the run- or program-counting IR, so this change was tested manually by modifying the GCDA file and comparing the gcov and llvm-cov outputs. llvm-svn: 193389
* Fixed llvm-cov to count edges instead of blocks.Yuchen Wu2013-10-241-2/+11
| | | | | | | | | | | | | | | | | This was a fundamental flaw in llvm-cov where it treated the values in the GCDA files as block counts instead of edge counts. This created incorrect line counts when branching was present. Instead, the edge counts should be summed to obtain the correct block count. The fix was tested using custom test files as well as single source files from the test-suite directory. The behaviour can be verified by reading the GCOV documentation that describes the GCDA spec ("ARC_COUNTS gives the counter values for those arcs that are instrumented") and the header description provided by GCOVProfiling.cpp ("instruments the code that runs to records (sic) the edges between blocks that run and emit a complementary "gcda" file on exit"). llvm-svn: 193299
* Use a map instead of vector to store line counts.Yuchen Wu2013-10-231-22/+10
| | | | | | | | | | | | There are a few motivations for this: - Using a map allows for checking if line is in map. This differentiates unexecutable lines (such as comments) from unexecuted logical lines of code. "#####" is now outputted in this case, in line with gcov. - Source files are no longer read in twice: once when storing the line counts, and once when outputting the data. - Greatly simplifies the function FileInfo::addLineCount(). llvm-svn: 193264
* Use address-taken to disambiguate global variable and indirect memops.Shuxin Yang2013-10-232-0/+4
| | | | | | | | | | Major steps include: 1). introduces a not-addr-taken bit-field in GlobalVariable 2). GlobalOpt pass sets "not-address-taken" if it proves a global varirable dosen't have its address taken. 3). AA use this info for disambiguation. llvm-svn: 193251
* Test commit. Added whitespace in GCOV.cpp.Yuchen Wu2013-10-231-1/+1
| | | | llvm-svn: 193224
* llvm-cov: Use uint32_t for loop variables to be more consistent.Bob Wilson2013-10-221-2/+2
| | | | | | | | | The loop bounds here are uint32_t variables, so it makes sense for the loop variables to have the same type. Patch by Yuchen Wu! llvm-svn: 193192
* llvm-cov: fix a typo and rename a variable.Bob Wilson2013-10-221-4/+4
| | | | | | | | | Rename Size to EndPos, which makes more sense because the variable stores the last location of the blocks. Patch by Yuchen Wu! llvm-svn: 193189
* Fix llvm-cov counts to be 64-bit integers to avoid overflows.Bob Wilson2013-10-221-2/+2
| | | | | | | | | | Line counts in llvm-cov are read in as 64-bit integers but were being truncated to 32-bit in collectLineCounts(), which caused overflow for large counts. This patch fixes all counts to be uint64_t. Patch by Yuchen Wu! llvm-svn: 193172
* llvm-c: Add LLVMPrintTypeToStringAnders Waldenborg2013-10-221-0/+10
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1963 llvm-svn: 193149
* Change llvm-cov output formatting to be more similar to gcov.Bob Wilson2013-10-221-7/+9
| | | | | | | | | | | | - Replaced tabs with proper padding - print() takes two arguments, which are the GCNO and GCDA filenames - Files are listed at the top of output, appended by line 0 - Stripped strings of trailing \0s - Removed last two lines of whitespace in output Patch by Yuchen Wu! llvm-svn: 193148
* Move the printing of llvm-cov information out from collectLineCounts().Bob Wilson2013-10-221-1/+0
| | | | | | | | | | collectLineCounts() should only organize the output data. This is done in anticipation of subsequent changes which will pass in GCNO and GCDA filenames into the print function where it is printed similar to the gcov output. Patch by Yuchen Wu! llvm-svn: 193134
* Changing DebugInfoFinder to iterate over all the compile units.Michael Kuperstein2013-10-171-1421/+1419
| | | | | | | | Solves http://llvm.org/bugs/show_bug.cgi?id=17507 Committed on behalf of alon.mishne@intel.com llvm-svn: 192879
* 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
* [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
* 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
* Add support for metadata representing .ident directives.Rafael Espindola2013-10-161-0/+20
| | | | llvm-svn: 192764
* 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
* Clean up, formatting, comments. No functional change.Eric Christopher2013-10-151-100/+88
| | | | llvm-svn: 192747
* Remove x86_sse42_crc32_64_8 intrinsic. It has no functional difference from ↵Craig Topper2013-10-151-0/+7
| | | | | | x86_sse42_crc32_32_8 and was not mapped to a clang builtin. I'm not even sure why this form of the instruction is even called out explicitly in the docs. Also add AutoUpgrade support to convert it into the other intrinsic with appropriate trunc and zext. llvm-svn: 192672
* Debug Info: In DIBuilder, the context field of subprogram is updated to useManman Ren2013-10-102-5/+27
| | | | | | | | DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192378
* Debug Info: In DIBuilder, the context and type fields of template_type andManman Ren2013-10-092-8/+8
| | | | | | | | template_value are updated to use DIRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192320
* Debug Info: In DIBuilder, the context field of a forward decl is updatedManman Ren2013-10-091-1/+1
| | | | | | to use DIScopeRef. llvm-svn: 192309
* Add a GlobalAlias::isValidLinkage to reduce code duplication.Rafael Espindola2013-10-091-2/+1
| | | | | | Thanks to Reid Kleckner for the suggestion. llvm-svn: 192298
* Debug Info: In DIBuilder, the context field of a DICompositeType is updatedManman Ren2013-10-091-4/+4
| | | | | | | | to use DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192256
* Debug Info: In DIBuilder, the context fields of a static member and aManman Ren2013-10-081-2/+2
| | | | | | typedef are updated to use DIScopeRef. llvm-svn: 192254
* Debug Info: In DIBuilder, the derived-from field of DICompositeTypeManman Ren2013-10-081-5/+5
| | | | | | | | is updated to use DITypeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192251
* Debug Info: In DIBuilder, the derived-from field of DIDerivedTypeManman Ren2013-10-081-8/+8
| | | | | | | | is updated to use DITypeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192246
* Change objectsize intrinsic to accept different address spaces.Matt Arsenault2013-10-071-0/+22
| | | | | | | Bitcasting everything to i8* won't work. Autoupgrade the old intrinsic declarations to use the new mangling. llvm-svn: 192117
* Add support for aliases with linkonce_odr.Rafael Espindola2013-10-061-1/+1
| | | | | | This will be used to extend constructor aliases in clang. llvm-svn: 192066
* Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_typeManman Ren2013-10-052-61/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is updated to use DITypeRef. Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static helper functions in DwarfCompileUnit. We already have a static helper function "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to resolve the derived-from field. All three functions need to go across link for derived-from fields, so we need to get hold of a type identifier map. A pointer to DwarfDebug is also added to DbgVariable in order to resolve the derived-from field. Debug info verifier is updated to check a derived-from field is a TypeRef. Verifier will not go across link for derived-from fields, in debug info finder, we go across the link to add derived-from fields to types. Function getDICompositeType is only used by dragonegg and since dragonegg does not generate identifier for types, we use an empty map to resolve the derived-from field. When printing a derived-from field, we use DITypeRef::getName to either return the type identifier or getName of the DIType. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192018
* Temporarily revert r191792 as it is causing some LTO debug failuresEric Christopher2013-10-042-28/+61
| | | | | | | on platforms with relocations in debug info and also temporarily revert r191800 due to conflicts with the revert of r191792. llvm-svn: 191967
* Add v4f16 to supported value types.Pete Cooper2013-10-031-0/+2
| | | | | | This is useful for some ARM intrinsics such as VCVTN which does a <4 x float> <-> <4 x half> conversion. llvm-svn: 191870
* Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_typeManman Ren2013-10-012-61/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is updated to use DITypeRef. Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static helper functions in DwarfCompileUnit. We already have a static helper function "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to resolve the derived-from field. All three functions need to go across link for derived-from fields, so we need to get hold of a type identifier map. A pointer to DwarfDebug is also added to DbgVariable in order to resolve the derived-from field. Debug info verifier is updated to check a derived-from field is a TypeRef. Verifier will not go across link for derived-from fields, in debug info finder, we go across the link to add derived-from fields to types. Function getDICompositeType is only used by dragonegg and since dragonegg does not generate identifier for types, we use an empty map to resolve the derived-from field. When printing a derived-from field, we use DITypeRef::getName to either return the type identifier or getName of the DIType. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 191800
* Reuse variableMatt Arsenault2013-09-301-1/+1
| | | | llvm-svn: 191712
* Fix getOrInsertGlobal dropping the address space.Matt Arsenault2013-09-301-2/+4
| | | | | | | | Currently it will insert an illegal bitcast. Arguably, the address space argument should be added for the creation case. llvm-svn: 191702
* Debug Info: constify and rename from generateRef to getRef.Manman Ren2013-09-302-9/+9
| | | | | | No functionality change. llvm-svn: 191696
* Fix typoMatt Arsenault2013-09-281-1/+1
| | | | llvm-svn: 191595
* AutoUpgrade: upgrade from scalar TBAA format to struct-path aware TBAA format.Manman Ren2013-09-281-0/+27
| | | | | | | We treat TBAA tags as struct-path aware TBAA format when the first operand is a MDNode and the tag has 3 or more operands. llvm-svn: 191593
* Initial support for Neon scalar instructions.Jiangning Liu2013-09-242-1/+12
| | | | | | | | | | Patch by Ana Pazos. 1.Added support for v1ix and v1fx types. 2.Added Scalar Pairwise Reduce instructions. 3.Added initial implementation of Scalar Arithmetic instructions. llvm-svn: 191263
* Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."Andrew Trick2013-09-192-98/+74
| | | | | | | | Working on a better solution to this. This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2. llvm-svn: 190990
* Encapsulate PassManager debug flags to avoid static init and cxa_exit.Andrew Trick2013-09-182-74/+98
| | | | | | | | | | | | | | This puts all the global PassManager debugging flags, like -print-after-all and -time-passes, behind a managed static. This eliminates their static initializers and, more importantly, exit-time destructors. The only behavioral change I anticipate is that tools need to initialize the PassManager before parsing the command line in order to export these options, which makes sense. Tools that already initialize the standard passes (opt/llc) don't need to do anything new. llvm-svn: 190974
* whitespaceAndrew Trick2013-09-182-22/+22
| | | | llvm-svn: 190973
* MemCpyOptimizer: Use max legal int size instead of pointer sizeMatt Arsenault2013-09-161-0/+7
| | | | | | | | | | | | If there are no legal integers, assume 1 byte. This makes more sense than using the pointer size as a guess for the maximum GPR width. It is conceivable to want to use some 64-bit pointers on a target where 64-bit integers aren't legal. llvm-svn: 190817
* Implement function prefix data as an IR feature.Peter Collingbourne2013-09-164-0/+48
| | | | | | | | | Previous discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html Differential Revision: http://llvm-reviews.chandlerc.com/D1191 llvm-svn: 190773
* Debug Info: move class definition of DIRef.Manman Ren2013-09-111-4/+0
| | | | | | | | | | | Definition of DIRef used to require the full definition of DIType because of usage of DIType::isType in DIRef::resolve. We now use DIDescriptor::isType instead to remove the requirement and move definition of DIRef before DIType. With this, we can move the definition of DIType::getContext to the header file. llvm-svn: 190540
* Revert "Give internal classes hidden visibility."Benjamin Kramer2013-09-115-29/+29
| | | | | | | It works with clang, but GCC has different rules so we can't make all of those hidden. This reverts commit r190534. llvm-svn: 190536
OpenPOWER on IntegriCloud