| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
reassociation opportunities are exposed. This fixes a bug where
the nested reassociation expects to be the IR to be consistent,
but it isn't, because the outer reassociation has disconnected
some of the operands. rdar://9167457
llvm-svn: 129324
|
|
|
|
|
|
|
|
| |
Value, not an Instruction, so casting is not necessary. Also,
it's theoretically possible that the Value is not an
Instruction, since WeakVH follows RAUWs.
llvm-svn: 127427
|
|
|
|
|
|
|
|
|
|
| |
after it has finished all of its reassociations, because its
habit of unlinking operands and holding them in a datastructure
while working means that it's not easy to determine when an
instruction is really dead until after all its regular work is
done. rdar://9096268.
llvm-svn: 127424
|
|
|
|
|
|
| |
it swaps the LHS/RHS of a single binop.
llvm-svn: 125700
|
|
|
|
| |
llvm-svn: 124712
|
|
|
|
|
|
|
|
| |
operand being factorized (and erased) could occur several times in Ops,
resulting in freed memory being used when the next occurrence in Ops was
analyzed.
llvm-svn: 124287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 116820
|
|
|
|
| |
llvm-svn: 115996
|
|
|
|
| |
llvm-svn: 110460
|
|
|
|
| |
llvm-svn: 110410
|
|
|
|
|
|
|
|
| |
address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
|
|
|
|
| |
llvm-svn: 109045
|
|
|
|
| |
llvm-svn: 108138
|
|
|
|
|
|
|
| |
in a very specific use pattern embodied in the carefully
reduced testcase.
llvm-svn: 97794
|
|
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
|
|
|
|
|
| |
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
|
|
|
| |
llvm-svn: 95781
|
|
|
|
|
|
|
|
|
|
| |
short-circuited conditions to AND/OR expressions, and those expressions
are often converted back to a short-circuited form in code gen. The
original source order may have been optimized to take advantage of the
expected values, and if we reassociate them, we change the order and
subvert that optimization. Radar 7497329.
llvm-svn: 95333
|
|
|
|
|
|
| |
base is the right expression type. This fixes PR5981.
llvm-svn: 93045
|
|
|
|
|
|
| |
remove some trailing whitespace while there.
llvm-svn: 93008
|
|
|
|
| |
llvm-svn: 92679
|
|
|
|
| |
llvm-svn: 92617
|
|
|
|
|
|
| |
for this case.
llvm-svn: 92425
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
positive and negative forms of constants together. This
allows us to compile:
int foo(int x, int y) {
return (x-y) + (x-y) + (x-y);
}
into:
_foo: ## @foo
subl %esi, %edi
leal (%rdi,%rdi,2), %eax
ret
instead of (where the 3 and -3 were not factored):
_foo:
imull $-3, 8(%esp), %ecx
imull $3, 4(%esp), %eax
addl %ecx, %eax
ret
this started out as:
movl 12(%ebp), %ecx
imull $3, 8(%ebp), %eax
subl %ecx, %eax
subl %ecx, %eax
subl %ecx, %eax
ret
This comes from PR5359.
llvm-svn: 92381
|
|
|
|
| |
llvm-svn: 92377
|
|
|
|
| |
llvm-svn: 92375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to optimize test12 into:
define i32 @test12(i32 %X) {
%factor = mul i32 %X, -3 ; <i32> [#uses=1]
%Z = add i32 %factor, 6 ; <i32> [#uses=1]
ret i32 %Z
}
instead of:
define i32 @test12(i32 %X) {
%Y = sub i32 6, %X ; <i32> [#uses=1]
%C = sub i32 %Y, %X ; <i32> [#uses=1]
%Z = sub i32 %C, %X ; <i32> [#uses=1]
ret i32 %Z
}
llvm-svn: 92373
|
|
|
|
|
|
| |
sorted, so we can just do a linear scan.
llvm-svn: 92372
|
|
|
|
| |
llvm-svn: 92370
|
|
|
|
| |
llvm-svn: 92369
|
|
|
|
|
|
| |
fix RemoveDeadBinaryOp to actually do something.
llvm-svn: 92368
|
|
|
|
|
|
| |
instead of std::vector.
llvm-svn: 92366
|
|
|
|
| |
llvm-svn: 92364
|
|
|
|
|
|
| |
improve some comments, simplify a bit of code.
llvm-svn: 92363
|
|
|
|
| |
llvm-svn: 92362
|
|
|
|
|
|
| |
miscompilation, PR5458.
llvm-svn: 92354
|
|
|
|
| |
llvm-svn: 92347
|
|
|
|
| |
llvm-svn: 92346
|
|
|
|
| |
llvm-svn: 92344
|
|
|
|
| |
llvm-svn: 92343
|
|
|
|
|
|
| |
ultimately never used.
llvm-svn: 88763
|
|
|
|
|
|
|
| |
Most changes are cleanup, but there is 1 correctness fix:
I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects).
llvm-svn: 84772
|
|
|
|
| |
llvm-svn: 84299
|
|
|
|
|
|
|
|
| |
Update testcases that rely on malloc insts being present.
Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.
llvm-svn: 84292
|
|
|
|
| |
llvm-svn: 82933
|
|
|
|
|
|
|
|
| |
calls as to MallocInst.
Reviewed by Dan Gohman.
llvm-svn: 82300
|
|
|
|
| |
llvm-svn: 80766
|
|
|
|
| |
llvm-svn: 79823
|
|
|
|
|
|
| |
This required converting a bunch of stuff off DOUT and other cleanups.
llvm-svn: 79819
|
|
|
|
|
|
| |
that Value's operator<< doesn't include one.
llvm-svn: 79240
|