Commit Graph

29088 Commits

Author SHA1 Message Date
Dan Gohman
62849c065e Teach GetMinSignBits about SCEVAddExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 01:05:09 +00:00
Daniel Dunbar
a11af531ec Start MCAsmStreamer implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 01:03:06 +00:00
Dan Gohman
fd6325cbb2 Revert this accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:55:55 +00:00
Dan Gohman
6bbcba18db Move the special cases for constants out of getUnknown and into
createSCEV. Also, recognize UndefValue in createSCEV.

Change getIntegerSCEV's comment to avoid mentioning FP types,
and re-implement it in terms of getConstant instead of getUnknown.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:54:57 +00:00
Dan Gohman
b8be8b70a2 Use ScalarEvolution::getConstant instead of getUnknown to create
SCEVConstants. This cleanup is a step toward letting getUnknown
be simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:38:39 +00:00
Dan Gohman
aa551ae10e Include the maximum trip count expression in ScalarEvolution's print output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:33:16 +00:00
Dan Gohman
4d289bf4af Add an isAllOnesValue utility function, similar to isZero and isOne.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:30:26 +00:00
Dan Gohman
ea080be986 Don't emit a redundant BitCastInst if the value to be defined in the
preheader is already an instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:28:59 +00:00
Owen Anderson
6b96f6cfeb Guard the listeners list. Unfortunately, this requires a real static rather
than a managed static because other managed statics can (and do) access this
list in their destructors.  Yes, I know it's horrible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:25:42 +00:00
Bob Wilson
a96751fc8f Provide InitializeAllTargets and InitializeNativeTarget functions in the
C bindings.  Change all the backend "Initialize" functions to have C linkage.
Change the "llvm/Config/Targets.def" header to use C-style comments to avoid
compile warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 23:59:40 +00:00
Daniel Dunbar
ba1da8a7b1 Update for MCImm -> MCValue rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 23:39:15 +00:00
Sean Callanan
1c97ceb5e2 Test commit: fixed spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 23:25:37 +00:00
Devang Patel
9af2fa879c It is not a good idea to have data member's name match argument's name. In fact, it is a simple receipe to waste an hour or so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 22:25:41 +00:00
Devang Patel
d933803b51 Use getReturnTypeName() to print return type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 22:23:13 +00:00
Daniel Dunbar
ecc63f8687 Start flushing out MCContext.
- Lives inside new library lib/MC (LLVMMC.a)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 22:01:43 +00:00
Owen Anderson
92915e31e9 Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 21:19:38 +00:00
Owen Anderson
e0fa0b42b2 Add atomic multiply and divide operations, built on top of CompareAndSwap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 21:19:04 +00:00
Owen Anderson
46d9a64944 Make timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking rather than atomic arithmetic),
but should work on all the platforms we care about.

I might revisit this if a totally awesome way to do it occurs to me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:52:29 +00:00
Owen Anderson
6f2c64d70a Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:17:22 +00:00
Evan Cheng
b8f7706911 Test instructions operands were printed in the wrong order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:56:37 +00:00
Bill Wendling
5c324d77d9 "The MMX_MASKMOVQ and MMX_MASKMOVQ64 instructions are labeled as MRMDestMem
instructions, which implies that there is an explicit memory operand.  There is
(however) no explicit memory operand; although this is a store, the only memory
operand is implicit, indicated by DS:EDI.  This causes the table-generation code
for the disassembler to report an error."

Patch by Sean Callanan!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:52:59 +00:00
Lang Hames
b2889959c4 Switched size_t to int64_t to prevent type mismatch in call to max.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:49:23 +00:00
Evan Cheng
a67efd1226 Proper patterns for thumb2 shift and rotate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:39:13 +00:00
Evan Cheng
e870af4837 Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:38:34 +00:00
Evan Cheng
09c39fcf83 Add IsThumb1Only to most 16-bit thumb instructions since we want to isel 32-bit instructions when they are available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:38:13 +00:00
Owen Anderson
f43f9d0ef8 Atomic ops that do arithmetic use signed arithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:30:27 +00:00
Owen Anderson
14112e5169 Actually, these need to be signed integers, not unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:21:13 +00:00
Evan Cheng
e499f97058 Rename SelectShifterOperand to SelectThumb2ShifterOperandReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:14:38 +00:00
Owen Anderson
cd92c1000e Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:12:30 +00:00
Owen Anderson
0de9953e88 Label the existing atomic functions as 32-bit specific, and add a 64-bit one that will be useful in
the near future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:01:04 +00:00
Douglas Gregor
7e9e36a23e Eliminate object-relinking support from CMake. Fixes PR 4429 and
cleans up the CMake-based build system a bit. Started by a patch from
Xerxes Rånby.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:57:35 +00:00
Evan Cheng
83a2129332 Obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:54:26 +00:00
Evan Cheng
f49810c7e6 Initial Thumb2 support. Majority of the work is done by David Goodwin. There are
also some contribution from Jim Grosbach, Bob Wilson, and Evan Cheng.

I've done my best to consolidate the patches with those that were done by
Viktor Kutuzov and Anton Korzh from Access Softek, Inc. Let me know if missed
anything. I've completely reorganized the thumb2 td file, made more extensive
uses of multiclass, etc.

Test cases will be contributed later after I re-organize what's in svn first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:48:47 +00:00
Owen Anderson
5a9c0eeaf2 Add an atomic add operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:39:31 +00:00
Owen Anderson
3b8d135879 Make the lazy initialization of DefaultTimerGroup threadsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:33:37 +00:00
Owen Anderson
200aa6d89b Revert r73923, which broke clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 16:36:10 +00:00
Sanjiv Gupta
ae99227ef9 Fold the add (ptr, offset) into ptr[offset] only if the offset is small enough. movwi and moviw allow value of 5-bits only (i.e. 32).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 07:10:19 +00:00
Evan Cheng
e07715cfba Minor reorg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 05:25:29 +00:00
Evan Cheng
3850a6ae9d Replace isTwoAddress with operand constraint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 05:23:49 +00:00
Bruno Cardoso Lopes
e39493eb1b Use a default alignment for data and bss sections.
Only pad when the section size > 0 and move the code that deals
with globals initializers to a place we know for sure the global
is initialized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 04:39:27 +00:00
Owen Anderson
606e9eb6e6 Guard the layout info object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 00:21:15 +00:00
Owen Anderson
61ffc0c7fd Guard the plugin loader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 00:02:39 +00:00
Owen Anderson
af2e2b54b6 Add guards around timer groups, which can be shared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:37:06 +00:00
Dan Gohman
91380b7239 Fix a bug in the trip-count computation with And/Or. If either of the
sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:28:56 +00:00
Bob Wilson
5bafff36c7 Add support for ARM's Advanced SIMD (NEON) instruction set.
This is still a work in progress but most of the NEON instruction set
is supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:27:02 +00:00
Owen Anderson
5de83afcdc Guard the statistics table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:08:27 +00:00
Owen Anderson
521db56182 Guard the global annotation tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 22:44:15 +00:00
Owen Anderson
c226570bde Add locking around the external function lookup table for the interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 22:30:56 +00:00
Owen Anderson
e7b6118a51 Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 22:09:07 +00:00
Dan Gohman
469f3cdc13 Fix a few minor issues that were exposed by the removal of SCEVHandle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 22:08:45 +00:00