summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* Make getAlignOf return an i64, for consistency with getSizeOf andDan Gohman2010-01-281-2/+2
| | | | | | | getOffsetOf, and remove the comment about assuming i8 is byte-aligned, which is no longer applicable. llvm-svn: 94738
* Remove SCEVAllocSizeExpr and SCEVFieldOffsetExpr, and in their placeDan Gohman2010-01-282-4/+33
| | | | | | | | | | | | | | | | use plain SCEVUnknowns with ConstantExpr::getSizeOf and ConstantExpr::getOffsetOf constants. This eliminates a bunch of special-case code. Also add code for pattern-matching these expressions, for clients that want to recognize them. Move ScalarEvolution's logic for expanding array and vector sizeof expressions into an element count times the element size, to expose the multiplication to subsequent folding, into the regular constant folder. llvm-svn: 94737
* Update CMake build.Ted Kremenek2010-01-271-2/+2
| | | | llvm-svn: 94687
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-279-50/+95
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* fix CastInst::castIsValid to reject aggregate types, fixing PR6153:Chris Lattner2010-01-262-31/+20
| | | | | | | | llvm-as: t.ll:1:25: error: invalid cast opcode for cast from '[4 x i8]' to '[1 x i32]' @x = constant [1 x i32] bitcast ([4 x i8] c"abcd" to [1 x i32]) ^ llvm-svn: 94595
* Fix ICmpInst::makeConstantRange to use ConstantRange's API properlyDan Gohman2010-01-261-2/+30
| | | | | | in the case of empty and full ranges. llvm-svn: 94548
* Add MDNode::getIfExists(), an efficient way to determine if a value is used ↵Victor Hernandez2010-01-261-28/+40
| | | | | | by metadata (since metadata does not appear in a value's use list) llvm-svn: 94492
* Change Value::getUnderlyingObject to have the MaxLookup value specified as aBob Wilson2010-01-251-4/+3
| | | | | | | | | | | | parameter with a default value, instead of just hardcoding it in the implementation. The limit of MaxLookup = 6 was introduced in r69151 to fix a performance problem with O(n^2) behavior in instcombine, but the scalarrepl pass is relying on getUnderlyingObject to go all the way back to an AllocaInst. Making the limit part of the method signature makes it clear that by default the result is limited and should help avoid similar problems in the future. This fixes pr6126. llvm-svn: 94433
* mark some libraries that currently require RTTI.Chris Lattner2010-01-241-1/+1
| | | | llvm-svn: 94377
* simplify code a bit.Chris Lattner2010-01-231-5/+5
| | | | llvm-svn: 94281
* InstCombine should not fold sext/zext of a vector and a bitcast to a scalar ↵Mon P Wang2010-01-231-2/+3
| | | | | | to a sext/zext llvm-svn: 94280
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-221-2/+2
| | | | llvm-svn: 94243
* Fix/strengthen verification of llvm.dbg.declareVictor Hernandez2010-01-221-5/+10
| | | | llvm-svn: 94195
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* give PassNameParser a home.Chris Lattner2010-01-221-0/+3
| | | | llvm-svn: 94162
* add an out-of-line virtual method to CmpInst to give it a home.Chris Lattner2010-01-221-0/+2
| | | | llvm-svn: 94161
* elimiante the dynamic_cast's from opt.Chris Lattner2010-01-221-3/+4
| | | | llvm-svn: 94160
* eliminate a bunch more unneeded dynamic_cast's.Chris Lattner2010-01-221-13/+14
| | | | llvm-svn: 94156
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-7/+20
| | | | llvm-svn: 94155
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-9/+6
| | | | llvm-svn: 94154
* tidy upChris Lattner2010-01-211-9/+16
| | | | llvm-svn: 94100
* Fix a crasher trying to fold each element in a comparison between two vectorsNick Lewycky2010-01-212-9/+16
| | | | | | | | | | if one of the vectors didn't have elements (such as undef). Fixes PR 6096. Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would have <2 x i1> type if constant folding was successful and i1 type if it wasn't. This exposed a related issue in the bitcode reader. llvm-svn: 94069
* Backout r93990Victor Hernandez2010-01-201-9/+4
| | | | llvm-svn: 93995
* Fix/strengthen verification of llvm.dbg.declareVictor Hernandez2010-01-201-4/+9
| | | | llvm-svn: 93990
* Fix if/else brackets; getFunctionForValue() is to be called for non-metadata ↵Victor Hernandez2010-01-201-1/+3
| | | | | | values llvm-svn: 93984
* Fix the conditions to unambiguously show the logic they represent. This is theChandler Carruth2010-01-201-3/+3
| | | | | | | logic enforced in the test case as well, so hopefully it is correct. Please review Victor. llvm-svn: 93980
* Refactor common parts of MDNode::getFunction() and assertLocalFunction() ↵Victor Hernandez2010-01-202-34/+24
| | | | | | into getFunctionForValue() llvm-svn: 93977
* Add comment that MDNode::getFunction() is not to be used by ↵Victor Hernandez2010-01-181-1/+2
| | | | | | performance-critical code (currently only used by AsmWriter) llvm-svn: 93802
* Simplify MDNode::getFunction() and assertLocalFunction() by avoiding extra ↵Victor Hernandez2010-01-181-46/+39
| | | | | | Function* variable and smallptrset since function-local metadata cannot be cyclic llvm-svn: 93762
* reject some invalid IR. We already assert and reject this from theChris Lattner2010-01-181-0/+2
| | | | | | .ll parser, but PR6070 wants it in the verifier too. llvm-svn: 93756
* Make printing of metadata more robust when function is not found (which is ↵Victor Hernandez2010-01-181-1/+1
| | | | | | the normal situation for non function-local metadata) llvm-svn: 93748
* Update CMake files for Mangler move.Benjamin Kramer2010-01-161-1/+0
| | | | llvm-svn: 93665
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-161-104/+0
| | | | llvm-svn: 93664
* reapply the mangler gutting patch.Chris Lattner2010-01-161-183/+4
| | | | llvm-svn: 93656
* Revert 93648.Rafael Espindola2010-01-161-4/+183
| | | | | | | | Mangler::getMangledName is used from lto Mangler::setUseQuotes is used in the AsmPrinter Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter llvm-svn: 93652
* Mangler::getMangledName is now dead, remove it and all the other stuff in ↵Chris Lattner2010-01-161-183/+4
| | | | | | Mangler that is now transitively dead. woo. llvm-svn: 93648
* add an inefficient version of getNameWithPrefix that returns an std::string.Chris Lattner2010-01-161-0/+10
| | | | llvm-svn: 93641
* Remove the InlineHint attribute. There are no current or plannedEric Christopher2010-01-151-2/+0
| | | | | | users. llvm-svn: 93558
* Improve llvm.dbg.declare intrinsic by referring directly to the storage in ↵Victor Hernandez2010-01-153-4/+16
| | | | | | | | | its first argument, via function-local metadata (instead of via a bitcast). This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument. llvm-svn: 93531
* Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be ↵Victor Hernandez2010-01-151-4/+3
| | | | | | auto-upgraded llvm-svn: 93515
* Improve llvm.dbg.declare intrinsic by referring directly to the storage in ↵Victor Hernandez2010-01-151-3/+4
| | | | | | | | its first argument, via function-local metadata (instead of via a bitcast). This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. llvm-svn: 93504
* In debug builds, assert that function-local metadata has only 1 parent functionVictor Hernandez2010-01-141-1/+30
| | | | llvm-svn: 93449
* Fix printing of function-local metadata in AsmWriterVictor Hernandez2010-01-141-2/+3
| | | | llvm-svn: 93402
* Add MDNode::getFunction(), which figures out the metadata's function, if it ↵Victor Hernandez2010-01-141-0/+34
| | | | | | has function that it is local to. llvm-svn: 93400
* Introduce Twine::toStringRef, a variant of toVector which avoids the copy if theBenjamin Kramer2010-01-133-23/+9
| | | | | | | twine can be represented as a single StringRef. Use the new methode to simplify some twine users. llvm-svn: 93317
* don't add the \1 to the name.Chris Lattner2010-01-131-1/+1
| | | | llvm-svn: 93304
* add new isSingleStringRef()/getSingleStringRef() methods to twine, Chris Lattner2010-01-131-2/+7
| | | | | | | | and use them to avoid a copy of a string in getNameWithPrefix in the common case. It seems like Value::setName and other places should use this as well? llvm-svn: 93301
* ugh, my last patch just sped up a method and changed all the clientsChris Lattner2010-01-131-19/+51
| | | | | | | | that I want to completely eliminate. Add fixme's so I remember this in the future, and add the missing helper that they should be upgraded to use instead. llvm-svn: 93300
* change Mangler::makeNameProper to return its result in a SmallVectorChris Lattner2010-01-131-53/+66
| | | | | | | | | | | | instead of returning it in an std::string. Based on this change: 1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef 2. Change a bunch of targets to call makeNameProper with a smallstring, making several of them *much* more efficient. 3. Rewrite Mangler::makeNameProper to not build names and then prepend prefixes, not use temporary std::strings, and to avoid other crimes. llvm-svn: 93298
* my mistake, Mangler::makeNameProper wants to take a twine, not a stringref!Chris Lattner2010-01-131-2/+5
| | | | llvm-svn: 93296
OpenPOWER on IntegriCloud