Owen Anderson
844cf0aa3f
Simplify by using no-op-when-not-multithreaded locks.
...
llvm-svn: 73719
2009-06-18 20:36:21 +00:00
Dan Gohman
da82dc2ec1
Generalize LSR's OptimizeSMax to handle unsigned max tests as well
...
as signed max tests. Along with r73717, this helps CodeGen avoid
emitting code for a maximum operation for this class of loop.
llvm-svn: 73718
2009-06-18 20:23:18 +00:00
Dan Gohman
cc9634d988
Recognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGE
...
comparisons were recognized for umax, but instcombine canonicalizes
unsigned comparisons with zero to this simpler form.
llvm-svn: 73717
2009-06-18 20:21:07 +00:00
Owen Anderson
cc8947381f
Simplify using mutexes that become no-ops when not in multithreaded mode.
...
llvm-svn: 73716
2009-06-18 20:15:26 +00:00
Anton Korobeynikov
fed9dcc88c
Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.
...
llvm-svn: 73715
2009-06-18 20:05:31 +00:00
Owen Anderson
5d40f51e4e
Simplify a lot of code by using a R/W mutex that becomes a no-op when multithreading is disabled.
...
llvm-svn: 73714
2009-06-18 19:10:19 +00:00
Owen Anderson
377fe286ca
Use SmartMutex to simplify.
...
llvm-svn: 73712
2009-06-18 18:36:34 +00:00
Owen Anderson
a1d2310ac7
Simplify the SmartMutex implementation a bit.
...
llvm-svn: 73711
2009-06-18 18:29:03 +00:00
Owen Anderson
4760da0a7a
Give RWMutex the SmartRWMutex treatment too.
...
llvm-svn: 73710
2009-06-18 18:26:15 +00:00
Owen Anderson
9aaa6b8958
Insert a SmartMutex templated class into the class hierarchy, which takes a template parameter specifying whether this mutex
...
should become a no-op when not running in multithreaded mode. Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility.
llvm-svn: 73709
2009-06-18 17:53:17 +00:00
Ted Kremenek
e88e953645
Update CMake files to account for new location of Threading.cpp.
...
llvm-svn: 73708
2009-06-18 17:47:09 +00:00
Owen Anderson
a59f91c08d
Move Threading.[h|cpp] from Support to System.
...
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Dan Gohman
fd857b0406
Remove the code from IVUsers that attempted to handle
...
casted induction variables in cases where the cast
isn't foldable. It ended up being a pessimization in
many cases. This could be fixed, but it would require
a bunch of complicated code in IVUsers' clients. The
advantages of this approach aren't visible enough to
justify it at this time.
llvm-svn: 73706
2009-06-18 16:54:06 +00:00
Dan Gohman
dc884a7830
Generalize the zext(trunc(t) & C) instcombine to work even with
...
C is not a low-bits mask, and add a similar instcombine for
zext((trunc(t) & C) ^ C).
llvm-svn: 73705
2009-06-18 16:30:21 +00:00
Dan Gohman
b426c5dd35
Update a comment to reflect the code.
...
llvm-svn: 73704
2009-06-18 16:24:47 +00:00
Owen Anderson
7d2d5c974e
Fix the double checked locking in this file too.
...
llvm-svn: 73703
2009-06-18 16:17:42 +00:00
Owen Anderson
a74e3d8a1c
As pointed out by Duncan, I accidentally dropped the first MemoryFence of the
...
double-checked locking pattern here.
llvm-svn: 73701
2009-06-18 16:08:27 +00:00
Anton Korobeynikov
82ab724191
Forgot to commit this hunk
...
llvm-svn: 73693
2009-06-18 08:30:57 +00:00
Anton Korobeynikov
e492bc7546
Propagate calling conv for invokes too
...
llvm-svn: 73692
2009-06-18 08:13:56 +00:00
Chris Lattner
47e29d1422
Don't use int8_t, that requires DataTypes.h
...
llvm-svn: 73682
2009-06-18 04:56:53 +00:00
Owen Anderson
f71490c586
Fix build when disable thread support.
...
Patch by Howard Su.
llvm-svn: 73680
2009-06-18 04:44:46 +00:00
Zhongxing Xu
8b992b2a97
include header for uint8_t.
...
llvm-svn: 73675
2009-06-18 04:11:43 +00:00
Nick Lewycky
bd1de19b3f
Add braces to clarify if/else structure and remove warning.
...
llvm-svn: 73673
2009-06-18 03:01:42 +00:00
Evan Cheng
82a8ab8a8e
- Update register allocation hint after coalescing. This is done by the target since the hint is target dependent. This is important for ARM register pair hints.
...
- Register allocator should resolve the second part of the hint (register number) before passing it to the target since it knows virtual register to physical register mapping.
- More fixes to get ARM load / store double word working.
llvm-svn: 73671
2009-06-18 02:04:01 +00:00
Dale Johannesen
6bffdac70a
It looks like nobody is working on PR 4158, so I'm
...
adding a check to catch this case at compile time
instead of quietly generating incorrect code.
That will at least let us identify CBE failures
that are not due to this problem.
llvm-svn: 73668
2009-06-18 01:07:23 +00:00
Dan Gohman
9b236593c3
Fix trailing whitespace from ScalarEvolution::print.
...
llvm-svn: 73666
2009-06-18 00:37:45 +00:00
Bob Wilson
1866500851
ARM unified syntax is not specific to ELF; use it for Darwin, too.
...
llvm-svn: 73665
2009-06-18 00:36:17 +00:00
Dan Gohman
e72fd546a2
Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.
...
If C is a single bit and the and gets analyzed as a truncate and
zero-extend, the xor can be represnted as an add.
llvm-svn: 73664
2009-06-18 00:00:20 +00:00
Dan Gohman
eb8d3f5fd5
Delete unnecessary braces.
...
llvm-svn: 73663
2009-06-17 23:54:37 +00:00
Owen Anderson
00e7ebbc38
Reapply r73647 in a non-broken form.
...
llvm-svn: 73662
2009-06-17 23:49:06 +00:00
Anton Korobeynikov
dbb79a8409
Fix asm string from MOVi16
...
llvm-svn: 73661
2009-06-17 23:43:36 +00:00
Anton Korobeynikov
4e0c3634cc
Thumb2 instructions are enabled only in unified assembler mode.
...
Emit switch directive for it. I have no idea whether this is
requirement for Darwin or not.
llvm-svn: 73660
2009-06-17 23:43:18 +00:00
Dan Gohman
1530824138
Instcombine zext(trunc(x) & mask) to x&mask, even if the trunc has
...
multiple users.
llvm-svn: 73656
2009-06-17 23:17:05 +00:00
Owen Anderson
66eb50a125
Use double-checked locking for this lazy initialization.
...
llvm-svn: 73653
2009-06-17 22:53:57 +00:00
Owen Anderson
0e2a78e820
Protect the GC table in Function.cpp
...
llvm-svn: 73647
2009-06-17 22:23:31 +00:00
Anton Korobeynikov
77a0bd41fc
Honour calling convention and attributes of Callee by default.
...
llvm-svn: 73646
2009-06-17 22:20:46 +00:00
Owen Anderson
2db8ec3635
Use atomic increment here.
...
llvm-svn: 73643
2009-06-17 22:01:09 +00:00
Owen Anderson
327464c4d3
Thread-safe (and ManagedStatic-ized) LeakDetector!
...
llvm-svn: 73642
2009-06-17 21:56:05 +00:00
Owen Anderson
4874790cb9
Guard mutation of the timing info global.
...
llvm-svn: 73639
2009-06-17 21:28:54 +00:00
Owen Anderson
a4471607bc
We need to use double-checked locking for lazy initialization in this case when running multithreaded.
...
llvm-svn: 73636
2009-06-17 21:16:20 +00:00
Stefanus Du Toit
bbf53428f9
Fix link to BasicBlock doxygen documentation in Programmer's Manual
...
llvm-svn: 73635
2009-06-17 21:12:26 +00:00
Lang Hames
5c64015a56
VNInfo cleanup.
...
llvm-svn: 73634
2009-06-17 21:01:20 +00:00
Dan Gohman
50b7d0d843
Add -disable-output to a bunch of tests that don't care about the output.
...
llvm-svn: 73633
2009-06-17 20:56:26 +00:00
Dale Johannesen
26f0dd9021
This fixes a bug introduced in 72661, which can
...
move loads back past a check that the load address
is valid, see new testcase. The test that went
in with 72661 has exactly this case, except that
the conditional it's moving past is checking
something else; I've settled for changing that
test to reference a global, not a pointer. It
may be possible to scan all the tests you pass and
make sure none of them are checking any component
of the address, but it's not trivial and I'm not
trying to do that here.
llvm-svn: 73632
2009-06-17 20:48:23 +00:00
Owen Anderson
b43a8ba8e5
Factor out some common code.
...
llvm-svn: 73631
2009-06-17 20:43:39 +00:00
Owen Anderson
f8776799ec
Add an RAII ScopedWriter, which allows one to acquire a writer lock for the duration of a scope. Simplify a lot of uses of
...
writer locks in Constants.cpp by using it.
llvm-svn: 73630
2009-06-17 20:34:43 +00:00
Owen Anderson
3bf7bd1297
Simplify the locking on the Constants tables, and make it more efficient, by pushing it into the ValueMap from the callers.
...
Document those ValueMap functions that are _not_ locked, so that callers are aware that they need to do the locking themselves.
llvm-svn: 73628
2009-06-17 20:10:08 +00:00
Torok Edwin
09a9b85420
Add debug message about non-local loads being clobbered.
...
llvm-svn: 73625
2009-06-17 18:48:18 +00:00
Owen Anderson
fedb566872
Type safety for Constants.cpp! Some of this is temporary, as I'm planning to push some of the R/W locking into FoldingSet.
...
llvm-svn: 73624
2009-06-17 18:40:29 +00:00
Anton Korobeynikov
7fd29c57a8
Initial support for some Thumb2 instructions.
...
Patch by Viktor Kutuzov and Anton Korzh from Access Softek, Inc.
llvm-svn: 73622
2009-06-17 18:13:58 +00:00