summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* "ghostify" the ilist<Function> sentinelGabor Greif2009-03-271-8/+0
| | | | llvm-svn: 67872
* Fix internal representation of fp80 to be theDale Johannesen2009-03-231-2/+22
| | | | | | | | | | same as a normal i80 {low64, high16} rather than its own {high64, low16}. A depressing number of places know about this; I think I got them all. Bitcode readers and writers convert back to the old form to avoid breaking compatibility. llvm-svn: 67562
* Now that errs() is properly non-buffered, there's no need toDan Gohman2009-03-231-3/+2
| | | | | | explicitly flush it. llvm-svn: 67526
* add a fastpath to ConstantExpr::getBitCast to handle the case when an obviouslyChris Lattner2009-03-211-0/+5
| | | | | | | | | unneeded bitcast is requested. This is common for frontends who just unconditionally cast even if the target is often the right type already. THis prevents going into getFoldedCast which switches on the opcode and does a bunch of other stuff before doing the same opzn. llvm-svn: 67435
* Fix a couple glaring whitespace issues. This file isn't internally consistentNick Lewycky2009-03-191-2/+2
| | | | | | either. llvm-svn: 67288
* typoGabor Greif2009-03-171-1/+1
| | | | llvm-svn: 67080
* Simplify. "Broken" is always true here.Nick Lewycky2009-03-151-1/+1
| | | | llvm-svn: 67025
* Remove obviously redundant call.Nick Lewycky2009-03-151-1/+1
| | | | llvm-svn: 67023
* Apply a patch by Micah Villmow to fix AsmParser to accept vectorDan Gohman2009-03-142-1/+7
| | | | | | | shift constant expressions, and add support for folding vector shift constant expressions. This fixes PR3802. llvm-svn: 67010
* Revert r66920. It was causing failures in the self-hosting buildbot (in releaseBill Wendling2009-03-133-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode). Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes --- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp llvm-svn: 66953
* Second installment of "BasicBlock operands to the back"Gabor Greif2009-03-133-9/+17
| | | | | | | | | | | | | | | | | | changes. For InvokeInst now all arguments begin at op_begin(). The Callee, Cont and Fail are now faster to get by access relative to op_end(). This patch introduces some temporary uglyness in CallSite. Next I'll bring CallInst up to a similar scheme and then the uglyness will magically vanish. This patch also exposes all the reliance of the libraries on InvokeInst's operand ordering. I am thinking of taking care of that too. llvm-svn: 66920
* Rearrange operands of the BranchInst, to be able toGabor Greif2009-03-123-30/+105
| | | | | | | | | | | | | | | | | | | | | | | | | access each with a fixed negative index from op_end(). This has two important implications: - getUser() will work faster, because there are less iterations for the waymarking algorithm to perform. This is important when running various analyses that want to determine callers of basic blocks. - getSuccessor() now runs faster, because the indirection via OperandList is not necessary: Uses corresponding to the successors are at fixed offset to "this". The price we pay is the slightly more complicated logic in the operator User::delete, as it has to pick up the information whether it has to free the memory of an original unconditional BranchInst or a BranchInst that was originally conditional, but has been shortened to unconditional. I was not able to come up with a nicer solution to this problem. (And rest assured, I tried *a lot*). Similar reorderings will follow for InvokeInst and CallInst. After that some optimizations to pred_iterator and CallSite will fall out naturally. llvm-svn: 66815
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-2/+1
| | | | | | linkage, so remove it. llvm-svn: 66690
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-111-2/+1
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Use WriteAsOperand instead of manually decorating the name for thisDan Gohman2009-03-101-11/+8
| | | | | | debug output. This improves the printing of anonymous values. llvm-svn: 66561
* make GlobalValue::removeDeadConstantUsers() const.Chris Lattner2009-03-091-7/+7
| | | | llvm-svn: 66403
* fix Analysis/BasicAA/2004-12-08-BasicAACrash.ll by allowing opaque types.Chris Lattner2009-03-091-2/+4
| | | | llvm-svn: 66395
* Fix PR3746 - Crash in isel with GEP of function pointerChris Lattner2009-03-091-13/+17
| | | | | | | | | | | by checking that the top-level type of a gep is sized. This causes us to reject the example with: llvm-as: t2.ll:2:16: invalid getelementptr indices getelementptr i32()* null, i32 1 ^ llvm-svn: 66393
* fix typoChris Lattner2009-03-081-1/+1
| | | | llvm-svn: 66367
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-10/+14
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* simplify the way how traits get hold of the symbol tableGabor Greif2009-03-071-5/+3
| | | | llvm-svn: 66336
* further simplifications arising from peruse of the more declarative interfaceGabor Greif2009-03-073-21/+0
| | | | llvm-svn: 66333
* Add Module::getNamedValue; use to normalize access to Module symbolDaniel Dunbar2009-03-061-19/+21
| | | | | | | table. - No functionality change. llvm-svn: 66289
* Sprinkle some PrettyStackEntry magic into the passmanager. With this, we nowChris Lattner2009-03-061-85/+99
| | | | | | | | | | | | | | | | get nice and happy stack traces when we crash in an optimizer or codegen. For example, an abort put in UnswitchLoops now looks like this: Stack dump: 0. Program arguments: clang pr3399.c -S -O3 1. <eof> parser at end of file 2. per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'pr3399.c'. 4. Running pass 'Loop Pass Manager' on function '@foo' 5. Running pass 'Unswitch loops' on basic block '%for.inc' Abort llvm-svn: 66260
* various cosmetic cleanups.Chris Lattner2009-03-061-136/+107
| | | | llvm-svn: 66254
* Fix a bunch of Doxygen syntax issues. Escape special characters,Dan Gohman2009-03-031-9/+9
| | | | | | and put @file directives on their own comment line. llvm-svn: 65920
* Another sentinel optimization. This one should alwaysGabor Greif2009-03-011-7/+0
| | | | | | be a win, since almost every interesting function has at least one Argument. llvm-svn: 65778
* Reuse a technique (pioneered for BasicBlocks) of superposing ilist withGabor Greif2009-03-011-7/+0
| | | | | | | | | | | | its sentinel. This is quite a win when a function really has a basic block. When the function is just a declaration (and stays so) the old way did not allocate a sentinel. So this change is most beneficial when the ratio of function definition to declaration is high. I.e. linkers etc. Incidentally these are the most resource demanding applications, so I expect that the reduced malloc traffic, locality and space savings outweigh the cost of addition of two pointers to Function. llvm-svn: 65776
* simplify handling "don't print top level name" processing, so that we getChris Lattner2009-03-011-37/+19
| | | | | | stuff like %A = type { %A*} instead of an upref. llvm-svn: 65748
* walk type symbol table also, so we get:Chris Lattner2009-03-011-2/+10
| | | | | | | | | | | | | type opaque ; type %0 %C = type { %0, %0 } instead of: %C = type { opaque, opaque } when appropriate. llvm-svn: 65742
* Fix a long-standing bug and misfeature of the disassembler: when dealing with a Chris Lattner2009-03-011-12/+122
| | | | | | | | | | | | | | stripped .bc file, it didn't make any attempt to try to reuse anonymous types. This causes an amazing type explosion due to types getting duplicated everywhere they are referenced and other problems. This also caused correctness issues, because opaque types are unique for each time they are uttered in the file. This means that stripping a .bc file could produce a .ll file that could not be assembled (e.g. 2009-02-28-StripOpaqueName.ll). This patch fixes both of these issues. llvm-svn: 65738
* move type name population out of TypePrinting class into a static Chris Lattner2009-02-281-36/+51
| | | | | | AsmWriter.cpp method. llvm-svn: 65736
* switch to densemap for pointer->word map.Chris Lattner2009-02-281-9/+9
| | | | llvm-svn: 65735
* delete a bunch of duplicated type printing logic, using the type printingChris Lattner2009-02-281-152/+16
| | | | | | stuff in AsmWriter.cpp for Type::getDescription(). llvm-svn: 65734
* make this work when constructed with a null module*Chris Lattner2009-02-281-2/+1
| | | | llvm-svn: 65733
* expose TypePrinting as a public API.Chris Lattner2009-02-281-23/+24
| | | | llvm-svn: 65729
* rename 'Result' to 'OS' in CalcTypeName for consistencyChris Lattner2009-02-281-37/+37
| | | | llvm-svn: 65724
* do not embed the raw_ostream into TypePrinting, pass it as an argument to ↵Chris Lattner2009-02-281-52/+43
| | | | | | print etc. llvm-svn: 65723
* stop calling Type::getDescription().Chris Lattner2009-02-281-12/+15
| | | | llvm-svn: 65722
* simplificationsChris Lattner2009-02-281-6/+8
| | | | llvm-svn: 65721
* Change WriteTypeSymbolic to not put a space out before types, also, removeChris Lattner2009-02-282-20/+11
| | | | | | the old std::ostream version. llvm-svn: 65720
* make CalcTypeName take a stream instead of a string to concat onto,Chris Lattner2009-02-281-55/+49
| | | | | | eliminate redundant opaque handling code. llvm-svn: 65716
* remove a bunch of nearly-duplicated code.Chris Lattner2009-02-281-63/+18
| | | | llvm-svn: 65715
* fix indentation, remove dead integer case.Chris Lattner2009-02-281-64/+59
| | | | llvm-svn: 65714
* pull calcTypeName into TypePrinting class, make its type stackChris Lattner2009-02-281-12/+16
| | | | | | be a smallvector instead of vector. llvm-svn: 65713
* inline method into its only use and simplify the result.Chris Lattner2009-02-281-11/+4
| | | | llvm-svn: 65712
* simplify conditionChris Lattner2009-02-281-7/+10
| | | | llvm-svn: 65711
* start refactoring the .ll printer: introduce a new TypePrinting classChris Lattner2009-02-281-310/+302
| | | | | | and move all related stuff to it. llvm-svn: 65710
* Introduce a new technique for merging BasicBlock with Instruction sentinel ↵Gabor Greif2009-02-271-34/+0
| | | | | | | | | by superposition. This looks dangerous, but isn't because the sentinel is accessed in special way only, namely the Next and Prev fields of it, and these are guaranteed to exist. llvm-svn: 65626
* Added support to have TableGen provide information if an intrinsic (coreMon P Wang2009-02-241-0/+10
| | | | | | or target) can be overloaded or not. llvm-svn: 65404
OpenPOWER on IntegriCloud