summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove extra semi-colons.Chad Rosier2012-02-221-1/+1
| | | | llvm-svn: 151169
* Revert r151049 cos it broke the buildbots.Jay Foad2012-02-212-131/+34
| | | | llvm-svn: 151052
* PR1210: make uniquing of struct and function types more efficient byJay Foad2012-02-212-34/+131
| | | | | | | | | using a DenseMap and Talin's new GeneralHash, avoiding the need for a temporary std::vector on every lookup. Patch by Meador Inge! llvm-svn: 151049
* Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-191-13/+4
| | | | llvm-svn: 150918
* White space fixes.Rafael Espindola2012-02-181-7/+7
| | | | llvm-svn: 150886
* s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags ↵Bill Wendling2012-02-161-3/+3
| | | | | | are named elsewhere. llvm-svn: 150679
* VMCore/AsmWriter.cpp: Tweak to check #INF and #NAN earlier.NAKAMURA Takumi2012-02-161-1/+3
| | | | | | | With MSVCRT, prior checker missed emission of #INF and #NAN. FIXME: Checking should be simpler. llvm-svn: 150667
* VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).NAKAMURA Takumi2012-02-161-1/+1
| | | | | | atof(3) might behave differently among platforms. llvm-svn: 150661
* Use the enum instead of 'unsigned'.Bill Wendling2012-02-151-1/+2
| | | | llvm-svn: 150632
* Add a module flags accessor method which returns the flags in a vector.Bill Wendling2012-02-151-0/+15
| | | | llvm-svn: 150623
* Add a way to replace a field inside a metadata node. This can beEric Christopher2012-02-151-0/+5
| | | | | | | used to incrementally update a created node without needing a temporary node and RAUW. llvm-svn: 150571
* Added TargetPassConfig::disablePass/substitutePass as a general mechanism to ↵Andrew Trick2012-02-151-2/+2
| | | | | | override specific passes. llvm-svn: 150562
* [WIP] Initial code for module flags.Bill Wendling2012-02-111-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module flags are key-value pairs associated with the module. They include a 'behavior' value, indicating how module flags react when mergine two files. Normally, it's just the union of the two module flags. But if two module flags have the same key, then the resulting flags are dictated by the behaviors. Allowable behaviors are: Error Emits an error if two values disagree. Warning Emits a warning if two values disagree. Require Emits an error when the specified value is not present or doesn't have the specified value. It is an error for two (or more) llvm.module.flags with the same ID to have the Require behavior but different values. There may be multiple Require flags per ID. Override Uses the specified value if the two values disagree. It is an error for two (or more) llvm.module.flags with the same ID to have the Override behavior but different values. llvm-svn: 150300
* Added Pass::createPass(ID) to handle pass configuration by IDAndrew Trick2012-02-081-0/+7
| | | | llvm-svn: 150092
* Cache the sizes of vectors instead of calculating them all over the place.Bill Wendling2012-02-071-9/+11
| | | | llvm-svn: 149954
* Reserve space in these vectors to prevent having to grow the array tooBill Wendling2012-02-072-6/+8
| | | | | | much. This gets us an addition 0.9% on 445.gobmk. llvm-svn: 149952
* Remove some dead code and tidy things up now that vectors use ConstantDataVectorChris Lattner2012-02-061-16/+0
| | | | | | instead of always using ConstantVector. llvm-svn: 149912
* [unwind removal] Remove all of the code for the dead 'unwind' instruction. ThereBill Wendling2012-02-062-34/+2
| | | | | | | were no 'unwind' instructions being generated before this, so this is in effect a no-op. llvm-svn: 149906
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-055-33/+20
| | | | llvm-svn: 149849
* Efficient Constant Uniquing.Talin2012-02-054-68/+196
| | | | llvm-svn: 149848
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-054-127/+104
| | | | | | | | | 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
* Update llvm debug version to support new structure and tag for Objective-C ↵Devang Patel2012-02-041-1/+1
| | | | | | property's debug info. llvm-svn: 149736
* Simplify some GEP checks in the verifier.Duncan Sands2012-02-031-4/+2
| | | | llvm-svn: 149698
* Add auto upgrade support for x86 pcmpgt/pcmpeq intrinics removed in r149367.Craig Topper2012-02-031-3/+40
| | | | llvm-svn: 149678
* whitespaceAndrew Trick2012-02-031-6/+6
| | | | llvm-svn: 149671
* SwitchInst refactoring.Stepan Dyatkovskiy2012-02-013-15/+12
| | | | | | | | | | | | | | | | | 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
* Add pass printer passes in the right place.Andrew Trick2012-02-011-81/+46
| | | | | | | | | | | | The pass pointer should never be referenced after sending it to schedulePass(), which may delete the pass. To fix this bug I had to clean up the design leading to more goodness. You may notice now that any non-analysis pass is printed. So things like loop-simplify and lcssa show up, while target lib, target data, alias analysis do not show up. Normally, analysis don't mutate the IR, but you can now check this by using both -print-after and -print-before. The effects of analysis will now show up in between the two. The llc path is still in bad shape. But I'll be improving it in my next checkin. Meanwhile, print-machineinstrs still works the same way. With print-before/after, many llc passes that were not printed before now are, some of these should be converted to analysis. A few very important passes, isel and scheduler, are not properly initialized, so not printed. llvm-svn: 149480
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-014-104/+127
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* eliminate the "string" form of ConstantArray::get, usingChris Lattner2012-01-313-9/+3
| | | | | | ConstantDataArray::getString instead. llvm-svn: 149365
* with recent changes, ConstantArray is never a "string". Remove the associatedChris Lattner2012-01-312-82/+10
| | | | | | methods and constant fold the clients to false. llvm-svn: 149362
* fix a small oversight that broke the fhourstones app.Chris Lattner2012-01-311-1/+1
| | | | llvm-svn: 149357
* Change ConstantArray::get to form a ConstantDataArray when possible,Chris Lattner2012-01-311-38/+93
| | | | | | | | | | | | | | | kicking in the big win of ConstantDataArray. As part of this, change the implementation of GetConstantStringInfo in ValueTracking to work with ConstantDataArray (and not ConstantArray) making it dramatically, amazingly, more efficient in the process and renaming it to getConstantStringInfo. This keeps around a GetConstantStringInfo entrypoint that (grossly) forwards to getConstantStringInfo and constructs the std::string required, but existing clients should move over to getConstantStringInfo instead. llvm-svn: 149351
* fix asmwriting of ConstantDataArray to use the right element count, Chris Lattner2012-01-311-22/+18
| | | | | | simplify ConstantArray handling, since they can never be empty. llvm-svn: 149341
* Add a constified getLandingPad() method.Bill Wendling2012-01-311-0/+3
| | | | llvm-svn: 149303
* Various improvements suggested by DuncanChris Lattner2012-01-301-1/+1
| | | | llvm-svn: 149255
* First step of flipping on ConstantDataSequential: enable ConstantDataVectorChris Lattner2012-01-301-7/+89
| | | | | | to be formed whenever ConstantVector::get is used. llvm-svn: 149226
* Fix ConstantFoldShuffleVectorInstruction to properly handle the caseChris Lattner2012-01-301-3/+5
| | | | | | when the result type has a different # elements than the input vectors. llvm-svn: 149221
* continue making the world safe for ConstantDataVector. At this point,Chris Lattner2012-01-273-38/+46
| | | | | | | we should (theoretically optimize and codegen ConstantDataVector as well as ConstantVector. llvm-svn: 149116
* smallvectorize and ArrayRef'ize some stuff.Chris Lattner2012-01-262-5/+5
| | | | llvm-svn: 149077
* Reduce a lot of code duplication by implementing Chris Lattner2012-01-261-138/+16
| | | | | | | | | ConstantExpr::getWithOperandReplaced and ConstantExpr::replaceUsesOfWithOnConstant in terms of ConstantExpr::getWithOperands. While we're at it, make sure that ConstantExpr::getWithOperands covers all instructions: it was missing insert/extractvalue. llvm-svn: 149076
* unbreak test/Bitcode/shuffle.ll.Chris Lattner2012-01-261-0/+3
| | | | llvm-svn: 149033
* simplify by using ShuffleVectorInst::getMaskValue.Chris Lattner2012-01-261-10/+8
| | | | llvm-svn: 149029
* eliminate the Constant::getVectorElements method. There are better (andChris Lattner2012-01-263-48/+18
| | | | | | | more robust) ways to do what it was doing now. Also, add static methods for decoding a ShuffleVector mask. llvm-svn: 149028
* Continue improving support for ConstantDataAggregate, and use theChris Lattner2012-01-262-367/+129
| | | | | | new methods recently added to (sometimes greatly!) simplify code. llvm-svn: 149024
* Add a ConstantDataVector::getSplatValue() method, for parity withChris Lattner2012-01-261-39/+87
| | | | | | | | | | ConstantVector. Fix some outright bugs in the implementation of ConstantArray and Constant struct, which would cause us to not make one big UndefValue when asking for an array/struct with all undef elements. Enhance Constant::isAllOnesValue to work with ConstantDataVector. llvm-svn: 149021
* some general cleanup, using new methods and tidying up old code.Chris Lattner2012-01-261-26/+21
| | | | llvm-svn: 149006
* fix pasto in the new (and still unused) ShuffleVectorInst::getShuffleMask ↵Chris Lattner2012-01-261-1/+1
| | | | | | method. llvm-svn: 149005
* add StructType helpers too.Chris Lattner2012-01-261-0/+14
| | | | llvm-svn: 149000
* Ok, break down and add some cast<>'ing helper methods to the Type classChris Lattner2012-01-261-0/+39
| | | | | | | | | | | | to reduce the number of cast<>'s we have. This allows someone to use things like Ty->getVectorNumElements() instead of cast<VectorType>(Ty)->getNumElements() when you know that a type is a vector. It would be a great general cleanup to move the codebase to use these, I will do so in the code I'm touching. llvm-svn: 148999
* add some helper methods to ShuffleVectorInst and enhance itsChris Lattner2012-01-251-28/+55
| | | | | | | "isValidOperands" and "getMaskValue" methods to allow ConstantDataSequential. llvm-svn: 148998
OpenPOWER on IntegriCloud