| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 25203
|
| |
|
|
|
|
| |
Patch written by Daniel Berlin!
llvm-svn: 25202
|
| |
|
|
|
|
| |
Patch written by Daniel Berlin!
llvm-svn: 25201
|
| |
|
|
| |
llvm-svn: 25181
|
| |
|
|
| |
llvm-svn: 25180
|
| |
|
|
| |
llvm-svn: 25153
|
| |
|
|
| |
llvm-svn: 25137
|
| |
|
|
| |
llvm-svn: 25130
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the shifts.
This allows us to fold this (which is the 'integer add a constant' sequence
from cozmic's scheme compmiler):
int %x(uint %anf-temporary776) {
%anf-temporary777 = shr uint %anf-temporary776, ubyte 1
%anf-temporary800 = cast uint %anf-temporary777 to int
%anf-temporary804 = shl int %anf-temporary800, ubyte 1
%anf-temporary805 = add int %anf-temporary804, -2
%anf-temporary806 = or int %anf-temporary805, 1
ret int %anf-temporary806
}
into this:
int %x(uint %anf-temporary776) {
%anf-temporary776 = cast uint %anf-temporary776 to int
%anf-temporary776.mask1 = add int %anf-temporary776, -2
%anf-temporary805 = or int %anf-temporary776.mask1, 1
ret int %anf-temporary805
}
note that instcombine already knew how to eliminate the AND that the two
shifts fold into. This is tested by InstCombine/shift.ll:test26
-Chris
llvm-svn: 25128
|
| |
|
|
| |
llvm-svn: 25126
|
| |
|
|
|
|
| |
functionality changes.
llvm-svn: 25125
|
| |
|
|
|
|
|
|
| |
read the code.
Do not internalize debugger anchors.
llvm-svn: 25067
|
| |
|
|
| |
llvm-svn: 25021
|
| |
|
|
|
|
| |
behavior in 126.gcc on big-endian systems.
llvm-svn: 24708
|
| |
|
|
|
|
|
|
|
| |
a) use better local variable names (OldMT -> OldFT) where "M" is used to
mean "Function" (perhaps it was previously "Method"?)
b) print out the module identifier in a warning message so that it is
possible to track down in which module the error occurred.
llvm-svn: 24698
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
186.crafty by about 16% (from 15.109s to 13.045s) on my system.
This turns allocas with unions/casts into scalars. For example crafty has
something like this:
union doub {
unsigned short i[4];
long long d;
};
int f(long long a) {
return ((union doub){.d=a}).i[1];
}
Instead of generating loads and stores to an alloca, we now promote the
whole thing to a scalar long value.
This implements: Transforms/ScalarRepl/AggregatePromote.ll
llvm-svn: 24667
|
| |
|
|
|
|
|
| |
know that small negative values fit into the immediate field of addressing
modes.
llvm-svn: 24608
|
| |
|
|
| |
llvm-svn: 24602
|
| |
|
|
| |
llvm-svn: 24581
|
| |
|
|
|
|
| |
Transforms/DeadStoreElimination/2005-11-30-vaarg.ll
llvm-svn: 24545
|
| |
|
|
| |
llvm-svn: 24500
|
| |
|
|
|
|
| |
old ones have been updated to implement the interface.
llvm-svn: 24499
|
| |
|
|
| |
llvm-svn: 24496
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).
The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are). These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.
2) a pass that handles inserting the random sampling framework. This also has options to control how random samples are choosen. Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).
The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).
Some things are a bit ugly still, but that should be fixed up soon enough.
Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.
llvm-svn: 24493
|
| |
|
|
| |
llvm-svn: 24491
|
| |
|
|
| |
llvm-svn: 24488
|
| |
|
|
| |
llvm-svn: 24487
|
| |
|
|
|
|
| |
half the problem.
llvm-svn: 24414
|
| |
|
|
|
|
|
|
|
|
| |
has a single def. In this case, look for uses that are dominated by the def
and attempt to rewrite them to directly use the stored value.
This speeds up mem2reg on these values and reduces the number of phi nodes
inserted. This should address PR665.
llvm-svn: 24411
|
| |
|
|
| |
llvm-svn: 24410
|
| |
|
|
|
|
| |
compiling mysql reported by Ted Kremenek.
llvm-svn: 24402
|
| |
|
|
| |
llvm-svn: 24288
|
| |
|
|
| |
llvm-svn: 24270
|
| |
|
|
|
|
|
|
| |
Reg2Mem
for fun you can opt -reg2mem -mem2reg
llvm-svn: 24267
|
| |
|
|
|
|
|
|
|
| |
Add support for specifying alignment and size of setjmp jmpbufs.
No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.
llvm-svn: 24196
|
| |
|
|
|
|
| |
that has been sitting in my inbox since May 18. :)
llvm-svn: 24194
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a few times in crafty:
OLD: %tmp.36 = div int %tmp.35, 8 ; <int> [#uses=1]
NEW: %tmp.36 = div uint %tmp.35, 8 ; <uint> [#uses=0]
OLD: %tmp.19 = div int %tmp.18, 8 ; <int> [#uses=1]
NEW: %tmp.19 = div uint %tmp.18, 8 ; <uint> [#uses=0]
OLD: %tmp.117 = div int %tmp.116, 8 ; <int> [#uses=1]
NEW: %tmp.117 = div uint %tmp.116, 8 ; <uint> [#uses=0]
OLD: %tmp.92 = div int %tmp.91, 8 ; <int> [#uses=1]
NEW: %tmp.92 = div uint %tmp.91, 8 ; <uint> [#uses=0]
Which all turn into shrs.
llvm-svn: 24190
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
8 times in vortex, allowing the srems to be turned into shrs:
OLD: %tmp.104 = rem int %tmp.5.i37, 16 ; <int> [#uses=1]
NEW: %tmp.104 = rem uint %tmp.5.i37, 16 ; <uint> [#uses=0]
OLD: %tmp.98 = rem int %tmp.5.i24, 16 ; <int> [#uses=1]
NEW: %tmp.98 = rem uint %tmp.5.i24, 16 ; <uint> [#uses=0]
OLD: %tmp.91 = rem int %tmp.5.i19, 8 ; <int> [#uses=1]
NEW: %tmp.91 = rem uint %tmp.5.i19, 8 ; <uint> [#uses=0]
OLD: %tmp.88 = rem int %tmp.5.i14, 8 ; <int> [#uses=1]
NEW: %tmp.88 = rem uint %tmp.5.i14, 8 ; <uint> [#uses=0]
OLD: %tmp.85 = rem int %tmp.5.i9, 1024 ; <int> [#uses=2]
NEW: %tmp.85 = rem uint %tmp.5.i9, 1024 ; <uint> [#uses=0]
OLD: %tmp.82 = rem int %tmp.5.i, 512 ; <int> [#uses=2]
NEW: %tmp.82 = rem uint %tmp.5.i1, 512 ; <uint> [#uses=0]
OLD: %tmp.48.i = rem int %tmp.5.i.i161, 4 ; <int> [#uses=1]
NEW: %tmp.48.i = rem uint %tmp.5.i.i161, 4 ; <uint> [#uses=0]
OLD: %tmp.20.i2 = rem int %tmp.5.i.i, 4 ; <int> [#uses=1]
NEW: %tmp.20.i2 = rem uint %tmp.5.i.i, 4 ; <uint> [#uses=0]
it also occurs 9 times in gcc, but with odd constant divisors (1009 and 61)
so the payoff isn't as great.
llvm-svn: 24189
|
| |
|
|
|
|
| |
/Regression/Transforms/InstCombine/add.ll
llvm-svn: 24158
|
| |
|
|
|
|
|
| |
bad cases. This fixes Markus's second testcase in PR639, and should
seal it for good.
llvm-svn: 24123
|
| |
|
|
|
|
| |
infrastructure and the simple isels have been removed.
llvm-svn: 24090
|
| |
|
|
| |
llvm-svn: 24083
|
| |
|
|
| |
llvm-svn: 24082
|
| |
|
|
|
|
| |
This allows us to turn code like malloc(4*x+4) -> malloc int, (x+1)
llvm-svn: 24081
|
| |
|
|
|
|
| |
change.
llvm-svn: 24076
|
| |
|
|
| |
llvm-svn: 24056
|
| |
|
|
|
|
| |
PR640
llvm-svn: 24046
|
| |
|
|
| |
llvm-svn: 24044
|
| |
|
|
|
|
|
|
| |
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.
llvm-svn: 24036
|
| |
|
|
| |
llvm-svn: 24033
|