Chris Lattner
72cbaa2ecb
don't crash on blank lines, rename some variables.
...
llvm-svn: 91892
2009-12-22 06:24:00 +00:00
Chris Lattner
f21a220bcd
Implement PR5795 by merging duplicated return blocks. This could go further
...
by merging all returns in a function into a single one, but simplifycfg
currently likes to duplicate the return (an unfortunate choice!)
llvm-svn: 91890
2009-12-22 06:07:30 +00:00
Chris Lattner
2b297ed9ee
convert to filecheck
...
llvm-svn: 91889
2009-12-22 06:04:26 +00:00
Chris Lattner
f3ef2cada7
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
...
llvm-svn: 91886
2009-12-22 04:47:41 +00:00
Chris Lattner
9b7d99eb76
The phi translated pointer can be computed when returning a partially cached result
...
instead of stored. This reduces memdep memory usage, and also eliminates a bunch of
weakvh's. This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.
llvm-svn: 91885
2009-12-22 04:25:02 +00:00
Bill Wendling
919b7aab2e
Add more plumbing. This time in the LowerArguments and "get" functions which
...
return partial registers. This affected the back-end lowering code some.
Also patch up some places I missed before in the "get" functions.
llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Sean Callanan
2f9443f422
Changed REG_* to MODRM_REG_* to avoid conflicts
...
with symbols in AuroraUX's global namespace.
llvm-svn: 91879
2009-12-22 02:07:42 +00:00
Daniel Dunbar
8b532de418
Fix some may-be-uninitialized var warnings.
...
llvm-svn: 91878
2009-12-22 01:41:37 +00:00
Chris Lattner
3d1205b3a8
fix unit test that I broke.
...
llvm-svn: 91877
2009-12-22 01:38:23 +00:00
Bill Wendling
ac08758b71
Add SDNode ordering to inlined asm and VA functions.
...
llvm-svn: 91876
2009-12-22 01:25:10 +00:00
Eric Christopher
ab6a0d60d5
Whitespace fixes.
...
llvm-svn: 91875
2009-12-22 01:23:51 +00:00
Chris Lattner
18d8b7575e
types don't need atomic inc/dec, they are local to an llvmcontext.
...
llvm-svn: 91873
2009-12-22 01:17:43 +00:00
Bill Wendling
f376c40d0e
Adding more assignment of ordering to SDNodes. This time in the "call" and
...
generic copy functions.
llvm-svn: 91872
2009-12-22 01:11:43 +00:00
Sean Callanan
5c8f4cd396
Fixed library dependencies between the X86 disassembler and
...
X86 codegen that were causing circular symbol dependencies.
llvm-svn: 91871
2009-12-22 01:11:26 +00:00
Chris Lattner
2ee6787c1b
avoid calling extractMallocCall when it's obvious we don't have
...
a call. This speeds up memdep ~1.5%
llvm-svn: 91869
2009-12-22 01:00:32 +00:00
Chris Lattner
84463813a1
comment fix: weakvh -> tracking vh
...
llvm-svn: 91867
2009-12-22 00:51:57 +00:00
Bill Wendling
a4d7df7a37
Add ordering of SDNodes to LowerCallTo.
...
llvm-svn: 91866
2009-12-22 00:50:32 +00:00
Chris Lattner
6211d7ba4b
print pcrel immediates as signed values instead of unsigned so that we
...
get things like this out of the disassembler:
0x100000ecb: callq -96
instead of:
0x100000ecb: callq 4294967200
rdar://7491123
llvm-svn: 91864
2009-12-22 00:44:05 +00:00
Bill Wendling
b99b2693f3
Now add ordering to SDNodes created by the massive intrinsic lowering function.
...
llvm-svn: 91863
2009-12-22 00:40:51 +00:00
Bill Wendling
ea3e73e596
To make things interesting, I added MORE code to set the ordering of
...
SDNodes. This time in the load/store and limited-precision code.
llvm-svn: 91860
2009-12-22 00:12:37 +00:00
Lang Hames
4c052261de
Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
...
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.
llvm-svn: 91859
2009-12-22 00:11:50 +00:00
Bill Wendling
c6b473433b
Add more plumbing to assign ordering to SDNodes. Have the "getValue" method
...
assign the ordering when called. Combine some of the ordering assignments to
keep things simple.
llvm-svn: 91857
2009-12-21 23:47:40 +00:00
Daniel Dunbar
c661a2d4d8
Add suggested parentheses.
...
llvm-svn: 91853
2009-12-21 23:27:57 +00:00
Chris Lattner
bf20018423
Add a fastpath to Load GVN to special case when we have exactly one dominating
...
load to avoid even messing around with SSAUpdate at all. In this case (which
is very common, we can just use the input value directly).
This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s,
which still isn't great, but substantially better and this is a simple speedup
that applies to lots of different cases.
llvm-svn: 91851
2009-12-21 23:15:48 +00:00
Bill Wendling
e79105b591
More ordering plumbing. This time for GEP. I need to remember to assign
...
orderings to values returned by getValue().
llvm-svn: 91850
2009-12-21 23:10:19 +00:00
Chris Lattner
927b0ac4b2
refactor some code out to a new helper method.
...
llvm-svn: 91849
2009-12-21 23:04:33 +00:00
Chris Lattner
eaa25da8bb
improve indentation avoid a pointless conversion from weakvh to trackingvh,
...
no functionality change.
llvm-svn: 91848
2009-12-21 22:43:03 +00:00
Bill Wendling
fff99f066b
Another incremental check-in for assigning ordering to SDNodes. This time for
...
shuffle and insert vector.
llvm-svn: 91847
2009-12-21 22:42:14 +00:00
Bill Wendling
443d0722b0
Assign ordering to more instructions. Incremental check-in.
...
llvm-svn: 91846
2009-12-21 22:30:11 +00:00
Bill Wendling
28727f3785
- Add a bit more plumbing assigning an order to SDNodes.
...
- Modify the "dump" method to emit the order of an SDNode.
llvm-svn: 91845
2009-12-21 21:59:52 +00:00
David Greene
dbf7074296
Fix a bug in !subst where TableGen would go and resubstitute text it had
...
just substituted. This could cause infinite looping in certain
pathological cases.
llvm-svn: 91843
2009-12-21 21:21:34 +00:00
Anton Korobeynikov
131420c5d7
Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.
...
llvm-svn: 91842
2009-12-21 20:19:37 +00:00
Anton Korobeynikov
3e9e87a9cb
Mark FPW as allocable when frame address is taken.
...
llvm-svn: 91841
2009-12-21 20:18:49 +00:00
Bill Wendling
7f5eb53ce2
First wave of plumbing for assigning an ordering to SDNodes. This takes care of
...
a lot of the branching instructions.
llvm-svn: 91838
2009-12-21 19:59:38 +00:00
Evan Cheng
db4d798619
Delete the instruction just before the function terminates for consistency sake.
...
llvm-svn: 91836
2009-12-21 19:53:39 +00:00
Bill Wendling
6de55a0efd
Place SDNodeOrdering.h in the directory it's used.
...
llvm-svn: 91834
2009-12-21 19:34:59 +00:00
Bob Wilson
88a0598fe8
Remove special-case SROA optimization of variable indexes to one-element and
...
two-element arrays. After restructuring the SROA code, it was not safe to
do this without adding more checking. It is not clear that this special-case
has really been useful, and removing this simplifies the code quite a bit.
llvm-svn: 91828
2009-12-21 18:39:47 +00:00
Daniel Dunbar
0fc1f6c595
XFAIL these tests on powerpc, under the assumption that no one cares. If you care, feel free to fix.
...
llvm-svn: 91826
2009-12-21 17:31:59 +00:00
Eric Christopher
a91c0f48e6
Fix setting and default setting of code model for jit. Do this
...
by allowing backends to override routines that will default
the JIT and Static code generation to an appropriate code model
for the architecture.
Should fix PR 5773.
llvm-svn: 91824
2009-12-21 08:15:29 +00:00
Eli Friedman
dbe2aa91b9
A couple minor README updates.
...
llvm-svn: 91823
2009-12-21 08:03:16 +00:00
Chris Lattner
a0a51c7b0e
improve compatibility with SWIG, patch by James Knight!
...
llvm-svn: 91822
2009-12-21 07:52:40 +00:00
Chris Lattner
4edfcb88e1
revert r89298, which was committed without a testcase. I think
...
the underlying PHI node insertion issue in SSAUpdate is fixed.
llvm-svn: 91821
2009-12-21 07:45:57 +00:00
Chris Lattner
8fb07c5a21
fix PR5837 by having SSAUpdate reuse phi nodes for the
...
'GetValueInMiddleOfBlock' case, instead of inserting
duplicates.
A similar fix is almost certainly needed by the machine-level
SSAUpdate implementation.
llvm-svn: 91820
2009-12-21 07:16:11 +00:00
Chris Lattner
080f666e01
add a helper ctor.
...
llvm-svn: 91819
2009-12-21 07:15:15 +00:00
Eli Friedman
00879d8faa
Change StringRef::startswith and StringRef::endswith to versions which are a
...
bit more verbose, but optimize to much shorter code.
llvm-svn: 91817
2009-12-21 06:49:24 +00:00
Chris Lattner
7bc85a931e
add check lines for min/max tests.
...
llvm-svn: 91816
2009-12-21 06:08:50 +00:00
Chris Lattner
33269813df
really convert this to filecheck.
...
llvm-svn: 91815
2009-12-21 06:06:10 +00:00
Chris Lattner
d4fb4296df
give instcombine some helper functions for matching MIN and MAX, and
...
implement some optimizations for MIN(MIN()) and MAX(MAX()) and
MIN(MAX()) etc. This substantially improves the code in PR5822 but
doesn't kick in much elsewhere. 2 max's were optimized in
pairlocalalign and one in smg2000.
llvm-svn: 91814
2009-12-21 06:03:05 +00:00
Chris Lattner
7a72d50de7
filecheckize
...
llvm-svn: 91813
2009-12-21 05:53:13 +00:00
Chris Lattner
ffbd02829c
enhance x-(-A) -> x+A to preserve NUW/NSW.
...
Use the presence of NSW/NUW to fold "icmp (x+cst), x" to a constant in
cases where it would otherwise be undefined behavior.
Surprisingly (to me at least), this triggers hundreds of the times in
a few benchmarks: lencode, ldecode, and 466.h264ref seem to *really*
like this.
llvm-svn: 91812
2009-12-21 04:04:05 +00:00