| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
verifier does. This correctly handles invoke.
Thanks to Duncan, Andrew and Chris for the comments.
Thanks to Joerg for the early testing.
llvm-svn: 151469
|
|
|
|
|
|
| |
'gep null' when the icmp predicate is unsigned (or is signed without inbounds).
llvm-svn: 151467
|
|
|
|
| |
llvm-svn: 151466
|
|
|
|
|
|
| |
MultiSource/Applications/lua.
llvm-svn: 151463
|
|
|
|
|
|
|
| |
equal if both are null. In the test, scope type %t and global @y by adding a
'gep' prefix to them.
llvm-svn: 151452
|
|
|
|
| |
llvm-svn: 151450
|
|
|
|
|
|
|
| |
by using llvm::isIdentifiedObject. Also teach it to handle GEPs that have
the same base pointer and constant operands. Fixes PR11238!
llvm-svn: 151449
|
|
|
|
|
|
| |
function that others can use, next to llvm::isIdentifiedObject.
llvm-svn: 151446
|
|
|
|
|
|
| |
code, gep chains can be infinite. Just like "stripPointerCasts", use a set to keep track of visited instructions so we don't recurse infinitely.
llvm-svn: 151383
|
|
|
|
| |
llvm-svn: 151238
|
|
|
|
| |
llvm-svn: 151169
|
|
|
|
| |
llvm-svn: 151127
|
|
|
|
|
|
|
|
| |
the dominance once the dominates method is fixed and why we can use the builder's
insertion point.
Fixes pr12048.
llvm-svn: 151125
|
|
|
|
| |
llvm-svn: 151079
|
|
|
|
| |
llvm-svn: 151026
|
|
|
|
| |
llvm-svn: 151025
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
know where users will be added. Because of this, it cannot use
Builder.GetInsertPoint at all.
This patch
* removes the FIXME about adding the assert.
* adds a comment explaining hy we don't have one.
* removes a broken logic that only works for some callers and is not needed
since r150884.
* adds an assert to caller that would have caught the bug fixed by r150884.
llvm-svn: 151015
|
|
|
|
|
|
| |
derived from anything.
llvm-svn: 150975
|
|
|
|
|
|
| |
too.
llvm-svn: 150974
|
|
|
|
| |
llvm-svn: 150973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementing PR12013. We now compile the testcase to:
__Z4testv: ## @_Z4testv
## BB#0: ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
pushq %rbx
subq $64, %rsp
leaq 32(%rsp), %rbx
movq %rbx, (%rsp)
leaq 64(%rsp), %rax
movq %rax, 16(%rsp)
movl $1, 32(%rsp)
leaq 36(%rsp), %rax
movq %rax, 8(%rsp)
leaq (%rsp), %rdi
callq __Z1gRN4llvm11SmallVectorIiLj8EEE
movq (%rsp), %rdi
cmpq %rbx, %rdi
je LBB0_2
## BB#1:
callq _free
LBB0_2: ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
addq $64, %rsp
popq %rbx
ret
instead of:
__Z4testv: ## @_Z4testv
## BB#0:
pushq %rbx
subq $64, %rsp
xorl %eax, %eax
leaq (%rsp), %rbx
addq $32, %rbx
movq %rbx, (%rsp)
movq %rbx, 8(%rsp)
leaq 64(%rsp), %rcx
movq %rcx, 16(%rsp)
je LBB0_2
## BB#1:
movl $1, 32(%rsp)
movq %rbx, %rax
LBB0_2: ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
addq $4, %rax
movq %rax, 8(%rsp)
leaq (%rsp), %rdi
callq __Z1gRN4llvm11SmallVectorIiLj8EEE
movq (%rsp), %rdi
cmpq %rbx, %rdi
je LBB0_4
## BB#3:
callq _free
LBB0_4: ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
addq $64, %rsp
popq %rbx
ret
This doesn't shrink clang noticably though.
llvm-svn: 150944
|
|
|
|
|
|
| |
building bullet.
llvm-svn: 150885
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the cast. If we do, we can end up with
inst1
--------------- < Insertion point
dbg inst
new inst
instead of the desired
inst1
new inst
--------------- < Insertion point
dbg inst
Another option would be for InsertNoopCastOfTo (or its callers) to move the
insertion point and we would end up with
inst1
dbg inst
new inst
--------------- < Insertion point
but that complicates the callers. This fixes PR12018 (and firefox's build).
llvm-svn: 150884
|
|
|
|
|
|
| |
LHS->stripPointerCasts() != RHS->stripPointerCasts().
llvm-svn: 150863
|
|
|
|
|
|
|
|
| |
actually work, at least as described. LLVM Metadata is not
intended to suppress LLVM IR rules, as it can be stripped at
any time.
llvm-svn: 150821
|
|
|
|
| |
llvm-svn: 150796
|
|
|
|
|
|
|
| |
Turns out this isn't safe, because the code below depends on LHS and RHS having
the same type.
llvm-svn: 150695
|
|
|
|
| |
llvm-svn: 150694
|
|
|
|
|
|
| |
pointers.
llvm-svn: 150690
|
|
|
|
| |
llvm-svn: 150249
|
|
|
|
|
|
| |
don't assume it is a boolean.
llvm-svn: 150247
|
|
|
|
|
|
|
|
| |
can rauw forward declarations if we decide to emit the full type.
Part of rdar://10809898
llvm-svn: 150024
|
|
|
|
| |
llvm-svn: 150022
|
|
|
|
| |
llvm-svn: 149967
|
|
|
|
|
|
|
|
|
| |
(GVN).
The problem initially reported by Mozilla folks (http://code.google.com/p/address-sanitizer/issues/detail?id=20),
but it also prevents us from enabling LLVM bootstrap with AddressSanitizer.
llvm-svn: 149925
|
|
|
|
|
|
| |
instead of always using ConstantVector.
llvm-svn: 149912
|
|
|
|
|
|
|
| |
were no 'unwind' instructions being generated before this, so this is in effect
a no-op.
llvm-svn: 149906
|
|
|
|
|
|
| |
remove the code that handles them.
llvm-svn: 149901
|
|
|
|
|
|
| |
an ivar.
llvm-svn: 149874
|
|
|
|
| |
llvm-svn: 149834
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 149758
|
|
|
|
|
|
| |
add a blank line.
llvm-svn: 149757
|
|
|
|
| |
llvm-svn: 149732
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test to fail.
These are:
r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365
llvm-svn: 149470
|
|
|
|
| |
llvm-svn: 149356
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
width.
llvm-svn: 149151
|
|
|
|
|
|
|
| |
Unfortunately I also had to disable constant-pool-sharing.ll the code it tests has been
updated to use the IL logic.
llvm-svn: 149148
|