summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* Don't try to create a GEP when the pointee type is unsized (such GEPsDuncan Sands2012-01-111-1/+2
| | | | | | | are invalid). Fixes a crash on array1.C from the GCC testsuite when compiled with dragonegg. llvm-svn: 147946
* Add 'llvm_unreachable' to passify GCC's understanding of the constraintsChandler Carruth2012-01-101-0/+1
| | | | | | | | 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-103-7/+0
| | | | llvm-svn: 147855
* generalize LLVMContext::emitError to take a twine instead of a StringRef.Chris Lattner2012-01-031-3/+3
| | | | llvm-svn: 147501
* Type: replaced usage of ID with getTypeID().Stepan Dyatkovskiy2012-01-031-11/+12
| | | | llvm-svn: 147446
* VMCore: add assert for miscompileDylan Noblesmith2011-12-311-0/+5
| | | | | | | | | | | See PR11652. Trying to add this assert to setSubclassData() itself actually prevented the miscompile entirely, so it has to be here. This makes the source of the bug more obvious than the other asserts triggering later on did. llvm-svn: 147390
* Using Inst->setMetadata(..., NULL) should be safe to remove metadata even whenNick Lewycky2011-12-271-2/+4
| | | | | | | | there is non of that type to remove. This fixes a crasher in the particular case where the instruction has metadata but no metadata storage in the context (this is only possible if the instruction has !dbg but no other metadata info). llvm-svn: 147285
* Give string constants generated by IRBuilder private linkage.Benjamin Kramer2011-12-221-1/+1
| | | | | | Fixes PR11640. llvm-svn: 147144
* Add support to add named metadata operand.Devang Patel2011-12-201-0/+11
| | | | | | Patch by Andrew Wilkins! llvm-svn: 146984
* Unweaken vtables as per ↵David Blaikie2011-12-206-1/+49
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Add basic generic CodeGen support for half.Dan Gohman2011-12-201-0/+3
| | | | llvm-svn: 146927
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-177-27/+67
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* Make constant folding for GEPs a bit more aggressive.Eli Friedman2011-12-151-1/+1
| | | | llvm-svn: 146639
* Move Instruction::isSafeToSpeculativelyExecute out of VMCore andDan Gohman2011-12-141-53/+0
| | | | | | | | | into Analysis as a standalone function, since there's no need for it to be in VMCore. Also, update it to use isKnownNonZero and other goodies available in Analysis, making it more precise, enabling more aggressive optimization. llvm-svn: 146610
* Fix unused value warning for value used only in assert.Nick Lewycky2011-12-121-5/+2
| | | | llvm-svn: 146440
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Don't rely in there being one argument before we've actually identifiedChandler Carruth2011-12-121-3/+4
| | | | | | | a function to upgrade. Also, simplify the code a bit at the expense of one line. llvm-svn: 146368
* Teach the verifier to reject all non-constant arguments to the secondChandler Carruth2011-12-121-0/+6
| | | | | | argument of the cttz and ctlz intrinsics. llvm-svn: 146360
* Switch llvm.cttz and llvm.ctlz to accept a second i1 parameter whichChandler Carruth2011-12-121-6/+33
| | | | | | | | | | | | | | | | | | | | indicates whether the intrinsic has a defined result for a first argument equal to zero. This will eventually allow these intrinsics to accurately model the semantics of GCC's __builtin_ctz and __builtin_clz and the X86 instructions (prior to AVX) which implement them. This patch merely sets the stage by extending the signature of these intrinsics and establishing auto-upgrade logic so that the old spelling still works both in IR and in bitcode. The upgrade logic preserves the existing (inefficient) semantics. This patch should not change any behavior. CodeGen isn't updated because it can use the existing semantics regardless of the flag's value. Note that this will be followed by API updates to Clang and DragonEgg. Reviewed by Nick Lewycky! llvm-svn: 146357
* Add dump method for debugging.Bill Wendling2011-12-091-0/+3
| | | | llvm-svn: 146293
* Push StringRefs through the metadata interface.Benjamin Kramer2011-12-061-2/+2
| | | | llvm-svn: 145934
* Add a little heuristic to Value::isUsedInBasicBlock to speed it up for small ↵Benjamin Kramer2011-12-051-0/+13
| | | | | | | | | | basic blocks. - Calling getUser in a loop is much more expensive than iterating over a few instructions. - Use it instead of the open-coded loop in AddrModeMatcher. - 5% speedup on ARMDisassembler.cpp Release builds. llvm-svn: 145810
* Add support for vectors of pointers.Nadav Rotem2011-12-054-20/+112
| | | | llvm-svn: 145801
* Add some missing anchors.David Blaikie2011-12-012-0/+4
| | | | llvm-svn: 145578
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-291-2/+0
| | | | llvm-svn: 145420
* Eli managed to kill off llvm.membarrier in llvm 3.0 also, this meansChris Lattner2011-11-271-34/+8
| | | | | | that mainline needs no autoupgrade logic for intrinsics yet, woohoo! llvm-svn: 145178
* The llvm.atomic intrinsics *were* removed in LLVM 3.0 (in r141333), remove the Chris Lattner2011-11-271-68/+1
| | | | | | autoupgrade logic for 2.9 and before. llvm-svn: 145176
* remove autoupgrade support for old forms of llvm.prefetch and the oldChris Lattner2011-11-271-101/+1
| | | | | | | trampoline forms. Both of these were correct in LLVM 3.0, and we don't need to support LLVM 2.9 and earlier in mainline. llvm-svn: 145174
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-271-42/+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 some old autoupgrade logicChris Lattner2011-11-271-80/+1
| | | | llvm-svn: 145167
* remove autoupgrade support for LLVM 2.9 exception stuff. Mainline supportsChris Lattner2011-11-271-246/+0
| | | | | | LLVM 3.0 and later. llvm-svn: 145165
* Devirtualize Pass::getPassID, overriding it isn't useful and it gets called ↵Benjamin Kramer2011-11-241-2/+0
| | | | | | | | a lot. While at it pull the trivial ctor in line. llvm-svn: 145124
* Fixing a commentJoe Abbey2011-11-211-1/+1
| | | | llvm-svn: 145025
* Rename MVT::untyped to MVT::Untyped to match similar nomenclature.Owen Anderson2011-11-161-1/+1
| | | | llvm-svn: 144747
* Remove Value::getNameStr. It has been deprecated for a while and provides no ↵Benjamin Kramer2011-11-151-4/+0
| | | | | | additional value over getName(). llvm-svn: 144657
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-4/+4
| | | | llvm-svn: 144648
* Fold ConstantVector::isAllOnesValue into Constant::isAllOnesValue and ↵Benjamin Kramer2011-11-141-22/+4
| | | | | | simplify it. llvm-svn: 144555
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-031-0/+23
| | | | llvm-svn: 143634
* Don't print two 0x prefixes when printing an address.Benjamin Kramer2011-11-021-1/+1
| | | | llvm-svn: 143549
* Add a pinned metadata name for fpaccuracy, and document itPeter Collingbourne2011-10-271-0/+5
| | | | llvm-svn: 143135
* The bitcode reader can create an shuffle with a place holder mask which it willMon P Wang2011-10-261-3/+10
| | | | | | | fix up later. For this special case, allow such a mask to be considered valid. <rdar://problem/8622574> llvm-svn: 142992
* Refactor code from inlining and globalopt that checks whether a function ↵Eli Friedman2011-10-201-0/+15
| | | | | | definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead. This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress. (GlobalDCE can also handle the given tescase, but we only run that at -O3.) Found while looking at PR11180. llvm-svn: 142572
* Use a SmallVector for intrinsic argument types.Benjamin Kramer2011-10-171-1/+1
| | | | llvm-svn: 142259
* Correct over-zealous removal of hack.Bill Wendling2011-10-171-0/+15
| | | | | | | Some code want to check that *any* call within a function has the 'returns twice' attribute, not just that the current function has one. llvm-svn: 142221
* Now that we have the ReturnsTwice function attribute, this method isBill Wendling2011-10-171-40/+0
| | | | | | | obsolete. Check the attribute instead. <rdar://problem/8031714> llvm-svn: 142212
* Add a routine to swap branch instruction operands, and update anyChandler Carruth2011-10-171-0/+21
| | | | | | | | | | | | profile metadata at the same time. Use it to preserve metadata attached to a branch when re-writing it in InstCombine. Add metadata to the canonicalize_branch InstCombine test, and check that it is tranformed correctly. Reviewed by Nick Lewycky! llvm-svn: 142168
* Let printf do the formatting instead aligning strings ourselves.Benjamin Kramer2011-10-161-1/+1
| | | | | | While at it, merge some format strings. llvm-svn: 142140
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-161-1/+1
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* constify array itself, don't iterate multiple times.Chris Lattner2011-10-141-2/+2
| | | | llvm-svn: 142013
* ocaml bindings: add getopcode for constant and instruction, and int64_of_const.Torok Edwin2011-10-141-0/+6
| | | | llvm-svn: 141990
OpenPOWER on IntegriCloud