summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
...
* Ensure bitcode encoding of calling conventions stays stable. Patch by Boaz ↵Michael Kuperstein2013-12-222-0/+150
| | | | | | Ouriel. llvm-svn: 197873
* Begin adding docs and IR-level support for the inalloca attributeReid Kleckner2013-12-191-0/+5
| | | | | | | | | | | | | | | | | | | The inalloca attribute is designed to support passing C++ objects by value in the Microsoft C++ ABI. It behaves the same as byval, except that it always implies that the argument is in memory and that the bytes are never copied. This attribute allows the caller to take the address of an outgoing argument's memory and execute arbitrary code to store into it. This patch adds basic IR support, docs, and verification. It does not attempt to implement any lowering or fix any possibly broken transforms. When this patch lands, a complete description of this feature should appear at http://llvm.org/docs/InAlloca.html . Differential Revision: http://llvm-reviews.chandlerc.com/D2173 llvm-svn: 197645
* Ensure bitcode encoding of global variable attributes stays stable. Patch by ↵Michael Kuperstein2013-12-152-0/+41
| | | | | | Boaz Ouriel. llvm-svn: 197340
* Fixed CRLFMichael Kuperstein2013-12-081-23/+23
| | | | llvm-svn: 196719
* Ensure bitcode encoding of visibility styles stays stable. Patch by Boaz Ouriel.Michael Kuperstein2013-12-082-0/+23
| | | | llvm-svn: 196718
* Debug Info: drop debug info via upgrading path if version number does not match.Manman Ren2013-12-021-0/+26
| | | | | | | | | | | | | | Add a helper function getDebugInfoVersionFromModule to return the debug info version number for a module. "Verifier/module-flags-1.ll" checks for verification errors. It will seg fault when calling getDebugInfoVersionFromModule because of the incorrect format for module flags in the testing case. We make getModuleFlagsMetadata more robust by checking for error conditions. PR17982 llvm-svn: 196158
* Ensure bitcode encoding of linkage types stays stable. Patch by Boaz OurielMichael Kuperstein2013-12-012-0/+128
| | | | llvm-svn: 196042
* The 'optnone' attribute means don't inline anything into this functionPaul Robinson2013-11-181-2/+2
| | | | | | | | | | (except functions marked always_inline). Functions with 'optnone' must also have 'noinline' so they don't get inlined into any other function. Based on work by Andrea Di Biagio. llvm-svn: 195046
* Change BitcodeReader to use error_code instead of bool + string.Rafael Espindola2013-11-042-2/+2
| | | | | | | | In order to create an ObjectFile implementation that uses bitcode files, we need to propagate the bitcode errors to the ObjectFile interface, so we need to convert it to use the same error handling as ObjectFile: error_code. llvm-svn: 193996
* Use a larger invalid attribute bitcode numberReid Kleckner2013-10-311-0/+0
| | | | | | | | That way the test won't start faililng when someone adds a new attribute and wants to use the next logical enum (38) for bitcode. The new bitcode file tries to use the number 48 as an attribute instead. llvm-svn: 193787
* llvm/test/Bitcode/invalid.ll: Tweak expresion to mach "llvm-dis.EXE:"NAKAMURA Takumi2013-10-311-1/+1
| | | | llvm-svn: 193738
* Fix a use after free on invalid input.Rafael Espindola2013-10-312-0/+7
| | | | llvm-svn: 193737
* AutoUpgrade: upgrade from scalar TBAA format to struct-path aware TBAA format.Manman Ren2013-09-281-0/+23
| | | | | | | 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
* Patch provide by Tom Roeder!Joe Abbey2013-09-121-0/+9
| | | | | | | | | | | Reviewed by Joe Abbey and Tobias Grosser Here is a patch that fixes decoding of CE_SELECT in BitcodeReader, along with a simple test case. The problem in the current code is that it generates but doesn't accept bitcode that uses vectors for the first element of a select in this context. llvm-svn: 190634
* Revert patches to add case-range support for PR1255.Bob Wilson2013-09-093-33/+67
| | | | | | | | | | | | | | | | | The work on this project was left in an unfinished and inconsistent state. Hopefully someone will eventually get a chance to implement this feature, but in the meantime, it is better to put things back the way the were. I have left support in the bitcode reader to handle the case-range bitcode format, so that we do not lose bitcode compatibility with the llvm 3.3 release. This reverts the following commits: 155464, 156374, 156377, 156613, 156704, 156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575, 157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884, 157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100, 159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659, 159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736 llvm-svn: 190328
* Add function attribute 'optnone'.Andrea Di Biagio2013-08-231-2/+10
| | | | | | | | This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. llvm-svn: 189101
* Use -disable-output and to suppress output and don't use a temporary file ↵Bill Wendling2013-08-205-7/+5
| | | | | | unless we need one. llvm-svn: 188843
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-1/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* Make .bc en/decoding of AttrKind stableTobias Grosser2013-07-262-0/+236
| | | | | | | | | | | | | | | The bitcode representation attribute kinds are encoded into / decoded from should be independent of the current set of LLVM attributes and their position in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode values. With this patch applied, LLVM does not silently misread attributes written by LLVM 3.3. We also enhance the decoding slightly such that an error message is printed if an unknown AttrKind encoding was dected. Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds do not need to be kept to support the Bitcode reader. llvm-svn: 187186
* Add some uncovered attribute testsTobias Grosser2013-07-171-0/+31
| | | | llvm-svn: 186538
* Unify clang/llvm attributes for asan/tsan/msan (LLVM part)Kostya Serebryany2013-02-261-6/+6
| | | | | | | | | | | | | | | | | | | These are two related changes (one in llvm, one in clang). LLVM: - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode) - rename thread_safety => sanitize_thread - rename no_uninitialized_checks -> sanitize_memory CLANG: - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis)) - add __attribute__((no_sanitize_thread)) - add __attribute__((no_sanitize_memory)) for S in address thread memory If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not set llvm attribute sanitize_S llvm-svn: 176075
* Modify the LLVM assembly output so that it uses references to represent ↵Bill Wendling2013-02-203-27/+33
| | | | | | | | | | | function attributes. This makes the LLVM assembly look better. E.g.: define void @foo() #0 { ret void } attributes #0 = { nounwind noinline ssp } llvm-svn: 175605
* Test for string attributes and for attribute group output.Bill Wendling2013-02-121-0/+28
| | | | llvm-svn: 174954
* [tsan/msan] adding thread_safety and uninitialized_checks attributesKostya Serebryany2013-02-111-0/+10
| | | | llvm-svn: 174864
* Change encoding of instruction operands in bitcode binaries to be relativeJan Wen Voung2012-10-111-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | to the instruction position. The old encoding would give an absolute ID which counts up within a function, and only resets at the next function. I.e., Instead of having: ... = icmp eq i32 n-1, n-2 br i1 ..., label %bb1, label %bb2 it will now be roughly: ... = icmp eq i32 1, 2 br i1 1, label %bb1, label %bb2 This makes it so that ids remain relatively small and can be encoded in fewer bits. With this encoding, forward reference operands will be given negative-valued IDs. Use signed VBRs for the most common case of forward references, which is phi instructions. To retain backward compatibility we bump the bitcode version from 0 to 1 to distinguish between the different encodings. llvm-svn: 165739
* BitcodeReader: Correctly insert blockaddress constant referring to a already ↵Benjamin Kramer2012-09-211-0/+15
| | | | | | | | | | | | parsed function. We inserted a placeholder that was never replaced because the function was already visited. Assert that all placeholders have been resolved when tearing down the bitcode reader. Fixes PR13895. llvm-svn: 164369
* More replacing of target-dependent intrinsics with target-indepdent Joel Jones2012-07-181-1/+10
| | | | | | | | | | | | | | | | | | | | | intrinsics. The second instruction(s) to be handled are the vector versions of count set bits (ctpop). The changes here are to clang so that it generates a target independent vector ctpop when it sees an ARM dependent vector bits set count. The changes in llvm are to match the target independent vector ctpop and in VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM dependent vector pop counts with target-independent ctpops. There are also changes to an existing test case in llvm for ARM vector count instructions and to a test for the bitcode upgrade. <rdar://problem/11892519> There is deliberately no test for the change to clang, as so far as I know, no consensus has been reached regarding how to test neon instructions in clang; q.v. <rdar://problem/8762292> llvm-svn: 160410
* This is one of the first steps at moving to replace target-dependent Joel Jones2012-07-131-0/+12
| | | | | | | | | | | | | | | | | | | | intrinsics with target-indepdent intrinsics. The first instruction(s) to be handled are the vector versions of count leading zeros (ctlz). The changes here are to clang so that it generates a target independent vector ctlz when it sees an ARM dependent vector ctlz. The changes in llvm are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM dependent vector ctlzs with target-independent ctlzs. There are also changes to an existing test case in llvm for ARM vector count instructions and a new test for the bitcode upgrade. <rdar://problem/11831778> There is deliberately no test for the change to clang, as so far as I know, no consensus has been reached regarding how to test neon instructions in clang; q.v. <rdar://problem/8762292> llvm-svn: 160200
* Fixed diff comparison.Stepan Dyatkovskiy2012-07-111-1/+1
| | | | llvm-svn: 160076
* Make tests which first provide a negative assertion via 'not', thenChandler Carruth2012-07-021-1/+2
| | | | | | | | | | | | | | | | a pipeline, and then a positive assertion via grep, use two RUN lines instead. Supporting these complex ideas of 'success' and 'failure' across multiple stages of a pipeline is brittle in the shell world, and would block switching to ShTest format; it only worked due to contrivances introduced by the TclTest format. Writing this as two separate RUN lines seems clearer in any event. This is another step toward completely removing TclTests from lit. llvm-svn: 159524
* Add AutoUpgrade support for the SSE4 ptest intrinsics.Nadav Rotem2012-06-102-0/+44
| | | | | | Patch by Michael Kuperstein. llvm-svn: 158295
* PR12696: Attribute bits above 1<<30 are not encoded in bitcodeMeador Inge2012-05-281-0/+164
| | | | | | | | | Attribute bits above 1<<30 are now encoded correctly. Additionally, the encoding/decoding functionality has been hoisted to helper functions in Attributes.h in an effort to help the encoding/decoding to stay in sync with the Attribute bitcode definitions. llvm-svn: 157581
* Recommited r156374 with critical fixes in BitcodeReader/Writer:Stepan Dyatkovskiy2012-05-121-0/+33
| | | | | | | | Ordinary patch for PR1255. Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object. Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported. llvm-svn: 156704
* Rejected r156374: Ordinary PR1255 patch. Due to clang-x86_64-debian-fnt ↵Stepan Dyatkovskiy2012-05-081-33/+0
| | | | | | buildbot failure. llvm-svn: 156377
* Ordinary patch for PR1255.Stepan Dyatkovskiy2012-05-081-0/+33
| | | | | | | Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object. Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported. llvm-svn: 156374
* FileCheckize these testcases.Bill Wendling2012-04-081-1/+3
| | | | llvm-svn: 154281
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* remove some old autoupgrade logicChris Lattner2011-11-271-44/+0
| | | | llvm-svn: 145167
* remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible ↵Chris Lattner2011-11-276-14/+0
| | | | | | back to 3.0 llvm-svn: 145164
* The bitcode reader can create an shuffle with a place holder mask which it willMon P Wang2011-10-261-0/+31
| | | | | | | fix up later. For this special case, allow such a mask to be considered valid. <rdar://problem/8622574> llvm-svn: 142992
* Add a few test cases to ensure the bitcode reader is backward compatible withChad Rosier2011-10-254-0/+10
| | | | | | | | LLVM 2.9. My understanding is that we plan to maintain compatibility with 2.9 until the 3.1 release. At that time we can generate new test cases using LLVM 3.0. llvm-svn: 142958
* Simplify tests by not piping them through llvm-dis.Chad Rosier2011-10-252-4/+5
| | | | llvm-svn: 142948
* Fix these test cases to not use .bc files. Otherwise, we run into issues withChad Rosier2011-10-254-2/+97
| | | | | | bitcode reader/writer backward compatibility. llvm-svn: 142896
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-191-3/+3
| | | | | | | top level type without a specified number. This syntax isn't documented and blocks forward progress. llvm-svn: 133371
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-181-23/+0
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* remove support for a bunch of obsolete instruction encodingsChris Lattner2011-06-1718-237/+0
| | | | | | and other backward compatibility hacks. llvm-svn: 133273
* Add missing newlines.Chad Rosier2011-05-284-4/+4
| | | | llvm-svn: 132241
* Fix test cases that were previously using grep to use FileCheckChad Rosier2011-05-2812-37/+56
| | | | llvm-svn: 132237
* Typo is test caseChad Rosier2011-05-271-2/+2
| | | | llvm-svn: 132214
* CRC32 intrinsics were renamed at revision 132163. This submissionChad Rosier2011-05-272-0/+16
| | | | | | | | fixes aliasing issues with the old and new names as well as adds test cases for the auto-upgrader. Fixes rdar 9472944. llvm-svn: 132207
OpenPOWER on IntegriCloud