- May 01, 2011
-
-
Chris Lattner authored
problem reported on cfe-dev. llvm-svn: 130661
-
- Apr 30, 2011
-
-
Benjamin Kramer authored
This obviously helps a lot if the division would be turned into a libcall (think i64 udiv on i386), but div is also one of the few remaining instructions on modern CPUs that become more expensive when the bitwidth gets bigger. This also helps register pressure on i386 when dividing chars, divb needs two 8-bit parts of a 16 bit register as input where divl uses two registers. int foo(unsigned char a) { return a/10; } int bar(unsigned char a, unsigned char b) { return a/b; } compiles into (x86_64) _foo: imull $205, %edi, %eax shrl $11, %eax ret _bar: movzbl %dil, %eax divb %sil, %al movzbl %al, %eax ret llvm-svn: 130615
-
Benjamin Kramer authored
This folds away silly stuff like (a&255)/1000 -> 0. llvm-svn: 130614
-
Devang Patel authored
llvm-svn: 130551
-
- Apr 29, 2011
-
-
Devang Patel authored
llvm-svn: 130536
-
Peter Collingbourne authored
llvm-svn: 130528
-
Peter Collingbourne authored
llvm-svn: 130527
-
Peter Collingbourne authored
llvm-svn: 130526
-
Benjamin Kramer authored
llvm-svn: 130489
-
Benjamin Kramer authored
Fixes PR9809. llvm-svn: 130485
-
Devang Patel authored
llvm-svn: 130450
-
- Apr 28, 2011
-
-
Benjamin Kramer authored
This shouldn't happen in practice because the icmp would be a constant. Add a check so we don't miscompile code if something goes wrong. llvm-svn: 130446
-
Nick Lewycky authored
between two reads (threading). Fix an off-by-one in the indirect counter table that I meant to revert after an earlier experiment. Whoops! Implement GCOV_PREFIX. Doesn't handle GCOV_PREFIX_STRIP yet. Fix an off-by-one in string emission. Extra whoops! Tolerate DISubprograms that have null Function*'s attached to them. I don't yet understand what this means, but it happens when you have a global static with a non-trivial constructor/destructor. Fix a crash on switch statements with a single successor (default-only). llvm-svn: 130443
-
Devang Patel authored
llvm-svn: 130431
-
Benjamin Kramer authored
llvm-svn: 130428
-
Chris Lattner authored
llvm-svn: 130426
-
Devang Patel authored
llvm-svn: 130419
-
Chris Lattner authored
a nice and tidy: %x1 = load i32* %0, align 4 %1 = icmp eq i32 %x1, 1179403647 br i1 %1, label %if.then, label %if.end instead of doing lots of loads and branches. May the FreeBSD bootloader long fit in its allocated space. llvm-svn: 130416
-
Chris Lattner authored
llvm-svn: 130414
-
Andrew Trick authored
llvm-svn: 130408
-
Benjamin Kramer authored
This happens when GVN widens loads. Part of PR6627. llvm-svn: 130405
-
Chris Lattner authored
static functions instead of passing around tons of random ivars. llvm-svn: 130403
-
Chris Lattner authored
llvm-svn: 130401
-
Chris Lattner authored
wider load would allow elimination of subsequent loads, and when the wider load is still a native integer type. This eliminates a ton of loads on various benchmarks involving struct fields, though it is somewhat hobbled by clang not being very aggressive about field alignment. This is yet another step along the way towards resolving PR6627. llvm-svn: 130390
-
Andrew Trick authored
llvm-svn: 130350
-
Andrew Trick authored
Modified LinearFunctionTestReplace to push the condition on the dead list instead of eagerly deleting it. This can cause unnecessary IV rewrites, which should have no effect on codegen and will not be an issue once we stop generating canonical IVs. llvm-svn: 130340
-
- Apr 27, 2011
-
-
Devang Patel authored
Simplify cfg inserts a call to trap when unreachable code is detected. Assign DebugLoc to this new trap instruction. llvm-svn: 130315
-
Duncan Sands authored
effective in avoiding recomputation of LCSSA form; the widespread use of instsimplify (which looks through phi nodes) means it was not preserving LCSSA form anyway; and instcombine is no longer scheduled in the middle of the loop passes so this doesn't matter anymore. llvm-svn: 130301
-
- Apr 26, 2011
-
-
Chris Lattner authored
when X has multiple uses. This is useful for exposing secondary optimizations, but the X86 backend isn't ready for this when X has a single use. For example, this can disable load folding. This is inching towards resolving PR6627. llvm-svn: 130238
-
Chris Lattner authored
llvm-svn: 130237
-
Chris Lattner authored
translation fails. We were bailing out in some cases that would cause us to miss GVN'ing some non-local cases away. llvm-svn: 130206
-
Nick Lewycky authored
Add support for switch and indirectbr edges. This works by densely numbering all blocks which have such terminators, and then separately numbering the possible successors. The predecessors write down a number, the successor knows its own number (as a ConstantInt) and sends that and the pointer to the number the predecessor wrote down to the runtime, who looks up the counter in a per-function table. Coverage data should now be functional, but I haven't tested it on anything other than my 2-file synthetic test program for coverage. llvm-svn: 130186
-
Chris Lattner authored
return it as a clobber. This allows GVN to do smart things. Enhance GVN to be smart about the case when a small load is clobbered by a larger overlapping load. In this case, forward the value. This allows us to compile stuff like this: int test(void *P) { int tmp = *(unsigned int*)P; return tmp+*((unsigned char*)P+1); } into: _test: ## @test movl (%rdi), %ecx movzbl %ch, %eax addl %ecx, %eax ret which has one load. We already handled the case where the smaller load was from a must-aliased base pointer. llvm-svn: 130180
-
- Apr 23, 2011
-
-
Jay Foad authored
llvm-svn: 130068
-
- Apr 21, 2011
-
-
Jay Foad authored
llvm-svn: 129932
-
Nick Lewycky authored
necessary since gcov counts transitions between blocks. It can't see if you've run every line in a straight-line function, so we add an edge for it to notice. llvm-svn: 129905
-
Nick Lewycky authored
comment for 80 columns. llvm-svn: 129904
-
Nick Lewycky authored
instrument the program to emit .gcda. TODO: we should emit slightly different .gcda files when .gcno emission is off. llvm-svn: 129903
-
- Apr 20, 2011
-
-
rdar://problem/9184212Cameron Zwarich authored
generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float vector on ARM rather than an i64 array like Clang. llvm-svn: 129878
-
Cameron Zwarich authored
delete it. llvm-svn: 129877
-