oota-llvm.git
15 years agoIt is not a good idea to have data member's name match argument's name. In fact,...
Devang Patel [Tue, 23 Jun 2009 22:25:41 +0000 (22:25 +0000)]
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

15 years agoUse getReturnTypeName() to print return type.
Devang Patel [Tue, 23 Jun 2009 22:23:13 +0000 (22:23 +0000)]
Use getReturnTypeName() to print return type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74017 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupgrade
Devang Patel [Tue, 23 Jun 2009 22:11:37 +0000 (22:11 +0000)]
upgrade

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74016 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd DISubprogram::getReturnTypeName()
Devang Patel [Tue, 23 Jun 2009 22:07:48 +0000 (22:07 +0000)]
Add DISubprogram::getReturnTypeName()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74015 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStart flushing out MCContext.
Daniel Dunbar [Tue, 23 Jun 2009 22:01:43 +0000 (22:01 +0000)]
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

15 years agoSet svn:ignore for {llvm/Config/AsmPrinters,Targets}.def
Daniel Dunbar [Tue, 23 Jun 2009 21:55:46 +0000 (21:55 +0000)]
Set svn:ignore for {llvm/Config/AsmPrinters,Targets}.def

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74010 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse atomic operations when accessing statistics, and make the lazy initialization...
Owen Anderson [Tue, 23 Jun 2009 21:19:38 +0000 (21:19 +0000)]
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

15 years agoAdd atomic multiply and divide operations, built on top of CompareAndSwap.
Owen Anderson [Tue, 23 Jun 2009 21:19:04 +0000 (21:19 +0000)]
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

15 years agoReinstate target dependencies on Table_gen targets in CMake
Douglas Gregor [Tue, 23 Jun 2009 21:05:21 +0000 (21:05 +0000)]
Reinstate target dependencies on Table_gen targets in CMake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74003 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking...
Owen Anderson [Tue, 23 Jun 2009 20:52:29 +0000 (20:52 +0000)]
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

15 years agoTemporary copy-pasto to make examples compile.
Mikhail Glushenkov [Tue, 23 Jun 2009 20:47:24 +0000 (20:47 +0000)]
Temporary copy-pasto to make examples compile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74001 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake llvmc work again.
Mikhail Glushenkov [Tue, 23 Jun 2009 20:46:48 +0000 (20:46 +0000)]
Make llvmc work again.

Chris recently broke llvmc with his Makefile changes (r75379). That patch made
the global change .o -> .a, which caused built-in llvmc plugins to stop working
since plugin initialization in llvmc is based on static variables not referenced
from the main executable. This patch implements auto-generated forced references
to the plugin libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74000 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTypo.
Mikhail Glushenkov [Tue, 23 Jun 2009 20:46:00 +0000 (20:46 +0000)]
Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73999 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA little bit nicer formatting.
Mikhail Glushenkov [Tue, 23 Jun 2009 20:45:31 +0000 (20:45 +0000)]
A little bit nicer formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73998 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTypo.
Mikhail Glushenkov [Tue, 23 Jun 2009 20:45:07 +0000 (20:45 +0000)]
Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73997 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStart sketching MCStreamer interface.
Daniel Dunbar [Tue, 23 Jun 2009 20:24:17 +0000 (20:24 +0000)]
Start sketching MCStreamer interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73994 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert my last series of commits related to Timer and 64-bit atomics. Not all the...
Owen Anderson [Tue, 23 Jun 2009 20:17:22 +0000 (20:17 +0000)]
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

15 years agoAdd include file to get the type for in64_t.
Bill Wendling [Tue, 23 Jun 2009 20:02:00 +0000 (20:02 +0000)]
Add include file to get the type for in64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73991 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest instructions operands were printed in the wrong order.
Evan Cheng [Tue, 23 Jun 2009 19:56:37 +0000 (19:56 +0000)]
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

15 years ago"The MMX_MASKMOVQ and MMX_MASKMOVQ64 instructions are labeled as MRMDestMem
Bill Wendling [Tue, 23 Jun 2009 19:52:59 +0000 (19:52 +0000)]
"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

15 years agoSwitched size_t to int64_t to prevent type mismatch in call to max.
Lang Hames [Tue, 23 Jun 2009 19:49:23 +0000 (19:49 +0000)]
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

15 years agoProper patterns for thumb2 shift and rotate instructions.
Evan Cheng [Tue, 23 Jun 2009 19:39:13 +0000 (19:39 +0000)]
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

15 years agoCode clean up.
Evan Cheng [Tue, 23 Jun 2009 19:38:34 +0000 (19:38 +0000)]
Code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73986 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd IsThumb1Only to most 16-bit thumb instructions since we want to isel 32-bit instr...
Evan Cheng [Tue, 23 Jun 2009 19:38:13 +0000 (19:38 +0000)]
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

15 years agoadd a simple MCImm class.
Chris Lattner [Tue, 23 Jun 2009 18:58:00 +0000 (18:58 +0000)]
add a simple MCImm class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73984 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe correct values here (as defined by gcc-4.2) are
Dale Johannesen [Tue, 23 Jun 2009 18:42:26 +0000 (18:42 +0000)]
The correct values here (as defined by gcc-4.2) are
different for ppc; add another version of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73983 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorefactor a bunch of X86 specific stuff out to its own file.
Chris Lattner [Tue, 23 Jun 2009 18:41:30 +0000 (18:41 +0000)]
refactor a bunch of X86 specific stuff out to its own file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73982 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis test only works on ppc32 if some optimization is done before
Dale Johannesen [Tue, 23 Jun 2009 18:34:37 +0000 (18:34 +0000)]
This test only works on ppc32 if some optimization is done before
generating LLVM IR; it is correct in the code as written
to use 8-byte-aligned operations to copy Key in bar.  Formerly
the gcc inliner was run, now it isn't.  I don't think it's
possible to preserve this as a pure FE test.  Adding -O2 lets
the llvm optimizers get rid of the 8-byte-aligned stores, at least.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73981 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAtomic ops that do arithmetic use signed arithmetic.
Owen Anderson [Tue, 23 Jun 2009 18:30:27 +0000 (18:30 +0000)]
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

15 years agoCMake: remove support for llvm-config-generated dependencies in the build
Douglas Gregor [Tue, 23 Jun 2009 18:30:17 +0000 (18:30 +0000)]
CMake: remove support for llvm-config-generated dependencies in the build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73979 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoActually, these need to be signed integers, not unsigned.
Owen Anderson [Tue, 23 Jun 2009 18:21:13 +0000 (18:21 +0000)]
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

15 years agoRename SelectShifterOperand to SelectThumb2ShifterOperandReg.
Evan Cheng [Tue, 23 Jun 2009 18:14:38 +0000 (18:14 +0000)]
Rename SelectShifterOperand to SelectThumb2ShifterOperandReg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73975 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse 64-bit integer counters for tracking time, rather than doubles. This will be...
Owen Anderson [Tue, 23 Jun 2009 18:12:30 +0000 (18:12 +0000)]
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

15 years agoSee test. Judging from PR 1278, at the time the test was committed, the
Dale Johannesen [Tue, 23 Jun 2009 18:03:49 +0000 (18:03 +0000)]
See test.  Judging from PR 1278, at the time the test was committed, the
generated code was apparently doing stores directly into the return value
aggregate; now, it's doing a copy from a compiler-generated static object.
That object is initialized using [4 x i8] which breaks the test.  I believe
this change preserves the original point of the test.

Of course it would be better for the code to do stores directly into the
return aggregate, but that is not what happens at -O0; the llvm optimizers
seem to do that on x86 but not on ppc32, possibly because of the explicit
padding (which is unavoidable).  I think it must have been being done by
a gcc optimizer pass before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73972 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLabel the existing atomic functions as 32-bit specific, and add a 64-bit one that...
Owen Anderson [Tue, 23 Jun 2009 18:01:04 +0000 (18:01 +0000)]
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

15 years agoEliminate some unused code in CMa'e add_llvm_target. No functionality change.
Douglas Gregor [Tue, 23 Jun 2009 17:58:51 +0000 (17:58 +0000)]
Eliminate some unused code in CMa'e add_llvm_target. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73970 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate object-relinking support from CMake. Fixes PR 4429 and
Douglas Gregor [Tue, 23 Jun 2009 17:57:35 +0000 (17:57 +0000)]
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

15 years agoObvious typo.
Evan Cheng [Tue, 23 Jun 2009 17:54:26 +0000 (17:54 +0000)]
Obvious typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73967 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd an accessor.
Chris Lattner [Tue, 23 Jun 2009 17:50:34 +0000 (17:50 +0000)]
add an accessor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73966 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial Thumb2 support. Majority of the work is done by David Goodwin. There are
Evan Cheng [Tue, 23 Jun 2009 17:48:47 +0000 (17:48 +0000)]
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

15 years agoAdd an atomic add operation.
Owen Anderson [Tue, 23 Jun 2009 17:39:31 +0000 (17:39 +0000)]
Add an atomic add operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73964 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the lazy initialization of DefaultTimerGroup threadsafe.
Owen Anderson [Tue, 23 Jun 2009 17:33:37 +0000 (17:33 +0000)]
Make the lazy initialization of DefaultTimerGroup threadsafe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73963 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate configure script
Douglas Gregor [Tue, 23 Jun 2009 17:22:05 +0000 (17:22 +0000)]
Regenerate configure script

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73962 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWork around build problem with OpenJDK, which defines X86 as a
Douglas Gregor [Tue, 23 Jun 2009 17:21:35 +0000 (17:21 +0000)]
Work around build problem with OpenJDK, which defines X86 as a
macro. Fixes PR 4427. Patch by Xerxes RĂ„nby!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73961 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd myself to the list.
Bob Wilson [Tue, 23 Jun 2009 17:03:23 +0000 (17:03 +0000)]
Add myself to the list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73959 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r73923, which broke clang.
Owen Anderson [Tue, 23 Jun 2009 16:36:10 +0000 (16:36 +0000)]
Revert r73923, which broke clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73957 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFold the add (ptr, offset) into ptr[offset] only if the offset is small enough. movwi...
Sanjiv Gupta [Tue, 23 Jun 2009 07:10:19 +0000 (07:10 +0000)]
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

15 years agoimplement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s
Chris Lattner [Tue, 23 Jun 2009 05:57:07 +0000 (05:57 +0000)]
implement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73950 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor reorg.
Evan Cheng [Tue, 23 Jun 2009 05:25:29 +0000 (05:25 +0000)]
Minor reorg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73948 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReplace isTwoAddress with operand constraint.
Evan Cheng [Tue, 23 Jun 2009 05:23:49 +0000 (05:23 +0000)]
Replace isTwoAddress with operand constraint.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73947 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse a default alignment for data and bss sections.
Bruno Cardoso Lopes [Tue, 23 Jun 2009 04:39:27 +0000 (04:39 +0000)]
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

15 years agoget a definition of strull on windows, thanks to Howard Su.
Chris Lattner [Tue, 23 Jun 2009 00:24:36 +0000 (00:24 +0000)]
get a definition of strull on windows, thanks to Howard Su.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73929 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGuard the layout info object.
Owen Anderson [Tue, 23 Jun 2009 00:21:15 +0000 (00:21 +0000)]
Guard the layout info object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73928 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGuard the plugin loader.
Owen Anderson [Tue, 23 Jun 2009 00:02:39 +0000 (00:02 +0000)]
Guard the plugin loader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73925 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd guards around timer groups, which can be shared.
Owen Anderson [Mon, 22 Jun 2009 23:37:06 +0000 (23:37 +0000)]
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

15 years agoFix a bug in the trip-count computation with And/Or. If either of the
Dan Gohman [Mon, 22 Jun 2009 23:28:56 +0000 (23:28 +0000)]
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

15 years agoAdd support for ARM's Advanced SIMD (NEON) instruction set.
Bob Wilson [Mon, 22 Jun 2009 23:27:02 +0000 (23:27 +0000)]
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

15 years agoGuard the statistics table.
Owen Anderson [Mon, 22 Jun 2009 23:08:27 +0000 (23:08 +0000)]
Guard the statistics table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73916 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGuard the global annotation tables.
Owen Anderson [Mon, 22 Jun 2009 22:44:15 +0000 (22:44 +0000)]
Guard the global annotation tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73913 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd locking around the external function lookup table for the interpreter.
Owen Anderson [Mon, 22 Jun 2009 22:30:56 +0000 (22:30 +0000)]
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

15 years agoRemove unneeded #include.
Owen Anderson [Mon, 22 Jun 2009 22:09:07 +0000 (22:09 +0000)]
Remove unneeded #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73911 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a few minor issues that were exposed by the removal of SCEVHandle.
Dan Gohman [Mon, 22 Jun 2009 22:08:45 +0000 (22:08 +0000)]
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

15 years agoAdd explicit types for shift count constants. This is in preparation for
Bob Wilson [Mon, 22 Jun 2009 22:08:29 +0000 (22:08 +0000)]
Add explicit types for shift count constants.  This is in preparation for
another change that makes the types ambiguous (at least as far as tablegen
is concerned).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73909 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix llvm::ComputeNumSignBits to handle pointer types
Dan Gohman [Mon, 22 Jun 2009 22:02:32 +0000 (22:02 +0000)]
Fix llvm::ComputeNumSignBits to handle pointer types
conservatively correctly, instead of aborting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73908 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the parent pointer from SCEV, since it did not end up being needed.
Owen Anderson [Mon, 22 Jun 2009 21:57:23 +0000 (21:57 +0000)]
Remove the parent pointer from SCEV, since it did not end up being needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73907 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSCEVHandle is no more!
Owen Anderson [Mon, 22 Jun 2009 21:39:50 +0000 (21:39 +0000)]
SCEVHandle is no more!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73906 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse thumb2 for ARM architectures V6T2 and later. Fix a bug in checking
Bob Wilson [Mon, 22 Jun 2009 21:28:22 +0000 (21:28 +0000)]
Use thumb2 for ARM architectures V6T2 and later.  Fix a bug in checking
for "thumb" and add a check for V6T2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73905 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some typos that Duncan noticed.
Dan Gohman [Mon, 22 Jun 2009 21:10:22 +0000 (21:10 +0000)]
Fix some typos that Duncan noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73903 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIt's coalescer, not coaleser.
Evan Cheng [Mon, 22 Jun 2009 21:09:17 +0000 (21:09 +0000)]
It's coalescer, not coaleser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73902 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor Darwin on ARMv6 and newer, make register r9 available for use as a
Bob Wilson [Mon, 22 Jun 2009 21:01:46 +0000 (21:01 +0000)]
For Darwin on ARMv6 and newer, make register r9 available for use as a
caller-saved register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73901 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix memcpy expansion so it won't generate invalid
Dale Johannesen [Mon, 22 Jun 2009 20:59:07 +0000 (20:59 +0000)]
Fix memcpy expansion so it won't generate invalid
types for the target (I think).  This was breaking
the PPC32 calling sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73900 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix another register coalescer crash: forgot to check if the instruction being update...
Evan Cheng [Mon, 22 Jun 2009 20:49:32 +0000 (20:49 +0000)]
Fix another register coalescer crash: forgot to check if the instruction being updated has already been coalesced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73898 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse different functions to emit the string and symbol tables.
Bruno Cardoso Lopes [Mon, 22 Jun 2009 19:29:56 +0000 (19:29 +0000)]
Use different functions to emit the string and symbol tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73895 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd more methods to gather target specific elf stuff
Bruno Cardoso Lopes [Mon, 22 Jun 2009 19:16:16 +0000 (19:16 +0000)]
Add more methods to gather target specific elf stuff
Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64.
Use a map to track global values to their symbol table indexes
Code cleanup and small fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73894 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agohasFP should return true if frame address is taken.
Evan Cheng [Mon, 22 Jun 2009 18:38:48 +0000 (18:38 +0000)]
hasFP should return true if frame address is taken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBanish global state from ScalarEvolution! SCEV uniquing is now done by tables attach...
Owen Anderson [Mon, 22 Jun 2009 18:25:46 +0000 (18:25 +0000)]
Banish global state from ScalarEvolution!  SCEV uniquing is now done by tables attached to the ScalarEvolution pass.
This also throws out the SCEV reference counting scheme, as the the SCEVs now have a lifetime controlled by the
ScalarEvolution pass.

Note that SCEVHandle is now a no-op, and will be remove in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73892 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRecognize and handle ARM v7 target triples for Darwin.
Bob Wilson [Mon, 22 Jun 2009 18:01:28 +0000 (18:01 +0000)]
Recognize and handle ARM v7 target triples for Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73889 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix llvm-gcc build for armv6t2 and later architectures. The hasV6T2Ops
Bob Wilson [Mon, 22 Jun 2009 17:29:13 +0000 (17:29 +0000)]
Fix llvm-gcc build for armv6t2 and later architectures.  The hasV6T2Ops
predicate does not check if Thumb mode is enabled, and when in ARM mode
there are still some checks for constant-pool use that need to run.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73887 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake use of getUMinFromMismatchedTypes when computing backedge-taken
Dan Gohman [Mon, 22 Jun 2009 15:09:28 +0000 (15:09 +0000)]
Make use of getUMinFromMismatchedTypes when computing backedge-taken
counts for loops with multiple exits, replacing more conservative code
which only handled constants. This is derived from a patch by
Nick Lewycky.

This also fixes llc aborts in ClamAV and others, as
getUMinFromMismatchedTypes takes care of balancing the types before
working with them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73884 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a getUMinFromMismatchedTypes helper function.
Dan Gohman [Mon, 22 Jun 2009 15:03:27 +0000 (15:03 +0000)]
Add a getUMinFromMismatchedTypes helper function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73883 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInclude cstdio to get EOF, needed with gcc-4.4.
Duncan Sands [Mon, 22 Jun 2009 06:59:32 +0000 (06:59 +0000)]
Include cstdio to get EOF, needed with gcc-4.4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73879 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoprocess memory operands with a parenthesized expression for a displacement,
Chris Lattner [Mon, 22 Jun 2009 06:35:58 +0000 (06:35 +0000)]
process memory operands with a parenthesized expression for a displacement,
like "(4+5)(%eax)".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73878 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement full support for parsing primary expressions. We can now parse
Chris Lattner [Mon, 22 Jun 2009 06:32:03 +0000 (06:32 +0000)]
Implement full support for parsing primary expressions.  We can now parse
all of health and voronoi (ignoring directives).  We only get 409 lines into
176.gcc though because we don't have binary operators yet:

Parsing 176.gcc.llc.s:409: unexpected token in operand list
movsbl _arityvec+1(,%edi,8), %eax
                ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73877 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement parser support for '*' operands, as in "call *%eax".
Chris Lattner [Mon, 22 Jun 2009 06:02:13 +0000 (06:02 +0000)]
implement parser support for '*' operands, as in "call *%eax".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73876 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement memory operand parsing.
Chris Lattner [Mon, 22 Jun 2009 05:51:26 +0000 (05:51 +0000)]
implement memory operand parsing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73875 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for (llvm-gcc) 73873. Usually
Dale Johannesen [Mon, 22 Jun 2009 04:47:32 +0000 (04:47 +0000)]
Testcase for (llvm-gcc) 73873.  Usually
std::pair<double, float*>
is 16 bytes on darwin-powerpc, but not always.
See testcase for full weirdness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73874 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out code for computing umin and smin for SCEV expressions into
Dan Gohman [Mon, 22 Jun 2009 03:18:45 +0000 (03:18 +0000)]
Factor out code for computing umin and smin for SCEV expressions into
helper functions. Based on a patch by Nick Lewycky.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73869 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostart implementing some simple operand parsing.
Chris Lattner [Mon, 22 Jun 2009 01:29:09 +0000 (01:29 +0000)]
start implementing some simple operand parsing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73867 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach ScalarEvolution how to analyze loops with multiple exit
Dan Gohman [Mon, 22 Jun 2009 00:31:57 +0000 (00:31 +0000)]
Teach ScalarEvolution how to analyze loops with multiple exit
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73866 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete an unused variable.
Dan Gohman [Mon, 22 Jun 2009 00:19:17 +0000 (00:19 +0000)]
Delete an unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73865 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix this code to correctly handle loops with multiple exits. Until
Dan Gohman [Mon, 22 Jun 2009 00:15:15 +0000 (00:15 +0000)]
Fix this code to correctly handle loops with multiple exits. Until
now, this hasn't mattered, because ScalarEvolution hasn't been able
to compute trip counts for loops with multiple exits. But it will
soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73864 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename a variable for consistency with the ExitBlock vs ExitingBlock
Dan Gohman [Sun, 21 Jun 2009 23:48:38 +0000 (23:48 +0000)]
Rename a variable for consistency with the ExitBlock vs ExitingBlock
terminology that LoopInfo uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73863 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix ScalarEvolution's backedge-taken count computations to check for
Dan Gohman [Sun, 21 Jun 2009 23:46:38 +0000 (23:46 +0000)]
Fix ScalarEvolution's backedge-taken count computations to check for
overflow when computing a integer division to round up.

Thanks to Nick Lewycky for noticing this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73862 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename SourceMgr::PrintError to PrintMessage.
Chris Lattner [Sun, 21 Jun 2009 21:22:11 +0000 (21:22 +0000)]
rename SourceMgr::PrintError to PrintMessage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoset up the top-level parsing loop.
Chris Lattner [Sun, 21 Jun 2009 20:54:55 +0000 (20:54 +0000)]
set up the top-level parsing loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73860 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostub out parser for asm files. Change invariant on lexer to always
Chris Lattner [Sun, 21 Jun 2009 20:16:42 +0000 (20:16 +0000)]
stub out parser for asm files.  Change invariant on lexer to always
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode.  Add new
-as-lex option to enable lexing mode (vs parsing mode).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73859 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd string literals.
Chris Lattner [Sun, 21 Jun 2009 19:56:35 +0000 (19:56 +0000)]
add string literals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73858 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agohopefully fix the build on linux.
Chris Lattner [Sun, 21 Jun 2009 19:43:50 +0000 (19:43 +0000)]
hopefully fix the build on linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73857 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify some error recovery stuff.
Chris Lattner [Sun, 21 Jun 2009 19:22:49 +0000 (19:22 +0000)]
simplify some error recovery stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73856 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement enough of a lexer to get through Olden/health/Output/health.llc.s
Chris Lattner [Sun, 21 Jun 2009 19:21:25 +0000 (19:21 +0000)]
implement enough of a lexer to get through Olden/health/Output/health.llc.s
without errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73855 91177308-0d34-0410-b5e6-96231b3b80d8