Douglas Gregor
f94e00d869
Alternative fix to make sure that the extern declarations used by
...
DynamicLibrary::SearchForAddressOfSymbol refer to declarations in the
global namespace.
llvm-svn: 92023
2009-12-23 19:12:50 +00:00
Douglas Gregor
051b92c3cd
Revert 92020 until I figure out a more portable fix
...
llvm-svn: 92021
2009-12-23 19:04:10 +00:00
Douglas Gregor
93254e1ffb
Move the extern symbol declarations outside of
...
DynamicLibrary::SearchForAddressOfSymbol and force them to have "C"
linkage.
Interestingly, GCC treats the block-scoped "extern" declarations we
previously had as if they were extern "C" declarations (or, at least,
were in the global namespace), so that GCC bug papered over this LLVM
bug. Clang and EDG get the linkage correct; this new variant seems to
work for both GCC and Clang.
llvm-svn: 92020
2009-12-23 18:56:27 +00:00
Douglas Gregor
66ffa50e6d
Fix another -Wmismatched-tags warning
...
llvm-svn: 92017
2009-12-23 18:27:13 +00:00
David Greene
532b3a278a
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92016
2009-12-23 18:25:37 +00:00
David Greene
6d5479e103
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92013
2009-12-23 17:55:11 +00:00
Nuno Lopes
129819de71
move a few more symbols to .rodata
...
llvm-svn: 92011
2009-12-23 17:48:10 +00:00
David Greene
c853cfcc33
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92006
2009-12-23 17:24:22 +00:00
David Greene
2e52ede652
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92005
2009-12-23 17:18:22 +00:00
Douglas Gregor
35ac67ff8e
Fix struct/class mismatch for LTOModule and LTOCodeGenerator, detected by Clang
...
llvm-svn: 92004
2009-12-23 17:05:07 +00:00
Douglas Gregor
3ab9e5077f
De-bork CMake build
...
llvm-svn: 92003
2009-12-23 17:03:46 +00:00
David Greene
64506db8e8
Provide dbgs(), a circular-buffering debug output stream. By default it
...
simply passes output to errs(). If -debug-buffer-size=N is set N > 0,
dbgs() buffers its output until program termination and dumps the last N
characters sent to it. This is handy when debugging very large inputs.
llvm-svn: 92002
2009-12-23 16:39:06 +00:00
David Greene
7ffbb50edf
Add circular_raw_ostream, which buffers its output in a circular queue
...
and outputs it when explicitly flushed. The intent is to use it in
situations such as debug output logging where a signal handler can take
care of flushing the buffer at program termination.
llvm-svn: 92001
2009-12-23 16:08:15 +00:00
Mikhail Glushenkov
0cb2a55c76
Make it easier to regenerate docs when srcdir != objdir.
...
llvm-svn: 92000
2009-12-23 12:50:03 +00:00
Mikhail Glushenkov
4429e70623
Regenerate.
...
llvm-svn: 91999
2009-12-23 12:49:51 +00:00
Mikhail Glushenkov
382495a0ff
Cosmetic issue: more consistent naming.
...
llvm-svn: 91998
2009-12-23 12:49:41 +00:00
Mikhail Glushenkov
f48a0c43b6
Allow (set_option SwitchOption, true).
...
llvm-svn: 91997
2009-12-23 12:49:30 +00:00
Sanjiv Gupta
cd419eebce
Reapply 91904.
...
llvm-svn: 91996
2009-12-23 11:19:09 +00:00
Sanjiv Gupta
a33c6f90ee
Added missing patterns for subtract instruction.
...
llvm-svn: 91995
2009-12-23 10:56:02 +00:00
Sanjiv Gupta
6920c17f1f
deleting empty file.
...
llvm-svn: 91994
2009-12-23 10:35:24 +00:00
Sanjiv Gupta
f7b4f89588
Reverting back 91904.
...
llvm-svn: 91993
2009-12-23 09:46:01 +00:00
Dale Johannesen
a864a67185
Use more sensible type for flags in asms. PR 5570.
...
Patch by Sylve`re Teissier (sorry, ASCII only).
llvm-svn: 91988
2009-12-23 07:32:51 +00:00
Eric Christopher
fdb33458fc
Update objectsize intrinsic and associated dependencies. Fix
...
lowering code and update testcases.
llvm-svn: 91979
2009-12-23 02:51:48 +00:00
Chris Lattner
4e26c0e52b
really remove the instruction, don't just comment it out
...
llvm-svn: 91976
2009-12-23 01:46:40 +00:00
Chris Lattner
518b037620
completely eliminate the MOV16r0 'instruction'. The only
...
interesting part of this is the divrem changes, which are
already tested by CodeGen/X86/divrem.ll.
llvm-svn: 91975
2009-12-23 01:45:04 +00:00
Sean Callanan
417c8a43d6
More fixes for Visual C++. Replaced several very small
...
static inline functions with macros.
llvm-svn: 91973
2009-12-23 01:32:29 +00:00
Chris Lattner
698def0868
stop pattern matching 16-bit zero's of a register to MOV16r0,
...
instead use the appropriate subreggy thing. This generates identical
code on some large apps (thanks to Evan's cross class coalescing
stuff he did back in july). This means that MOV16r0 can go away
completely in the future soon.
llvm-svn: 91972
2009-12-23 01:30:26 +00:00
Bill Wendling
0602f39bb1
Remove superfluous SDNode ordering.
...
llvm-svn: 91971
2009-12-23 01:28:19 +00:00
Jeffrey Yasskin
60958a1e56
Disable JITTest.FunctionIsRecompiledAndRelinked on ARM where it's not
...
implemented.
llvm-svn: 91963
2009-12-23 00:58:02 +00:00
Bill Wendling
9df5c6dfc3
Remove node ordering from inline asm nodes. It's not needed.
...
llvm-svn: 91961
2009-12-23 00:47:20 +00:00
Daniel Dunbar
c7dccd8ad2
Suppress compiler warning.
...
llvm-svn: 91959
2009-12-23 00:45:10 +00:00
Bill Wendling
91313064f1
Remove node ordering from VA nodes. It's not needed.
...
llvm-svn: 91958
2009-12-23 00:44:51 +00:00
Eric Christopher
31e39bd3d4
Update docs for bitcode changes. For object size checking we won't
...
work with partial objects so just count the type as a boolean. Update
appropriately.
llvm-svn: 91954
2009-12-23 00:29:49 +00:00
Bill Wendling
ef408db250
Revert r91949 r91942 and r91936.
...
llvm-svn: 91953
2009-12-23 00:28:23 +00:00
Bill Wendling
54dd5398e0
Finish up node ordering in ExpandNode.
...
llvm-svn: 91949
2009-12-23 00:05:09 +00:00
Jakob Stoklund Olesen
b10c69edd0
Add coalescer asserts.
...
llvm-svn: 91945
2009-12-22 23:54:54 +00:00
Jakob Stoklund Olesen
b05fbe1486
Add a SPR register class to the ARM target.
...
Certain Thumb instructions require only SP (e.g. tSTRspi).
llvm-svn: 91944
2009-12-22 23:54:44 +00:00
Jeffrey Yasskin
6523429779
Partially revert r91626. Materializing extra functions to determine whether
...
they're available_externally broke VMKit, which was relying on the fact that
functions would only be materialized when they were first called. We'll have
to wait for http://llvm.org/PR5737 to really fix this.
I also added a test for one of the F->isDeclaration() calls which wasn't
covered by anything else in the test suite.
llvm-svn: 91943
2009-12-22 23:47:23 +00:00
Bill Wendling
ad1fdf0e40
Assign ordering to nodes created in ExpandNode. Only roughly 1/2 of the function
...
is finished.
llvm-svn: 91942
2009-12-22 23:44:56 +00:00
Jeffrey Yasskin
ad46e4416b
Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCI
...
argument to runJITOnFunction(), which caused a null pointer dereference at
every call.
Patch by Gianluca Guida!
llvm-svn: 91939
2009-12-22 23:18:18 +00:00
Bill Wendling
70794596a8
Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
...
was using "Tmp1" in the first getNode call instead of Node->getOperand(0).
llvm-svn: 91936
2009-12-22 22:53:39 +00:00
Sean Callanan
588785c781
Removed the "inline" keyword from the disassembler decoder,
...
because the Visual C++ build does not build .c files as C99
llvm-svn: 91935
2009-12-22 22:51:40 +00:00
Chris Lattner
b257d24f62
rename HexDisassembler -> Disassembler, it works on any input
...
integer encoding (0123, 0b10101, 42, etc).
llvm-svn: 91934
2009-12-22 22:50:29 +00:00
Chris Lattner
e3437b33f5
just discard the debug output from the disassembler.
...
llvm-svn: 91933
2009-12-22 22:47:43 +00:00
Anton Korobeynikov
ef3fdc1cbd
Add testcase for PR5703
...
llvm-svn: 91931
2009-12-22 22:37:23 +00:00
Jakob Stoklund Olesen
200f82c889
Remove minimal CFG sanity checks from verifier.
...
These checks would often trigger on unreachable statements inserted by
bugpoint, leading it astray.
It would be nice if we could distinguish unreachable blocks from errors.
llvm-svn: 91923
2009-12-22 21:52:27 +00:00
Jakob Stoklund Olesen
3db4952357
Allow explicit %reg0 operands beyond what the .td file describes.
...
ARM uses these to indicate predicates.
llvm-svn: 91922
2009-12-22 21:48:20 +00:00
Bill Wendling
d85498132f
Allow 0 as an order number. Don't assign an order to formal arguments.
...
llvm-svn: 91920
2009-12-22 21:35:02 +00:00
Sean Callanan
36eab80875
Fixes to the X86 disassembler:
...
Made LEA memory operands emit only 4 MCInst operands.
Made the scale operand equal 1 for instructions that have no
SIB byte.
llvm-svn: 91919
2009-12-22 21:12:55 +00:00
Anton Korobeynikov
3b8235bec3
Restore snprintf weirdness for VCPP only
...
llvm-svn: 91918
2009-12-22 20:11:00 +00:00
Chris Lattner
c0f6402a94
Fix the Convert to scalar to not insert dead loads in the store case. The
...
load is needed when we have a small store into a large alloca (at which
point we get a load/insert/store sequence), but when you do a full-sized
store, this load ends up being dead.
This dead load is bad in really large nasty testcases where the load ends
up causing mem2reg to insert large chains of dependent phi nodes which only
ADCE can delete. Instead of doing this, just don't insert the dead load.
This fixes rdar://6864035
llvm-svn: 91917
2009-12-22 19:33:28 +00:00
Chris Lattner
fda3b559e6
fix some fixme's by using twines
...
llvm-svn: 91916
2009-12-22 19:23:33 +00:00
Jakob Stoklund Olesen
6f579c12b1
Use proper move instructions. Make the verifier happy.
...
llvm-svn: 91914
2009-12-22 18:49:55 +00:00
Bob Wilson
bac37abe73
Report an error for bad inline assembly, where the value passed for an
...
"indirect" operand is not a pointer.
llvm-svn: 91913
2009-12-22 18:34:19 +00:00
Evan Cheng
71d7eaa87e
Remove target attribute break-sse-dep. Instead, do not fold load into sse partial update instructions unless optimizing for size.
...
llvm-svn: 91910
2009-12-22 17:47:23 +00:00
Douglas Gregor
8b858396d4
Include based on the current path, since we already -I the X86 target's path. Fixes CMake build
...
llvm-svn: 91908
2009-12-22 17:25:11 +00:00
Sanjiv Gupta
8c5f05fcee
While converting one of the operands to a memory operand, we need to check if it is Legal and does not result into a cyclic dep.
...
llvm-svn: 91904
2009-12-22 14:25:37 +00:00
Chris Lattner
778f92ab02
specify what is invalid about it
...
llvm-svn: 91901
2009-12-22 07:03:21 +00:00
Chris Lattner
f6d4129c76
specify a triple to use, fixing the test on non-x86-64 hosts.
...
llvm-svn: 91900
2009-12-22 07:01:12 +00:00
Chris Lattner
502f0f11e0
reject invalid input with a caret, e.g.:
...
simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^
llvm-svn: 91898
2009-12-22 06:58:29 +00:00
Bob Wilson
62a84ea8e3
Generalize SROA to allow the first index of a GEP to be non-zero. Add a
...
missing check that an array reference doesn't go past the end of the array,
and remove some redundant checks for in-bound array and vector references
that are no longer needed.
llvm-svn: 91897
2009-12-22 06:57:14 +00:00
Chris Lattner
dd0c01b5de
various cleanups, make the disassemble reject lines with too much
...
data on them, for example:
addb %al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0
^
llvm-svn: 91896
2009-12-22 06:56:51 +00:00
Chris Lattner
8879918722
If you thought that it didn't make sense for the disassembler
...
to not produce caret diagnostics, you were right!
llvm-svn: 91895
2009-12-22 06:45:48 +00:00
Chris Lattner
dc9845b79a
rewrite the file parser for the disassembler, implementing support for
...
comments. Also, check in a simple testcase for the disassembler,
including a test for r91864
llvm-svn: 91894
2009-12-22 06:37:58 +00:00
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
Chris Lattner
900ce231f9
Optimize all cases of "icmp (X+Cst), X" to something simpler. This triggers
...
a bunch in lencode, ldecod, spass, 176.gcc, 252.eon, among others. It is
also the first part of PR5822
llvm-svn: 91811
2009-12-21 03:19:28 +00:00
Chris Lattner
d18b455086
convert to filecheck
...
llvm-svn: 91810
2009-12-21 03:11:05 +00:00
Lang Hames
0209f50c0d
Fixed use of phi param in SlotIndex constructors.
...
llvm-svn: 91790
2009-12-19 23:32:32 +00:00
Chris Lattner
25bf6f8946
fix an overly conservative caching issue that caused memdep to
...
cache a pointer as being unavailable due to phi trans in the
wrong place. This would cause later queries to fail even when
they didn't involve phi trans.
llvm-svn: 91787
2009-12-19 21:29:22 +00:00
Daniel Dunbar
039d6e11a8
CMake: Update lib deps.
...
llvm-svn: 91786
2009-12-19 21:27:30 +00:00
Chris Lattner
5c13f389cb
.llx is no more.
...
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Chris Lattner
95b431dd32
fix inconsistent use of tabs
...
llvm-svn: 91783
2009-12-19 20:44:43 +00:00
Daniel Dunbar
877075a41f
Remove unused variable (noticed by clang++).
...
llvm-svn: 91780
2009-12-19 18:58:49 +00:00
Daniel Dunbar
4750efc28a
#if 0 out X86 disassembler for now, it is breaking the build in multiple places.
...
llvm-svn: 91778
2009-12-19 17:11:53 +00:00
Sanjiv Gupta
8ac077df57
Emit direction operand in binary insns that stores in memory.
...
llvm-svn: 91777
2009-12-19 13:52:01 +00:00
Sanjiv Gupta
bdef02be69
Adding a bunch of options to the mcc16 driver.
...
llvm-svn: 91776
2009-12-19 13:13:29 +00:00
Nuno Lopes
3ed6d6003c
rename dprintf to dbgpritnf, in order to fix build with glibc (which already defines dprintf in stdio.h
...
llvm-svn: 91775
2009-12-19 12:07:00 +00:00
Nuno Lopes
91b866a163
fix build and while at it remove a redudant include
...
llvm-svn: 91774
2009-12-19 11:52:18 +00:00
Sanjiv Gupta
bda8002e7f
Test cases for changes done in 91768.
...
llvm-svn: 91773
2009-12-19 11:38:14 +00:00
Sanjiv Gupta
4f469974b2
1. In indirect load/store insns , the name of fsr should be emitted as INDF.
...
2. include standard asmbly headers in generated asmbly.
llvm-svn: 91768
2009-12-19 08:26:25 +00:00
Douglas Gregor
740ab38bb7
Fix a bunch of little errors that Clang complains about when its being pedantic
...
llvm-svn: 91764
2009-12-19 07:05:23 +00:00
Chris Lattner
4ad5eba568
fix PR5827 by disabling the phi slicing transformation in a case
...
where instcombine would have to split a critical edge due to a
phi node of an invoke. Since instcombine can't change the CFG,
it has to bail out from doing the transformation.
llvm-svn: 91763
2009-12-19 07:01:15 +00:00
Bob Wilson
c16811b575
Update my SROA changes in response to review.
...
* change FindElementAndOffset to return a uint64_t instead of unsigned, and
to identify the type to be used for that result in a GEP instruction.
* move "isa<ConstantInt>" to be first in conditional.
* replace some dyn_casts with casts.
* add a comment about handling mem intrinsics.
llvm-svn: 91762
2009-12-19 06:53:17 +00:00
Daniel Dunbar
3a821f7f0c
More bzero -> memset that I missed.
...
llvm-svn: 91757
2009-12-19 04:16:57 +00:00
Daniel Dunbar
f008ea5fa0
Add missing newlines at EOF (for clang++).
...
llvm-svn: 91756
2009-12-19 04:16:48 +00:00
Daniel Dunbar
c745a620a2
Use memset instead of bzero, its more portable.
...
llvm-svn: 91754
2009-12-19 03:31:50 +00:00
Douglas Gregor
0a66daf900
Remove spurious semicolon. Thanks, Clang
...
llvm-svn: 91752
2009-12-19 03:21:36 +00:00
Sean Callanan
04cc307edd
Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit
...
incarnations), integrated into the MC framework.
The disassembler is table-driven, using a custom TableGen backend to
generate hierarchical tables optimized for fast decode. The disassembler
consumes MemoryObjects and produces arrays of MCInsts, adhering to the
abstract base class MCDisassembler (llvm/MC/MCDisassembler.h).
The disassembler is documented in detail in
- lib/Target/X86/Disassembler/X86Disassembler.cpp (disassembler runtime)
- utils/TableGen/DisassemblerEmitter.cpp (table emitter)
You can test the disassembler by running llvm-mc -disassemble for i386
or x86_64 targets. Please let me know if you encounter any problems
with it.
llvm-svn: 91749
2009-12-19 02:59:52 +00:00
Anton Korobeynikov
148d87b0b0
Bump alignment requirements for windows targets to achieve compartibility with vcpp.
...
Based on patch by Michael Beck!
llvm-svn: 91745
2009-12-19 02:04:23 +00:00
Anton Korobeynikov
10590171fa
Use 4-arg getVTList) variant instead of generic one, when possible
...
llvm-svn: 91744
2009-12-19 02:04:00 +00:00
Dan Gohman
a73df58110
Delete unused code.
...
llvm-svn: 91743
2009-12-19 01:47:13 +00:00
Dan Gohman
876f45d7d2
Fix a spello in a comment that Nick spotted.
...
llvm-svn: 91742
2009-12-19 01:46:34 +00:00
Dan Gohman
b0da63da1e
Fix a comment.
...
llvm-svn: 91741
2009-12-19 01:46:09 +00:00
Chris Lattner
dd3e9aaad3
Make some methods const. The only interesting change here is that
...
it changes raw_fd_ostream::preferred_buffer_size to return zero on
a scary stat failure instead of setting the stream to an error state.
This method really should not mutate the stream.
llvm-svn: 91740
2009-12-19 01:38:42 +00:00
John McCall
086bb4ef82
Qualify a bunch of explicit template instantiations to satisfy clang++.
...
llvm-svn: 91736
2009-12-19 00:55:12 +00:00
John McCall
791e5c9dd5
Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from
...
the templates in TypesContext.h can find them. Caught by clang++.
llvm-svn: 91735
2009-12-19 00:51:42 +00:00
Bill Wendling
57f2a6187a
Forgot forward declaration.
...
llvm-svn: 91732
2009-12-19 00:05:07 +00:00
Dan Gohman
f902c8c1b5
Eliminate unnecessary LLVMContexts.
...
llvm-svn: 91729
2009-12-18 23:42:08 +00:00
Bill Wendling
022d18fa3f
Changes from review:
...
- Move DisableScheduling flag into TargetOption.h
- Move SDNodeOrdering into its own header file. Give it a minimal interface that
doesn't conflate construction with storage.
- Move assigning the ordering into the SelectionDAGBuilder.
This isn't used yet, so there should be no functional changes.
llvm-svn: 91727
2009-12-18 23:32:53 +00:00
Dan Gohman
7db230f5c9
Make this comment more precise.
...
llvm-svn: 91722
2009-12-18 23:18:03 +00:00
Eli Friedman
36623cc253
Fix an issue in googletest where a name was used before it was defined.
...
llvm-svn: 91718
2009-12-18 21:38:44 +00:00
Evan Cheng
b175de6356
Increase opportunities to optimize (brcond (srl (and c1), c2)).
...
llvm-svn: 91717
2009-12-18 21:31:31 +00:00
Eli Friedman
3a7cdaca33
Fix gcc warning.
...
llvm-svn: 91715
2009-12-18 21:07:18 +00:00
Rafael Espindola
2c5792a6bd
Catch more cases of a pointer being marked garbage twice. This helps when
...
debugging some leaks (PR5770 in particular).
llvm-svn: 91713
2009-12-18 20:35:38 +00:00
Bob Wilson
532cd232fb
Reapply 91459 with a simple fix for the problem that broke the x86_64-darwin
...
bootstrap. This also replaces the WeakVH references that Chris objected to
with normal Value references.
llvm-svn: 91711
2009-12-18 20:14:40 +00:00
Bob Wilson
a8e2997aa0
Fix another parallel make race condition.
...
llvm-svn: 91709
2009-12-18 20:12:14 +00:00
Victor Hernandez
0471abd58b
Formalize MDNode's function-localness:
...
- an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR
- function-localness is designated via lowest bit in SubclassData
- getLocalFunction() descends MDNode tree to see if it is consistently function-local
Add verification of MDNodes to checks that MDNodes are consistently function-local.
Update AsmWriter to use isFunctionLocal().
llvm-svn: 91708
2009-12-18 20:09:14 +00:00
Daniel Dunbar
cf7744e44d
Fix Win32 Path.inc for API update.
...
llvm-svn: 91706
2009-12-18 19:59:48 +00:00
Dan Gohman
51f13056bd
Revert this use of NUW/NSW also. Overflow-undefined multiplication isn't
...
associative either.
llvm-svn: 91701
2009-12-18 18:45:31 +00:00
Rafael Espindola
b73b4fd30e
Fix libstdc++ build on ARM linux and part of PR5770.
...
MI was not being used but it was also not being deleted, so it was kept in the garbage list. The memory itself was freed once the function code gen was done.
Once in a while the codegen of another function would create an instruction on the same address. Adding it to the garbage group would work once, but when another pointer was added it would cause an assert as "Cache" was about to be pushed to Ts.
For a patch that make us detect problems like this earlier, take a look at
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091214/092758.html
With that patch we assert as soon and the new instruction is added to the garbage set.
llvm-svn: 91691
2009-12-18 16:59:39 +00:00
Tilmann Scheller
5b2df8dcb5
Fix wrong frame pointer save offset in the 64-bit PowerPC SVR4 ABI.
...
Patch contributed by Ken Werner of IBM!
llvm-svn: 91681
2009-12-18 13:00:34 +00:00
Tilmann Scheller
79fef9349c
Add support for calls through function pointers in the 64-bit PowerPC SVR4 ABI.
...
Patch contributed by Ken Werner of IBM!
llvm-svn: 91680
2009-12-18 13:00:15 +00:00
Mikhail Glushenkov
d7015906d0
Make 'set_option' work with list options.
...
This works now: (set_option "list_opt", ["val_1", "val_2", "val_3"])
llvm-svn: 91679
2009-12-18 11:27:26 +00:00
Eli Friedman
86b9d75dc8
Optimize icmp of null and select of two constants even if the select has
...
multiple uses. (The construct in question was found in gcc.)
llvm-svn: 91675
2009-12-18 08:22:35 +00:00
Evan Cheng
4cf30b72bf
On recent Intel u-arch's, folding loads into some unary SSE instructions can
...
be non-optimal. To be precise, we should avoid folding loads if the instructions
only update part of the destination register, and the non-updated part is not
needed. e.g. cvtss2sd, sqrtss. Unfolding the load from these instructions breaks
the partial register dependency and it can improve performance. e.g.
movss (%rdi), %xmm0
cvtss2sd %xmm0, %xmm0
instead of
cvtss2sd (%rdi), %xmm0
An alternative method to break dependency is to clear the register first. e.g.
xorps %xmm0, %xmm0
cvtss2sd (%rdi), %xmm0
llvm-svn: 91672
2009-12-18 07:40:29 +00:00
Dan Gohman
7a2dab8826
Revert this use of NSW; this one isn't actually safe. NSW addition
...
is not reassociative.
llvm-svn: 91667
2009-12-18 03:57:04 +00:00
Dan Gohman
57e808628c
Eliminte unnecessary uses of <cstdio>.
...
llvm-svn: 91666
2009-12-18 03:25:51 +00:00
Dan Gohman
4e3b29e309
Add utility routines for NSW multiply.
...
llvm-svn: 91664
2009-12-18 03:10:26 +00:00
Dan Gohman
4ab4420d7a
Add utility routines for creating integer negation operators with NSW set.
...
Integer negation only overflows with INT_MIN, but that's an important case.
llvm-svn: 91662
2009-12-18 02:58:50 +00:00
Dan Gohman
916fec41fb
Delete an unused variable.
...
llvm-svn: 91659
2009-12-18 02:14:37 +00:00
Eric Christopher
4c155350f1
Fix typo.
...
llvm-svn: 91657
2009-12-18 02:12:53 +00:00
Dan Gohman
b256ccfbe5
Preserve NSW information in more places.
...
llvm-svn: 91656
2009-12-18 02:09:29 +00:00
Evan Cheng
3dfd04e2b7
Re-apply 91623 now that I actually know what I was trying to do.
...
llvm-svn: 91655
2009-12-18 01:59:21 +00:00
Dan Gohman
18fa5686f6
Add Loop contains utility methods for testing whether a loop
...
contains another loop, or an instruction. The loop form is
substantially more efficient on large loops than the typical
code it replaces.
llvm-svn: 91654
2009-12-18 01:24:09 +00:00
Dan Gohman
fd7231f1fe
Minor code simplification.
...
llvm-svn: 91653
2009-12-18 01:20:44 +00:00
Dan Gohman
cb0efecd33
Whitespace cleanups.
...
llvm-svn: 91651
2009-12-18 01:14:11 +00:00
Dan Gohman
51fbfb726f
Tidy up this testcase and add test for tailcall optimization
...
with unreachable.
llvm-svn: 91650
2009-12-18 01:05:06 +00:00
Bob Wilson
3152b0471b
Handle ARM inline asm "w" constraints with 64-bit ("d") registers.
...
The change in SelectionDAGBuilder is needed to allow using bitcasts to convert
between f64 (the default type for ARM "d" registers) and 64-bit Neon vector
types. Radar 7457110.
llvm-svn: 91649
2009-12-18 01:03:29 +00:00
Dan Gohman
7f4326f8b6
Remove "tail" keywords. These calls are not intended to be tail calls.
...
This protects this test from depending on codegen not performing the
tail call optimization by default.
llvm-svn: 91648
2009-12-18 01:02:18 +00:00
Dan Gohman
b1924e8a0f
Don't pass const pointers by reference.
...
llvm-svn: 91647
2009-12-18 00:38:08 +00:00
Dan Gohman
1af1954852
Update a comment.
...
llvm-svn: 91645
2009-12-18 00:28:43 +00:00
John McCall
eabfd8b155
Pass the error string directly to llvm_unreachable instead of the residual
...
(0 && "error"). Rough consensus seems to be that g++ *should* be diagnosing
this because the pointer makes it not an ICE in c++03. Everyone agrees that
the current standard is silly and null-pointer-ness should not be based on
ICE-ness. Excellent fight scene in Act II, denouement weak, two stars.
llvm-svn: 91644
2009-12-18 00:27:18 +00:00
Jakob Stoklund Olesen
78c5919b14
Add test case for the phi reuse patch.
...
llvm-svn: 91642
2009-12-18 00:11:44 +00:00
Dan Gohman
92c3696524
Reapply LoopStrengthReduce and IVUsers cleanups, excluding the part
...
of 91296 that caused trouble -- the Processed list needs to be
preserved for the livetime of the pass, as AddUsersIfInteresting
is called from other passes.
llvm-svn: 91641
2009-12-18 00:06:20 +00:00
Sean Callanan
04d8cb74f3
Instruction fixes, added instructions, and AsmString changes in the
...
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
llvm-svn: 91638
2009-12-18 00:01:26 +00:00
John McCall
753100cef3
Sundry dependent-name fixes flagged by clang++.
...
llvm-svn: 91636
2009-12-17 23:49:16 +00:00
Bill Wendling
3c13667d14
Revert accidental commit.
...
llvm-svn: 91635
2009-12-17 23:45:18 +00:00
Bill Wendling
819c356a09
Turn off critical edge splitting for landing pads. The introduction of a
...
non-landing pad basic block as the successor to a block that ends in an
unconditional jump will cause block folding to remove the added block as a
successor. Thus eventually removing it AND the landing pad entirely. Critical
edge splitting is an optimization, so we can safely turn it off when dealing
with landing pads.
llvm-svn: 91634
2009-12-17 23:42:32 +00:00
Jeffrey Yasskin
0de0ce11d8
Revert r91623 to unbreak the buildbots.
...
llvm-svn: 91632
2009-12-17 22:44:34 +00:00
Eli Friedman
250b119d98
Allow instcombine to combine "sext(a) >u const" to "a >u trunc(const)".
...
llvm-svn: 91631
2009-12-17 22:42:29 +00:00
Jeffrey Yasskin
2b73a4e90f
Don't codegen available_externally functions. Fixes http://llvm.org/PR5735 .
...
llvm-svn: 91626
2009-12-17 21:35:29 +00:00
Eli Friedman
7cc86b4cc6
Make the ptrtoint comparison simplification work if one side is a global.
...
llvm-svn: 91624
2009-12-17 21:27:47 +00:00
Evan Cheng
e43b403c87
Remove an unused option.
...
llvm-svn: 91623
2009-12-17 21:23:58 +00:00
Chris Lattner
cbc0804c71
tabs -> spaces.
...
llvm-svn: 91622
2009-12-17 21:23:46 +00:00
Eli Friedman
5842c9968a
Slightly generalize transformation of memmove(a,a,n) so that it also applies
...
to memcpy. (Such a memcpy is technically illegal, but in practice is safe
and is generated by struct self-assignment in C code.)
llvm-svn: 91621
2009-12-17 21:07:31 +00:00
Jeffrey Yasskin
5908f1e27b
Make Path use StringRef instead of std::string where possible.
...
llvm-svn: 91620
2009-12-17 21:02:39 +00:00
Bill Wendling
03b5aed7d8
Temporarily revert 91337. It's causing testcase failures.
...
$ svn merge -c -91337 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91337 into '.':
U lib/CodeGen/AsmPrinter/DwarfException.cpp
llvm-svn: 91618
2009-12-17 20:41:01 +00:00
Steve Naroff
d3ab107432
Fix Windows build breakage...
...
llvm-svn: 91617
2009-12-17 20:39:34 +00:00
Ken Dyck
df5561db78
Introduce EVT::getHalfSizedIntegerVT() for use in ExpandUnalignedStore() in
...
LegalizeDAG.cpp. Unlike the code it replaces, which simply decrements the simple
type by one, getHalfSizedIntegerVT() searches for the smallest simple integer
type that is at least half the size of the type it is called on. This approach
has the advantage that it will continue working if a new value type (such as
i24) is added to MVT.
Also, in preparation for new value types, remove the assertions that
non-power-of-2 8-bit-mutiple types are Extended when legalizing extload and
truncstore operations.
llvm-svn: 91614
2009-12-17 20:09:43 +00:00
Chris Lattner
50272752fa
finish cleaning up StructLayoutMap.
...
llvm-svn: 91612
2009-12-17 20:00:21 +00:00
Jeffrey Yasskin
28f244863e
This fixes a memory leak in OpaqueType found by Google's internal heapchecker.
...
llvm-svn: 91611
2009-12-17 19:55:06 +00:00
Eric Christopher
2d1ffe028f
Fix unused variable warning.
...
llvm-svn: 91609
2009-12-17 19:07:19 +00:00
Bob Wilson
f3927b7994
Re-revert 91459. It's breaking the x86_64 darwin bootstrap.
...
llvm-svn: 91607
2009-12-17 18:34:24 +00:00
Evan Cheng
ece104a0e1
Remove debugging code.
...
llvm-svn: 91604
2009-12-17 18:03:12 +00:00
Jim Grosbach
67584fe874
Add more detail for getting started on Windows.
...
Patch from jon.forums at gmail.com
llvm-svn: 91603
2009-12-17 17:18:11 +00:00
Ken Dyck
798493285c
In LowerEXTRACT_VECTOR_ELT, force an i32 value type for PEXTWR instead of
...
incrementing the simple value type of the 16-bit type, which would give the
wrong type if an intemediate MVT (such as i24) were introduced.
llvm-svn: 91602
2009-12-17 15:31:52 +00:00
Evan Cheng
090ac0865a
Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently introduced a non-deterministic behavior in the optimizer somewhere.
...
llvm-svn: 91598
2009-12-17 09:39:49 +00:00
Mikhail Glushenkov
108b0682e4
Regenerate.
...
llvm-svn: 91595
2009-12-17 07:49:26 +00:00
Mikhail Glushenkov
1fe2678a06
Add a 'set_option' action for use in OptionPreprocessor.
...
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Mikhail Glushenkov
9bbd4eb9f5
Refactoring, no functionality change.
...
llvm-svn: 91593
2009-12-17 07:48:49 +00:00
Mikhail Glushenkov
bea9ce8826
s/TokenizeCmdline/TokenizeCmdLine/
...
llvm-svn: 91592
2009-12-17 07:48:34 +00:00
Chandler Carruth
187220e3f5
Update CMake build to include HexDisassembler.cpp.
...
llvm-svn: 91589
2009-12-17 06:35:17 +00:00
Eli Friedman
e67cae33e1
Aggressively flip compare constant expressions where appropriate; constant
...
folding in particular expects null to be on the RHS.
llvm-svn: 91587
2009-12-17 06:07:04 +00:00
Bob Wilson
1c00b6964f
Fix a comment grammaro.
...
llvm-svn: 91584
2009-12-17 05:07:36 +00:00
Bob Wilson
ff43ab88ff
BIT_CONVERT nodes are used for vector types, too.
...
llvm-svn: 91582
2009-12-17 05:05:36 +00:00
Sean Callanan
7e64550747
Test harness for the LLVM disassembler. When invoked
...
with -disassemble, llvm-mc now accepts lines of the
form
0x00 0x00
and passes the resulting bytes to the disassembler for
the chosen (or default) target, printing the result.
llvm-svn: 91579
2009-12-17 01:49:59 +00:00
Evan Cheng
aadf060b92
Revert this dag combine change:
...
Fold (zext (and x, cst)) -> (and (zext x), cst)
DAG combiner likes to optimize expression in the other way so this would end up cause an infinite looping.
llvm-svn: 91574
2009-12-17 00:40:05 +00:00
Johnny Chen
7f30b64dce
Renamed "tCMNZ" to "tCMNz" to be consistent with other similar namings.
...
llvm-svn: 91571
2009-12-16 23:36:52 +00:00
John McCall
30f2ac714b
Silence a clang warning about the deprecated (but perfectly reasonable in
...
context) increment-of-bool idiom.
llvm-svn: 91564
2009-12-16 20:31:50 +00:00
Daniel Dunbar
b827e52638
Reapply r91392, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
...
llvm-svn: 91560
2009-12-16 20:10:05 +00:00
Daniel Dunbar
ab42d42390
Reapply r91459, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
...
llvm-svn: 91559
2009-12-16 20:09:53 +00:00
Jim Grosbach
69461f50c1
Mark STREX* as earlyclobber for the success result register.
...
llvm-svn: 91555
2009-12-16 19:44:06 +00:00
Jim Grosbach
2a282f2f86
Add @earlyclobber TableGen constraint
...
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Bill Wendling
8478ed5d18
Remove superfluous 'extern' variable that was causing a warning with clang.
...
llvm-svn: 91552
2009-12-16 19:36:42 +00:00
Jakob Stoklund Olesen
ec20a88a57
Reuse lowered phi nodes.
...
Tail duplication produces lots of identical phi nodes in different basic
blocks. Teach PHIElimination to reuse the join registers when lowering a phi
node that is identical to an already lowered node. This saves virtual
registers, and more importantly it avoids creating copies the the coalescer
doesn't know how to eliminate.
Teach LiveIntervalAnalysis about the phi joins with multiple uses.
This patch significantly reduces code size produced by -pre-regalloc-taildup.
llvm-svn: 91549
2009-12-16 18:55:53 +00:00
Daniel Dunbar
1482b5aa16
Fix one more missing this-> to placate that picky clang++.
...
llvm-svn: 91536
2009-12-16 11:38:03 +00:00
Daniel Dunbar
133efc317e
Revert "Reapply 91184 with fixes and an addition to the testcase to cover the
...
problem", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.
This reverts commit db22309800b224a9f5f51baf76071d7a93ce59c9.
llvm-svn: 91534
2009-12-16 10:56:17 +00:00
Daniel Dunbar
df45b70c1e
Revert "Initial work on disabling the scheduler. This is a work in progress, and
...
this", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.
llvm-svn: 91533
2009-12-16 10:56:02 +00:00
Chris Lattner
f278addbdc
reapply my strstr optimization. I have reproduced the x86-64 bootstrap
...
miscompile (i386.o miscompares) but it happens both with and without
this patch.
llvm-svn: 91532
2009-12-16 09:32:05 +00:00
Chris Lattner
9527af246e
fix more missing this->'s to placate clang++
...
llvm-svn: 91531
2009-12-16 09:17:12 +00:00
Chris Lattner
5f5fffc5b2
Fix a missing this-> that clang++ notices.
...
llvm-svn: 91530
2009-12-16 09:09:54 +00:00
Chris Lattner
4ea86c460a
now that libsystem no longer uses SmallVector, we can move
...
SmallVectorBase::grow_pod out of line, finally satisfying PR3758.
llvm-svn: 91529
2009-12-16 08:44:24 +00:00
Chris Lattner
a6fc9de9fc
remove use of SmallVector from Path::makeUnique. Path::makeUnique
...
is not used by anything performance sensitive, so just use std::string.
llvm-svn: 91528
2009-12-16 08:40:44 +00:00
Chris Lattner
e6be85661d
eliminate an extraneous use of SmallVector in a case where
...
a fixed size buffer is perfectly fine.
llvm-svn: 91527
2009-12-16 08:35:54 +00:00
Chris Lattner
5c0917c175
factor out the grow() method for all pod implementations into one
...
common function. It is still an inline method, which will be fixed next.
llvm-svn: 91526
2009-12-16 08:34:40 +00:00
Victor Hernandez
2003b90807
Use different name for argument and field
...
llvm-svn: 91524
2009-12-16 08:10:57 +00:00
Chris Lattner
f684b9039d
pull destroy_range and uninitialized_copy up to the
...
SmallVectorTemplateBase class, which allows us to statically
dispatch on isPodLike instead of dynamically.
llvm-svn: 91523
2009-12-16 08:09:23 +00:00
Chris Lattner
acc0e62625
sink most of the meat in smallvector back from SmallVectorTemplateCommon
...
down into SmallVectorImpl. This requires sprinking a ton of this->'s in,
but gives us a place to factor.
llvm-svn: 91522
2009-12-16 08:05:48 +00:00
Nick Lewycky
23fbd54cfe
Make this test pass on Linux.
...
llvm-svn: 91521
2009-12-16 07:35:25 +00:00
Chris Lattner
8b8d01829e
substantial refactoring of SmallVector, now most code is in SmallVectorTemplateCommon,
...
and there is a new SmallVectorTemplateBase class in between it and SmallVectorImpl.
SmallVectorTemplateBase can be specialized based on isPodLike.
llvm-svn: 91518
2009-12-16 06:55:45 +00:00
Victor Hernandez
dd7418ae3f
MDNodes that refer to an instruction are local to a function; in that case, explicitly keep track of the function they are local to
...
llvm-svn: 91497
2009-12-16 02:52:09 +00:00
Johnny Chen
466231ab92
Add encoding bits for some Thumb instructions. Plus explicitly set the top two
...
bytes of Inst to 0x0000 for the benefit of the Thumb decoder.
llvm-svn: 91496
2009-12-16 02:32:54 +00:00
Devang Patel
c69d9607f8
XFAIL on ppc-darwin.
...
llvm-svn: 91495
2009-12-16 02:11:38 +00:00
Evan Cheng
1be6286028
Re-enable 91381 with fixes.
...
llvm-svn: 91489
2009-12-16 00:53:11 +00:00
Chris Lattner
177be32334
revert my strstr optimization, I'm told it breaks x86-64 bootstrap.
...
Will reapply with a fix when I get a chance.
llvm-svn: 91486
2009-12-16 00:46:02 +00:00
Dale Johannesen
56f041406d
Do better with physical reg operands (typically, from inline asm)
...
in local register allocator. If a reg-reg copy has a phys reg
input and a virt reg output, and this is the last use of the phys
reg, assign the phys reg to the virt reg. If a reg-reg copy has
a phys reg output and we need to reload its spilled input, reload
it directly into the phys reg than passing it through another reg.
Following 76208, there is sometimes no dependency between the def of
a phys reg and its use; this creates a window where that phys reg
can be used for spilling (this is true in linear scan also). This
is bad and needs to be fixed a better way, although 76208 works too
well in practice to be reverted. However, there should normally be
no spilling within inline asm blocks. The patch here goes a long way
towards making this actually be true.
llvm-svn: 91485
2009-12-16 00:29:41 +00:00
John McCall
826ca5630e
Every anonymous namespace is different. Caught by clang++.
...
llvm-svn: 91481
2009-12-16 00:15:28 +00:00
John McCall
323c30c5f4
Explicit template instantiations must happen in the template's immediately
...
enclosing namespace. Caught by clang++.
llvm-svn: 91480
2009-12-16 00:13:24 +00:00
Bill Wendling
2d5967d005
Helpful comment added. Some code cleanup. No functional change.
...
llvm-svn: 91479
2009-12-16 00:08:36 +00:00
Bill Wendling
3766491eee
Initialize uninitialized variables.
...
llvm-svn: 91477
2009-12-16 00:01:27 +00:00
Bill Wendling
776ef4dd32
Initialize uninitialized variables.
...
llvm-svn: 91475
2009-12-16 00:00:18 +00:00