summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
...
* Bitcode: Don't expose WriteBitcodeToStream to clients.Daniel Dunbar2012-02-291-3/+2
| | | | llvm-svn: 151747
* Fix PR12080 by ensuring that MaterializeModule actually reads all the bitcodeDerek Schuff2012-02-292-4/+12
| | | | | | in the streaming case. llvm-svn: 151676
* Enable streaming of bitcodeDerek Schuff2012-02-063-77/+167
| | | | | | | This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. llvm-svn: 149918
* [unwind removal] Don't write out the dead 'unwind' instruction.Bill Wendling2012-02-061-3/+0
| | | | llvm-svn: 149905
* [unwind removal] Remove the 'unwind' instruction parsing bits.Bill Wendling2012-02-061-4/+0
| | | | llvm-svn: 149897
* Test commit; also removes some trailing whitespaceDerek Schuff2012-02-061-3/+3
| | | | llvm-svn: 149887
* Improve the bitcode reader's handling of constant strings to useChris Lattner2012-02-051-22/+6
| | | | | | | ConstantDataArray::getString direction, instead of "boxing" each byte into a ConstantInt and using ConstantArray::get. llvm-svn: 149805
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-052-30/+0
| | | | | | | | | but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800
* SwitchInst refactoring.Stepan Dyatkovskiy2012-02-011-4/+11
| | | | | | | | | | | | | | | | | The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149481
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-012-0/+30
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* with recent changes, ConstantArray is never a "string". Remove the associatedChris Lattner2012-01-312-30/+0
| | | | | | methods and constant fold the clients to false. llvm-svn: 149362
* fix a major oversight that is breaking some llvm-test tests.Chris Lattner2012-01-301-0/+1
| | | | llvm-svn: 149230
* Add bitcode reader and writer support for ConstantDataAggregate, whichChris Lattner2012-01-302-2/+108
| | | | | | should be feature complete now. Lets see if it works. llvm-svn: 149215
* smallvectorize.Chris Lattner2012-01-271-6/+6
| | | | llvm-svn: 149117
* Extend Attributes to 64 bitsKostya Serebryany2012-01-202-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
* Add 'llvm_unreachable' to passify GCC's understanding of the constraintsChandler Carruth2012-01-101-0/+4
| | | | | | | | of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, and we should assume as much. llvm-svn: 147861
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-4/+0
| | | | llvm-svn: 147855
* Materialize functions whose basic blocks are used by global variables. FixesRafael Espindola2012-01-022-1/+13
| | | | | | PR11677. llvm-svn: 147425
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-172-2/+8
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier2011-12-142-55/+0
| | | | | | free function. llvm-svn: 146531
* Add BitcodeVerifier.cpp to CMakeList.Chad Rosier2011-12-121-0/+1
| | | | llvm-svn: 146442
* Begin sketching out a bitcode verifier pass. Idea is to emit a .bc file andChad Rosier2011-12-121-0/+54
| | | | | | then read the file back in to verify use-list serialization/deserialization. llvm-svn: 146439
* LLVMBuild: Introduce a common section which currently has a list of theDaniel Dunbar2011-12-121-0/+3
| | | | | | | | | | | subdirectories to traverse into. - Originally I wanted to avoid this and just autoscan, but this has one key flaw in that new subdirectories can not automatically trigger a rerun of the llvm-build tool. This is particularly a pain when switching back and forth between trees where one has added a subdirectory, as the dependencies will tend to be wrong. This will also eliminates FIXME implicitly. llvm-svn: 146436
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-123-3/+0
| | | | llvm-svn: 146409
* Fix 80-column.Chad Rosier2011-12-081-10/+11
| | | | | | Simplify code. llvm-svn: 146112
* Fix comments.Chad Rosier2011-12-081-0/+1
| | | | llvm-svn: 146109
* Fix comments.Chad Rosier2011-12-071-2/+2
| | | | llvm-svn: 146107
* Flesh out a bit more of the bitcode use-list ordering preservation code.Chad Rosier2011-12-071-5/+87
| | | | | | | Nothing too interesting at this point, but comments are welcome. Part of rdar://9860654 and PR5680. llvm-svn: 146090
* Begin adding experimental support for preserving use-list ordering of bitcodeChad Rosier2011-12-073-0/+78
| | | | | | | | | | files. First, add a new block USELIST_BLOCK to the bitcode format. This is where USELIST_CODE_ENTRYs will be stored. The format of the USELIST_CODE_ENTRYs have not yet been defined. Add support in the BitcodeReader for parsing the USELIST_BLOCK. Part of rdar://9860654 and PR5680. llvm-svn: 146078
* ValueEnumerator - debug dump().Chad Rosier2011-12-072-1/+43
| | | | llvm-svn: 146070
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-292-10/+0
| | | | llvm-svn: 145420
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-271-3/+0
| | | | | | | I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? llvm-svn: 145169
* remove autoupgrade support for LLVM 2.9 exception stuff. Mainline supportsChris Lattner2011-11-271-3/+0
| | | | | | LLVM 3.0 and later. llvm-svn: 145165
* remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible ↵Chris Lattner2011-11-272-277/+0
| | | | | | back to 3.0 llvm-svn: 145164
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-033-0/+68
| | | | llvm-svn: 143634
* Remove some cruft from the BitcodeWriter, while still maintaining backwardChad Rosier2011-11-032-5/+39
| | | | | | compatibility in the BitcodeReader. llvm-svn: 143598
* Also update the EH with bitcode. I missed this earlier. Thanks to Duncan for ↵Bill Wendling2011-10-051-0/+3
| | | | | | pointing it out. llvm-svn: 141169
* Fix a typo in the bitcode reader in the handling of atomic stores. Reported ↵Eli Friedman2011-09-191-1/+1
| | | | | | by David Meyer on llvmdev. llvm-svn: 140040
* Don't forget to add the landingpad and resume instructions to the ↵Bill Wendling2011-09-011-0/+2
| | | | | | | | InstructionList. This was found via a nightly build of 483.xalancbmk. llvm-svn: 138923
* Initial commit of the 'landingpad' instruction.Bill Wendling2011-08-122-0/+55
| | | | | | | | | | | | This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (see LangRef.html for more detail). These restrictions allow the exception handling code to gather the information it needs in a much more sane way. This patch has the definition, implementation, C interface, parsing, and bitcode support in it. llvm-svn: 137501
* switch to use the new api for structtypes.Chris Lattner2011-08-123-8/+8
| | | | llvm-svn: 137480
* Whitespace and formatting. No functional change intended.Chad Rosier2011-08-121-10/+9
| | | | llvm-svn: 137463
* Representation of 'atomic load' and 'atomic store' in IR.Eli Friedman2011-08-092-7/+67
| | | | llvm-svn: 137170
* Fix 80-column violations.Chad Rosier2011-08-091-3/+3
| | | | llvm-svn: 137163
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-312-0/+12
| | | | | | | | | This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). llvm-svn: 136589
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-302-58/+0
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-292-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-282-0/+98
| | | | | | | | | | | | | | | | | | | | | 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics. The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works. As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas. Optimizer/codegen support coming soon. llvm-svn: 136404
* The personality function should be a Function* and not just a Value*.Bill Wendling2011-07-281-1/+2
| | | | llvm-svn: 136392
* Make sure that the landingpad instruction takes a Constant* as the clause's ↵Bill Wendling2011-07-281-1/+1
| | | | | | value. llvm-svn: 136326
OpenPOWER on IntegriCloud