aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* use PrintEscapedString to handle attribute section with escapes in it,Chris Lattner2010-07-071-6/+11
| | | | | | | | PR7399. The asm parser already handles this. This is of dubious utility (see the PR) but the asmprinter was clearly broken here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107834 91177308-0d34-0410-b5e6-96231b3b80d8
* Add fixme.Devang Patel2010-07-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107697 91177308-0d34-0410-b5e6-96231b3b80d8
* IndirectBr is not safe to speculatively execute (!)Dan Gohman2010-07-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107454 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-012-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". Currently only supported on Darwin platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
* reformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it ↵Gabor Greif2010-07-011-1/+3
| | | | | | work even if CallInst::op_* are private git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107390 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r107205 and r107207.Bill Wendling2010-06-292-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-292-0/+6
| | | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-291-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107145 91177308-0d34-0410-b5e6-96231b3b80d8
* encode operand initializations (at fixed index)Gabor Greif2010-06-291-12/+8
| | | | | | | | | in terms of Op<> and ArgOffset. This works for values of {0, 1} for ArgOffset. Please note that ArgOffset will become 0 soon and will go away eventually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107129 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant fold x == undef to undef.Dan Gohman2010-06-281-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107074 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Value::stripPointerCasts and BasicAA to avoid trouble onDan Gohman2010-06-281-1/+9
| | | | | | | | code in unreachable blocks, which have have use-def cycles. This fixes PR7514. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107071 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand accessorsGabor Greif2010-06-231-13/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106626 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand accessorsGabor Greif2010-06-231-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106623 91177308-0d34-0410-b5e6-96231b3b80d8
* use helper to neatly access argumentsGabor Greif2010-06-231-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106622 91177308-0d34-0410-b5e6-96231b3b80d8
* use high-level accessorsGabor Greif2010-06-221-12/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106573 91177308-0d34-0410-b5e6-96231b3b80d8
* warmup ritual: use high-level argument accessorsGabor Greif2010-06-221-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106563 91177308-0d34-0410-b5e6-96231b3b80d8
* Use single interface, using twine, to get named metadata.Devang Patel2010-06-221-5/+1
| | | | | | | getNamedMetadata(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106518 91177308-0d34-0410-b5e6-96231b3b80d8
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-212-3/+3
| | | | | | | SmallVector, and other SmallVector simplifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106452 91177308-0d34-0410-b5e6-96231b3b80d8
* Move several non-performance-critical member functinos out of line.Dan Gohman2010-06-212-0/+50
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106444 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy.Bob Wilson2010-06-191-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106383 91177308-0d34-0410-b5e6-96231b3b80d8
* Use separate named MDNode to hold each function's local variable info.Devang Patel2010-06-161-0/+7
| | | | | | | This speeds up local variable handling in DwarfDebug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106075 91177308-0d34-0410-b5e6-96231b3b80d8
* improve verifier error about unterminated block to includeChris Lattner2010-06-121-1/+2
| | | | | | | function name, patch by Yuri git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105887 91177308-0d34-0410-b5e6-96231b3b80d8
* Another place where the code wanted to access the argument list and not all ofBill Wendling2010-06-071-2/+2
| | | | | | | the operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105545 91177308-0d34-0410-b5e6-96231b3b80d8
* getFoldedOffsetOf no longer does anything special with vector types.Dan Gohman2010-06-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105514 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the logic behind CastInst::isNoopCast into a separate static function,Dan Gohman2010-05-281-5/+13
| | | | | | | as is done with most other cast opcode predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105008 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the restriction that the array size in an alloca must be i32.Dan Gohman2010-05-282-4/+4
| | | | | | | This will help reduce the amount of casting required on 64-bit targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104911 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic error checking to MemoryBuffer::getSTDIN.Dan Gohman2010-05-271-7/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104855 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for thiscall calling convention.Anton Korobeynikov2010-05-162-0/+4
| | | | | | Patch by Charles Davis and Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103902 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding a v8i64 512-bit vector type. This will be used to model ARM NEON ↵Evan Cheng2010-05-131-0/+6
| | | | | | intrinsics which translate into a pair of vld / vst instructions that can load / store 8 consecutive 64-bit (D) registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103746 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r103493, materializing functions in the regular PassManager.Dan Gohman2010-05-111-9/+1
| | | | | | | It works in simple cases, but it isn't a general solution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103499 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the regular pass manager how to materialize functions as needed.Dan Gohman2010-05-111-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103493 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify more.Chris Lattner2010-05-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103431 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify by using startswith instead of substr.Chris Lattner2010-05-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103430 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR7105 by enumerating MDNodes on all @llvm.fooChris Lattner2010-05-101-5/+10
| | | | | | | function calls, not just recognized intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103428 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6875:David Greene2010-05-101-15/+31
| | | | | | | | | | | | | | | | This includes a patch by Roman Divacky to fix the initial crash. Move the actual addition of passes from *PassManager::add to *PassManager::addImpl. That way, when adding printer passes we won't recurse infinitely. Finally, check to make sure that we are actually adding a FunctionPass to a FunctionPassManager before doing a print before or after it. Immutable passes are strange in this way because they aren't FunctionPasses yet they can be and are added to the FunctionPassManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103425 91177308-0d34-0410-b5e6-96231b3b80d8
* Minimally fix this code to not abort on mdnodes with integer dataDan Gohman2010-05-071-5/+7
| | | | | | | wider than 64 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103309 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a problem exposed by my previous commit and noticed by a release-assertsDuncan Sands2010-05-041-11/+3
| | | | | | | | | | buildbot: the debugging and non-debugging versions of getFunction were not functionally equivalent: the non-debugging version wrongly assumed that if a metadata operand was not metadata, then it had a non-null containing function. This is not true, since the operand might be a global value, constant etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103008 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a variant of PR6112 found by thinking about it: when doingDuncan Sands2010-05-041-7/+21
| | | | | | | | | | | RAUW of a global variable with a local variable in function F, if function local metadata M in function G was using the global then M would become function-local to both F and G, which is not allowed. See the testcase for an example. Fixed by detecting this situation and zapping the metadata operand when it occurs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103007 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the API compatibility layer which converted add, sub, and mulDan Gohman2010-05-032-27/+4
| | | | | | | | | to fadd, fsub, and fmul, when used with a floating-point type. LLVM has supported the new instructions since 2.6, so it's time to get on board. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102971 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix function prototype mismatch in LLVMUnionType(). Fixes PR7019.Nick Lewycky2010-05-031-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102959 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify metadata harder. In particular, check that moduleDuncan Sands2010-04-291-39/+60
| | | | | | | | level metadata does not have any function local operands. This would have caught the problem found in PR6112. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102620 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR6112 - When globalopt (or any other pass) does RAUW(@G, %G), Chris Lattner2010-04-281-2/+15
| | | | | | | | | metadata references in non-function-local MDNodes should drop to null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102519 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the palignr intrinsics now that we lower them to vector shuffles,Eric Christopher2010-04-201-1/+119
| | | | | | | | | shifts and null vectors. Autoupgrade these to what we'd lower them to. Add a testcase to exercise this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101851 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101779 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-165-52/+51
| | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101434Gabor Greif2010-04-165-51/+52
| | | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence an unused variable warning.Eric Christopher2010-04-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101438 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-165-52/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-155-51/+52
| | | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of namespace polution.Dan Gohman2010-04-153-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8