aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unneeded zero arrays.Benjamin Kramer2010-12-041-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120910 91177308-0d34-0410-b5e6-96231b3b80d8
* Apparently APFloat::getZero doesn't like PPCDoubleDoubles.Benjamin Kramer2010-12-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120909 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. No functionality change.Benjamin Kramer2010-12-041-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120907 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-296-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* add a function to the C api to get the context out of a module, patchChris Lattner2010-11-281-0/+6
| | | | | | | | by Eric Dobson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120259 91177308-0d34-0410-b5e6-96231b3b80d8
* add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,Chris Lattner2010-11-231-0/+8
| | | | | | | patch by Greg Pfeil! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119989 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. No change in functionality.Benjamin Kramer2010-11-201-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119908 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an order-of-deallocation issue where the AttrListImpl could be ↵Owen Anderson2010-11-181-2/+7
| | | | | | | | | deallocated before the global LLVMContext, causing memory errors. Patch by Peter Collingbourne. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119721 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hasConstantValue has been made simpler, it may return theDuncan Sands2010-11-171-4/+5
| | | | | | | | phi node itself if it occurs in an unreachable basic block. Protect against this. Hopefully this will fix some more buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119493 91177308-0d34-0410-b5e6-96231b3b80d8
* now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate theChris Lattner2010-11-172-6/+8
| | | | | | | | | cookie argument to the SourceMgr diagnostic stuff. This cleanly separates LLVMContext's inlineasm handler from the sourcemgr error handling definition, increasing type safety and cleaning things up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR8613 - Copy constructor of SwitchInst does not call SwitchInst::initChris Lattner2010-11-171-8/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119463 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a layering violation: hasConstantValue, which is part of the PHINodeDuncan Sands2010-11-171-56/+7
| | | | | | | | | | | | | | | class, uses DominatorTree which is an analysis. This change moves all of the tricky hasConstantValue logic to SimplifyInstruction, and replaces it with a very simple literal implementation. I already taught users of hasConstantValue that need tricky stuff to use SimplifyInstruction instead. I didn't update InlineFunction because the IR looks like it might be in a funky state at the point it calls hasConstantValue, which makes calling SimplifyInstruction dangerous since it can in theory do a lot of tricky reasoning. This may be a pessimization, for example in the case where all phi node operands are either undef or a fixed constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119459 91177308-0d34-0410-b5e6-96231b3b80d8
* If dom tree information is available, make it possible to passDuncan Sands2010-11-141-1/+1
| | | | | | | it to get better phi node simplification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119055 91177308-0d34-0410-b5e6-96231b3b80d8
* DoxygenifyNick Lewycky2010-11-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118846 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out Instruction::isSafeToSpeculativelyExecute's code forDan Gohman2010-11-112-18/+58
| | | | | | | | | | | | | testing for dereferenceable pointers into a helper function, isDereferenceablePointer. Teach it how to reason about GEPs with simple non-zero indices. Also eliminate ArgumentPromtion's IsAlwaysValidPointer, which didn't check for weak externals or out of range gep indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118840 91177308-0d34-0410-b5e6-96231b3b80d8
* Include ImmutablePass passes in -debug-pass=Arguments.Dan Gohman2010-11-111-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118790 91177308-0d34-0410-b5e6-96231b3b80d8
* Last try to get this reference counting right, I swear.Owen Anderson2010-11-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118589 91177308-0d34-0410-b5e6-96231b3b80d8
* Really fix the leak in the attributes list. Thanks to Benjamin Kramer for ↵Owen Anderson2010-11-091-2/+2
| | | | | | pointing out how I was being stupid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118588 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix leak in my recent fix for PR8442.Owen Anderson2010-11-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118490 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8441, a race condition in the static attributes list. While the ↵Owen Anderson2010-11-091-5/+12
| | | | | | | | | reference counting was itself threadsafe, the implicit removal of each object from the global list was not. Make this operation atomic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118461 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply patch for use-after-free in InlineAsm constant handling,Dale Johannesen2010-11-021-0/+1
| | | | | | | | | | PR 8522 / 8616046. Test reduction, analysis and patch by Tim Deegan! (However, review by someone who understands the classes here better is welcome. John Krum will return!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118030 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline asm multiple alternative constraints development phase 2 - improved ↵John Thompson2010-10-291-5/+5
| | | | | | basic logic, added initial platform support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117667 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-opCharles Davis2010-10-251-0/+2
| | | | | | | | instruction at the beginning of each function that has the attribute, allowing the function to be easily hooked and/or patched. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117264 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some symbols static, move classes into anonymous namespaces.Benjamin Kramer2010-10-222-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117111 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix valgrind complaining about (benign) leaks in pass ↵Owen Anderson2010-10-201-2/+14
| | | | | | | | | registration by having PassRegistry delete PassInfo objects that were created using new-style initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116959 91177308-0d34-0410-b5e6-96231b3b80d8
* Add RegionPass support.Tobias Grosser2010-10-201-0/+3
| | | | | | | A RegionPass is executed like a LoopPass but on the regions detected by the RegionInfo pass instead of the loops detected by the LoopInfo pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116905 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-3/+9
| | | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
* std::string cleanup.Benjamin Kramer2010-10-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116686 91177308-0d34-0410-b5e6-96231b3b80d8
* Build with RTTI and exceptions disabled. Only in GCC for now.Oscar Fuentes2010-10-171-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116682 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-122-2/+8
| | | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116334 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a redundant check.Dan Gohman2010-10-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116280 91177308-0d34-0410-b5e6-96231b3b80d8
* More SmallVectorImpls.Dan Gohman2010-10-122-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116279 91177308-0d34-0410-b5e6-96231b3b80d8
* Shrink a SmallVector with a known maximum size.Dan Gohman2010-10-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116278 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify.Dan Gohman2010-10-121-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116277 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SmallVectorImpl in a bunch of places.Dan Gohman2010-10-121-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116276 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the pass manager's search order for immutable passes, and make itDan Gohman2010-10-111-22/+21
| | | | | | | stop searching when it has found a match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116262 91177308-0d34-0410-b5e6-96231b3b80d8
* Now with fewer extraneous semicolons!Owen Anderson2010-10-073-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initialization routines for VMCore.Owen Anderson2010-10-071-2/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115963 91177308-0d34-0410-b5e6-96231b3b80d8
* Next step on the getting-rid-of-static-ctors train: begin adding per-libraryOwen Anderson2010-10-071-0/+5
| | | | | | | | initialization functions that initialize the set of passes implemented in that library. Add C bindings for these functions as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115927 91177308-0d34-0410-b5e6-96231b3b80d8
* Another step towards getting rid of static ctors for pass registration: have ↵Owen Anderson2010-10-051-1/+0
| | | | | | | | | | | INITIALIZE_PASS AND INITIALIZE_AG_PASS expand to an initializeMyPass() function (in additional to the extant static ctors). Eventually, these will be called from a big InitializeAllPasses() function, and the PassInfo's they create (which would be leaked if this code were used at the moment) will be handed off to a PassRegistry for ownership. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115703 91177308-0d34-0410-b5e6-96231b3b80d8
* The pshufw instruction came about in MMX2 when SSE was introduced. Don't placeBill Wendling2010-10-041-7/+37
| | | | | | | | | | it in with the SSSE3 instructions. Steward! Could you place this chair by the aft sun deck? I'm trying to get away from the Astors. They are such boors! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115552 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup. Get rid of extraneous variable.Bill Wendling2010-10-031-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115453 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to outwit overly smart compiler.Dale Johannesen2010-10-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115251 91177308-0d34-0410-b5e6-96231b3b80d8
* Massive rewrite of MMX: Dale Johannesen2010-09-303-57/+506
| | | | | | | | | | | | | | | | | | | | | The x86_mmx type is used for MMX intrinsics, parameters and return values where these use MMX registers, and is also supported in load, store, and bitcast. Only the above operations generate MMX instructions, and optimizations do not operate on or produce MMX intrinsics. MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into smaller pieces. Optimizations may occur on these forms and the result casted back to x86_mmx, provided the result feeds into a previous existing x86_mmx operation. The point of all this is prevent optimizations from introducing MMX operations, which is unsafe due to the EMMS problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115243 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow llvm.gcroot to work with non-pointer allocas.Talin2010-09-301-2/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115198 91177308-0d34-0410-b5e6-96231b3b80d8
* When an MDNode changes to become identical to another MDNode,Dan Gohman2010-09-281-5/+4
| | | | | | | | | | | | delete the MDNode that changed, rather than the other MDNode. This is less work, because it doesn't require the changed node to be re-inserted into the uniquing map and it doesn't require the is-function-local flag to be recomputed. Also, it avoids trouble when the existing node is part of a complicated data structure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114996 91177308-0d34-0410-b5e6-96231b3b80d8
* Scope a varible inside an if statement, to make it clear thatDan Gohman2010-09-281-3/+1
| | | | | | | it's not used afterwards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114986 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this code 65-bit clean.Dan Gohman2010-09-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114828 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ret instruction to PTX backendChe-Liang Chiou2010-09-252-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114788 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the PassRegistry mutex to be lazily initialized, and clean up the ↵Owen Anderson2010-09-161-10/+10
| | | | | | global namespace at the same time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114131 91177308-0d34-0410-b5e6-96231b3b80d8