summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instruction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-231-1/+1
| | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
* Remove MallocInst from LLVM Instructions.Victor Hernandez2009-10-171-2/+0
| | | | llvm-svn: 84299
* Move parent assertion check before metadata deletion.Devang Patel2009-09-241-1/+1
| | | | llvm-svn: 82692
* Delete attached metadata when an instruction is deleted.Devang Patel2009-09-231-0/+5
| | | | llvm-svn: 82647
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-4/+4
| | | | llvm-svn: 82355
* Update malloc call creation code (AllocType is now the element type of the ↵Victor Hernandez2009-09-181-1/+23
| | | | | | | | | | | | | | | | | | malloc, not the resulting type). In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants. Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array. Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type. Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls. Add verification for malloc calls. Reviewed by Dan Gohman. llvm-svn: 82257
* This should use isIndenticalToWhenDefined.Dan Gohman2009-08-251-2/+2
| | | | llvm-svn: 80039
* Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined,Dan Gohman2009-08-251-0/+8
| | | | | | | | | | | | | | | | and introduce a new Instruction::isIdenticalTo which tests for full identity, including the SubclassOptionalData flags. Also, fix the Instruction::clone implementations to preserve the SubclassOptionalData flags. Finally, teach several optimizations how to handle SubclassOptionalData correctly, given these changes. This fixes the counterintuitive behavior of isIdenticalTo not comparing the full value, and clone not returning an identical clone, as well as some subtle bugs that could be caused by these. Thanks to Nick Lewycky for reporting this, and for an initial patch! llvm-svn: 80038
* Replace isTrapping with a new, similar method called Eli Friedman2009-07-171-14/+48
| | | | | | | | | | isSafeToSpeculativelyExecute. The new method is a bit closer to what the callers actually care about in that it rejects more things callers don't want. It also adds more precise handling for integer division, and unifies code for analyzing the legality of a speculative load. llvm-svn: 76150
* FreeInst is trapping.Dan Gohman2009-07-141-0/+1
| | | | llvm-svn: 75567
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-2/+0
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Give Instruction::isSameOperationAs a corresponding comment to noteDan Gohman2009-06-121-2/+5
| | | | | | | | | | | the relationship with MergeFunctions.cpp's isEquivalentOperation, and make a trivial code reordering so that the two functions are easier to compare. Fix the name of Instruction::isSameOperationAs in MergeFunction.cpp's isEquivalentOperation's comment, and fix a nearby 80-column violation. llvm-svn: 73241
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-10/+9
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Allow readonly functions to unwind exceptions. TeachDuncan Sands2009-05-061-0/+8
| | | | | | | | the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. llvm-svn: 71071
* Simplify the logic of getting hold of a PHI predecessor block.Gabor Greif2009-01-231-2/+1
| | | | | | | | | There is now a direct way from value-use-iterator to incoming block in PHINode's API. This way we avoid the iterator->index->iterator trip, and especially the costly getOperandNo() invocation. Additionally there is now an assertion that the iterator really refers to one of the PHI's Uses. llvm-svn: 62869
* add a new insertAfter method, patch by Tom Jablin!Chris Lattner2009-01-131-0/+6
| | | | llvm-svn: 62158
* improve const correctness.Chris Lattner2008-11-271-2/+2
| | | | llvm-svn: 60168
* Fix an obvious copy/pasto.Nick Lewycky2008-10-271-4/+4
| | | | llvm-svn: 58231
* Fix Instruction::isIdenticalTo and isSameOperationAs to recognizeDan Gohman2008-10-161-6/+57
| | | | | | | additional information in Loads, Stores, Calls, Invokes, InsertValueInsts, and ExtractValueInsts. llvm-svn: 57620
* Correct the name of isTrapping in comments.Dan Gohman2008-10-151-1/+1
| | | | llvm-svn: 57606
* Enable first-class aggregates support.Dan Gohman2008-07-231-1/+0
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Add an insertBefore method for attaching previously unattached instructions,Owen Anderson2008-06-171-0/+6
| | | | | | such as those created by clone(), to a basic block. llvm-svn: 52424
* Let Instruction::getOpcodeName() return something useful for the newMatthijs Kooijman2008-05-301-0/+2
| | | | | | insertvalue / extractvalue instructions. llvm-svn: 51766
* Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRefNate Begeman2008-05-121-0/+2
| | | | | | for details. CodeGen support coming in a follow up patch llvm-svn: 50985
* conservatively say that volatile stores read memory.Chris Lattner2008-05-081-2/+3
| | | | llvm-svn: 50872
* store can't read from memory.Chris Lattner2008-05-081-1/+0
| | | | llvm-svn: 50869
* add a new Instruction::mayReadFromMemory predicate, makeChris Lattner2008-05-081-2/+19
| | | | | | Instruction::mayWriteToMemory stronger for invokes. llvm-svn: 50858
* add a handy helper method to instruction, useful for determiningChris Lattner2008-04-201-0/+23
| | | | | | | whether it is used outside of some block. This can be used to see if there are any non-local references, for example. llvm-svn: 50004
* VAArg may trap.Dan Gohman2008-04-141-0/+1
| | | | llvm-svn: 49646
* print getresult instruction.Devang Patel2008-02-211-0/+1
| | | | llvm-svn: 47461
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Revert r44626, which turned off the use of readonlyDuncan Sands2007-12-121-3/+0
| | | | | | | | | | and readnone for functions with bodies because it broke llvm-gcc-4.2 bootstrap. It turns out that, because of LLVM's array_ref hack, gcc was computing pure/const attributes wrong (now fixed by turning off the gcc ipa-pure-const pass). llvm-svn: 44937
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-101-2/+2
| | | | | | | _sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed _sabre_: the vtable lives to fight another day llvm-svn: 44760
* Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!Gordon Henriksen2007-12-091-2/+2
| | | | llvm-svn: 44747
* Commit 44487 broke bootstrap of llvm-gcc-4.2. It isDuncan Sands2007-12-051-0/+3
| | | | | | | not yet clear why, but in the meantime work around the problem by making less use of readnone/readonly info. llvm-svn: 44626
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-16/+3
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDeadDan Gohman2007-07-261-4/+12
| | | | | | | to Instruction::mayWriteToMemory, fixing a FIXME, and helping various places that call mayWriteToMemory directly. llvm-svn: 40533
* Refactor the setName stuff, moving it down the inheritance hierarchy, toChris Lattner2007-02-241-31/+2
| | | | | | solve a crash in -instcombine -debug that was hit while investigating PR1217 llvm-svn: 34544
* remove warningChris Lattner2007-02-191-2/+2
| | | | llvm-svn: 34424
* Add a FIXME for unwritten code.Reid Spencer2007-02-191-0/+2
| | | | llvm-svn: 34422
* fix buildAndrew Lenharth2007-02-161-0/+1
| | | | llvm-svn: 34339
* make mayWriteToMemory a non-virtual functionChris Lattner2007-02-151-0/+19
| | | | llvm-svn: 34334
* Switch UnaryOperators to default to passing names up by const char* when ↵Chris Lattner2007-02-131-0/+28
| | | | | | | | possible. This speeds up bcreading by 1.5%. llvm-svn: 34233
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-121-2/+4
| | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. llvm-svn: 34193
* For PR411:Reid Spencer2007-02-051-1/+0
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* Now that setcondinst has been eliminated, we can mark Value::SubclassIDChris Lattner2007-01-041-4/+0
| | | | | | const and remove the ugly mutator methods. llvm-svn: 32860
* For PR950:Reid Spencer2006-12-231-27/+27
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Allow the ICmp and FCmp instructions to be written by the AsmWriterReid Spencer2006-12-031-0/+2
| | | | llvm-svn: 32148
* For PR950:Reid Spencer2006-11-271-10/+23
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* For PR950:Reid Spencer2006-11-201-1/+1
| | | | | | | | First in a series of patches to convert SetCondInst into ICmpInst and FCmpInst using only two opcodes and having the instructions contain their predicate value. Nothing uses these classes yet. More patches to follow. llvm-svn: 31867
OpenPOWER on IntegriCloud