oota-llvm.git
13 years agoTeach FunctionAttrs about AccessesArgumentsReadonly.
Dan Gohman [Tue, 9 Nov 2010 19:56:27 +0000 (19:56 +0000)]
Teach FunctionAttrs about AccessesArgumentsReadonly.

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

13 years agoAdd a trivial virtual dtor to AbstractRegisterDescription to appease
Matt Beaumont-Gay [Tue, 9 Nov 2010 19:56:25 +0000 (19:56 +0000)]
Add a trivial virtual dtor to AbstractRegisterDescription to appease
-Wnon-virtual-dtor.

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

13 years agoAccessesArgumentsReadonly is read-only.
Dan Gohman [Tue, 9 Nov 2010 19:50:00 +0000 (19:50 +0000)]
AccessesArgumentsReadonly is read-only.

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

13 years agoAdd a AccessesArgumentsReadonly ModRefBehavior value, so that the intrinsic
Dan Gohman [Tue, 9 Nov 2010 19:48:55 +0000 (19:48 +0000)]
Add a AccessesArgumentsReadonly ModRefBehavior value, so that the intrinsic
property IntrReadArgMem can be modeled.

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

13 years agoReverting r118604. Windows build broke.
Andrew Trick [Tue, 9 Nov 2010 19:47:51 +0000 (19:47 +0000)]
Reverting r118604. Windows build broke.

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

13 years agoFactor out the logic for onlyReadsMemory into a helper function.
Dan Gohman [Tue, 9 Nov 2010 19:43:24 +0000 (19:43 +0000)]
Factor out the logic for onlyReadsMemory into a helper function.

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

13 years agoDelete AccessesArgumentsAndGlobals, which was unused.
Dan Gohman [Tue, 9 Nov 2010 19:41:37 +0000 (19:41 +0000)]
Delete AccessesArgumentsAndGlobals, which was unused.

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

13 years agoHandle ARM constant pool values that need an explicit reference to the '.'
Jim Grosbach [Tue, 9 Nov 2010 19:40:22 +0000 (19:40 +0000)]
Handle ARM constant pool values that need an explicit reference to the '.'
pseudo-label. (TLS stuff).

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

13 years agoadd a case we fail to devirt.
Chris Lattner [Tue, 9 Nov 2010 19:37:28 +0000 (19:37 +0000)]
add a case we fail to devirt.

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

13 years agoTrailing whitespace.
Jim Grosbach [Tue, 9 Nov 2010 19:22:26 +0000 (19:22 +0000)]
Trailing whitespace.

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

13 years agoAdds RABasic verification and tracing.
Andrew Trick [Tue, 9 Nov 2010 19:01:17 +0000 (19:01 +0000)]
Adds RABasic verification and tracing.

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

13 years agoFurther MCize ARM constant pool values. This allows basic PIC references for
Jim Grosbach [Tue, 9 Nov 2010 18:45:04 +0000 (18:45 +0000)]
Further MCize ARM constant pool values. This allows basic PIC references for
object file emission.

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

13 years agoAdd encoding of Rt to ARM LDR/STR w/ reg+reg offset encoding.
Jim Grosbach [Tue, 9 Nov 2010 18:43:54 +0000 (18:43 +0000)]
Add encoding of Rt to ARM LDR/STR w/ reg+reg offset encoding.

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

13 years agoLast try to get this reference counting right, I swear.
Owen Anderson [Tue, 9 Nov 2010 17:47:10 +0000 (17:47 +0000)]
Last try to get this reference counting right, I swear.

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

13 years agoReally fix the leak in the attributes list. Thanks to Benjamin Kramer for pointing...
Owen Anderson [Tue, 9 Nov 2010 17:46:38 +0000 (17:46 +0000)]
Really fix the leak in the attributes list.  Thanks to Benjamin Kramer for pointing out how I was being stupid.

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

13 years agoFor ARM load/store instructions, encode [reg+reg] with no shifter immediate as
Jim Grosbach [Tue, 9 Nov 2010 17:38:15 +0000 (17:38 +0000)]
For ARM load/store instructions, encode [reg+reg] with no shifter immediate as
a left shift by zero.

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

13 years agoARM .word data fixups don't need an adjustment.
Jim Grosbach [Tue, 9 Nov 2010 17:36:59 +0000 (17:36 +0000)]
ARM .word data fixups don't need an adjustment.

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

13 years agoFactorize code, no functionality change.
Duncan Sands [Tue, 9 Nov 2010 17:25:51 +0000 (17:25 +0000)]
Factorize code, no functionality change.

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

13 years agoFix trailing whitespace and style, no functionality change
Bruno Cardoso Lopes [Tue, 9 Nov 2010 17:25:34 +0000 (17:25 +0000)]
Fix trailing whitespace and style, no functionality change

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

13 years agoAdd encoder method for ARM load/store shifted register offset operands.
Jim Grosbach [Tue, 9 Nov 2010 17:20:53 +0000 (17:20 +0000)]
Add encoder method for ARM load/store shifted register offset operands.

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

13 years agoTestcase for PR8211 (llc crash at -O0).
Duncan Sands [Tue, 9 Nov 2010 16:22:27 +0000 (16:22 +0000)]
Testcase for PR8211 (llc crash at -O0).

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

13 years agoSystem/Path/Windows: Implement GetLLVMDefaultConfigDir.
Michael J. Spencer [Tue, 9 Nov 2010 15:11:42 +0000 (15:11 +0000)]
System/Path/Windows: Implement GetLLVMDefaultConfigDir.

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

13 years agoSystem/Path/Windows: Generalize GetUserHomeDirectory.
Michael J. Spencer [Tue, 9 Nov 2010 15:11:31 +0000 (15:11 +0000)]
System/Path/Windows: Generalize GetUserHomeDirectory.

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

13 years agoSystem/Path/Windows: Make GetSystemLibraryPaths more generic.
Michael J. Spencer [Tue, 9 Nov 2010 15:11:19 +0000 (15:11 +0000)]
System/Path/Windows: Make GetSystemLibraryPaths more generic.

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

13 years agoSystem/Windows: Reduce dependencies.
Michael J. Spencer [Tue, 9 Nov 2010 15:11:07 +0000 (15:11 +0000)]
System/Windows: Reduce dependencies.

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

13 years agoSystem/Windows: Use normalized case and include method.
Michael J. Spencer [Tue, 9 Nov 2010 15:10:56 +0000 (15:10 +0000)]
System/Windows: Use normalized case and include method.

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

13 years agoSystem/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.
Michael J. Spencer [Tue, 9 Nov 2010 15:10:45 +0000 (15:10 +0000)]
System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.

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

13 years agoUpdate comment.
Michael J. Spencer [Tue, 9 Nov 2010 15:10:29 +0000 (15:10 +0000)]
Update comment.

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

13 years agoFix leak in my recent fix for PR8442.
Owen Anderson [Tue, 9 Nov 2010 05:17:47 +0000 (05:17 +0000)]
Fix leak in my recent fix for PR8442.

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

13 years agoFix DAGCombiner to avoid folding a sext-in-reg or similar through a shl
Dan Gohman [Tue, 9 Nov 2010 01:54:35 +0000 (01:54 +0000)]
Fix DAGCombiner to avoid folding a sext-in-reg or similar through a shl
in order to fold it into a load.

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

13 years agoDelete an extraneous svn:executable property.
Dan Gohman [Tue, 9 Nov 2010 01:51:06 +0000 (01:51 +0000)]
Delete an extraneous svn:executable property.

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

13 years agoAdd support for a few simple fixups to the ARM Darwin asm backend. This allows
Jim Grosbach [Tue, 9 Nov 2010 01:37:15 +0000 (01:37 +0000)]
Add support for a few simple fixups to the ARM Darwin asm backend. This allows
constant pool references and global variable refernces to resolve properly
for object file generation. For example,

int x;
void foo(unsigned a, unsigned *p) {
  p[a] = x;
}

can now be successfully compiled directly to an (ARM mode) object file.

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

13 years agoFix an inline asm pasto from 117667; was preventing
Dale Johannesen [Tue, 9 Nov 2010 01:15:07 +0000 (01:15 +0000)]
Fix an inline asm pasto from 117667; was preventing
{i64, i64} from matching i128.

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

13 years agoFix some places where error messages were being swallowed.
Dan Gohman [Tue, 9 Nov 2010 01:13:31 +0000 (01:13 +0000)]
Fix some places where error messages were being swallowed.

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

13 years agoFix PR8441, a thread unsafe static variable in our dynamic library loading facilities.
Owen Anderson [Tue, 9 Nov 2010 00:36:06 +0000 (00:36 +0000)]
Fix PR8441, a thread unsafe static variable in our dynamic library loading facilities.

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

13 years agoRevert r118457 and r118458. These won't hold for GPRs.
Bill Wendling [Tue, 9 Nov 2010 00:30:18 +0000 (00:30 +0000)]
Revert r118457 and r118458. These won't hold for GPRs.

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

13 years agoFix PR8441, a race condition in the static attributes list. While the reference...
Owen Anderson [Tue, 9 Nov 2010 00:27:03 +0000 (00:27 +0000)]
Fix PR8441, a race condition in the static attributes list.  While the reference counting was itself threadsafe,
the implicit removal of each object from the global list was not.  Make this operation atomic.

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

13 years agoGet the register and count from the register list operands.
Bill Wendling [Mon, 8 Nov 2010 23:51:20 +0000 (23:51 +0000)]
Get the register and count from the register list operands.

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

13 years agoreglist has two operands.
Bill Wendling [Mon, 8 Nov 2010 23:50:20 +0000 (23:50 +0000)]
reglist has two operands.

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

13 years agoThe "addRegListOperands()" function returns the start register and the total
Bill Wendling [Mon, 8 Nov 2010 23:49:57 +0000 (23:49 +0000)]
The "addRegListOperands()" function returns the start register and the total
number of registers in the list.

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

13 years agoAdd some comments noting some correspondences between ModRefBehavior
Dan Gohman [Mon, 8 Nov 2010 23:46:02 +0000 (23:46 +0000)]
Add some comments noting some correspondences between ModRefBehavior
values, LLVM IR function attributes, and LLVM intrinsic attributes.

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

13 years agoAdd support for ARM's specialized vector-compare-against-zero instructions.
Owen Anderson [Mon, 8 Nov 2010 23:21:22 +0000 (23:21 +0000)]
Add support for ARM's specialized vector-compare-against-zero instructions.

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

13 years agoInitial support for Mips32 and Mips32r2. Patch contributed by Akira Hatanaka (ahatana...
Bruno Cardoso Lopes [Mon, 8 Nov 2010 21:42:32 +0000 (21:42 +0000)]
Initial support for Mips32 and Mips32r2. Patch contributed by Akira Hatanaka (ahatanaka@mips.com)

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

13 years agoAdd "write back" bit encoding.
Bill Wendling [Mon, 8 Nov 2010 21:28:03 +0000 (21:28 +0000)]
Add "write back" bit encoding.

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

13 years agoFix PR8211
Bruno Cardoso Lopes [Mon, 8 Nov 2010 21:24:59 +0000 (21:24 +0000)]
Fix PR8211

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

13 years agoRemove contributor names as per coding statndard.
Michael J. Spencer [Mon, 8 Nov 2010 20:56:32 +0000 (20:56 +0000)]
Remove contributor names as per coding statndard.

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

13 years agoAdd an additional test for icmp of select folding.
Duncan Sands [Mon, 8 Nov 2010 20:56:28 +0000 (20:56 +0000)]
Add an additional test for icmp of select folding.

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

13 years agoRe-introduce the MaxLookup limit to BasicAliasAnalysis'
Dan Gohman [Mon, 8 Nov 2010 20:26:19 +0000 (20:26 +0000)]
Re-introduce the MaxLookup limit to BasicAliasAnalysis'
pointsToConstantMemory code to guard against possible
compile time slowdowns.

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

13 years agoAdd a testcase for a call which BasicAA says only accesses memory through
Dan Gohman [Mon, 8 Nov 2010 20:20:11 +0000 (20:20 +0000)]
Add a testcase for a call which BasicAA says only accesses memory through
its arguments and which TBAA says doesn't write to memory.

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

13 years agoAdding working version of assembly parser for the MBlaze backend
Wesley Peck [Mon, 8 Nov 2010 19:40:01 +0000 (19:40 +0000)]
Adding working version of assembly parser for the MBlaze backend
Major cleanup of whitespace and formatting issues in MBlaze backend

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

13 years agoFix a thinko that Duncan spotted.
Dan Gohman [Mon, 8 Nov 2010 19:24:47 +0000 (19:24 +0000)]
Fix a thinko that Duncan spotted.

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

13 years agoRevert 118422 in search of bot verdancy.
Dale Johannesen [Mon, 8 Nov 2010 19:17:22 +0000 (19:17 +0000)]
Revert 118422 in search of bot verdancy.

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

13 years agoDocument parameters. Fix typos.
Devang Patel [Mon, 8 Nov 2010 18:28:34 +0000 (18:28 +0000)]
Document parameters. Fix typos.

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

13 years agoAdds support for spilling previously allocated live intervals to
Andrew Trick [Mon, 8 Nov 2010 18:02:08 +0000 (18:02 +0000)]
Adds support for spilling previously allocated live intervals to
handle cases in which a register is unavailable for spill code.
Adds LiveIntervalUnion::extract. While processing interferences on a
live virtual register, reuses the same Query object for each
physcial reg.

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

13 years agoSupport -mcpu=cortex-a8 in ARM attributes - Has Fixme. 1 Test modified.
Jason W Kim [Mon, 8 Nov 2010 17:58:07 +0000 (17:58 +0000)]
Support -mcpu=cortex-a8 in ARM attributes - Has Fixme. 1 Test modified.

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

13 years agoFix typo.
Daniel Dunbar [Mon, 8 Nov 2010 17:53:02 +0000 (17:53 +0000)]
Fix typo.

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

13 years agoMake FunctionAttrs TBAA-aware.
Dan Gohman [Mon, 8 Nov 2010 17:12:04 +0000 (17:12 +0000)]
Make FunctionAttrs TBAA-aware.

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

13 years agoImplement getModRefBehavior for TypeBasedAliasAnalysis.
Dan Gohman [Mon, 8 Nov 2010 17:10:22 +0000 (17:10 +0000)]
Implement getModRefBehavior for TypeBasedAliasAnalysis.

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

13 years agoComplete listing of ARM/MC/ELF relocation enums
Jason W Kim [Mon, 8 Nov 2010 16:47:27 +0000 (16:47 +0000)]
Complete listing of ARM/MC/ELF relocation enums

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

13 years agoExtend the AliasAnalysis::pointsToConstantMemory interface to allow it
Dan Gohman [Mon, 8 Nov 2010 16:45:26 +0000 (16:45 +0000)]
Extend the AliasAnalysis::pointsToConstantMemory interface to allow it
to optionally look for constant or local (alloca) memory.

Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select
and Phi nodes, and to support looking for local memory.

Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that
AliasAnalysis knows all the tricks that it knew.

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

13 years agoDelete getIntrinsicModRefBehavior. Clients can just use the normal
Dan Gohman [Mon, 8 Nov 2010 16:11:19 +0000 (16:11 +0000)]
Delete getIntrinsicModRefBehavior. Clients can just use the normal
getModRefBehavior now, since it now understands intrinsics as well
as normal functions.

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

13 years agoMake FunctionAttrs use AliasAnalysis::getModRefBehavior, now that it
Dan Gohman [Mon, 8 Nov 2010 16:10:15 +0000 (16:10 +0000)]
Make FunctionAttrs use AliasAnalysis::getModRefBehavior, now that it
knows about intrinsic functions.

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

13 years agoTeach BasicAliasAnalysis::getModRefBehavior(const Function *F)
Dan Gohman [Mon, 8 Nov 2010 16:08:43 +0000 (16:08 +0000)]
Teach BasicAliasAnalysis::getModRefBehavior(const Function *F)
to analyze intrinsic functions.

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

13 years agoAdd comments.
Dan Gohman [Mon, 8 Nov 2010 15:34:42 +0000 (15:34 +0000)]
Add comments.

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

13 years agosvn:ignore
Benjamin Kramer [Mon, 8 Nov 2010 10:52:42 +0000 (10:52 +0000)]
svn:ignore

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

13 years agoAdd generating function declaration for PTX
Che-Liang Chiou [Mon, 8 Nov 2010 03:06:08 +0000 (03:06 +0000)]
Add generating function declaration for PTX

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

13 years agoAdd physical register counting functions
Che-Liang Chiou [Mon, 8 Nov 2010 03:00:52 +0000 (03:00 +0000)]
Add physical register counting functions

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

13 years agoAdd a dummy PTXMCAsmStreamer class
Che-Liang Chiou [Mon, 8 Nov 2010 02:58:44 +0000 (02:58 +0000)]
Add a dummy PTXMCAsmStreamer class

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

13 years agoSet default flags for .rodata.
Rafael Espindola [Mon, 8 Nov 2010 02:47:59 +0000 (02:47 +0000)]
Set default flags for .rodata.

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

13 years agoAdd registry hook for assembly text output
Che-Liang Chiou [Mon, 8 Nov 2010 02:21:17 +0000 (02:21 +0000)]
Add registry hook for assembly text output

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

13 years agoMake RegList an ASM operand so that TableGen will generate code for it. This is
Bill Wendling [Mon, 8 Nov 2010 00:39:58 +0000 (00:39 +0000)]
Make RegList an ASM operand so that TableGen will generate code for it. This is
an initial implementation and may change once reglists are fully fleshed out.

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

13 years agoRevert.
Bill Wendling [Mon, 8 Nov 2010 00:32:40 +0000 (00:32 +0000)]
Revert.

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

13 years agoAdd simplification of floating point comparisons with the result
Duncan Sands [Sun, 7 Nov 2010 16:46:25 +0000 (16:46 +0000)]
Add simplification of floating point comparisons with the result
of a select instruction, the same as already exists for integer
comparisons.

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

13 years agoFix a README item: when doing a comparison with the result
Duncan Sands [Sun, 7 Nov 2010 16:12:23 +0000 (16:12 +0000)]
Fix a README item: when doing a comparison with the result
of a select instruction, see if doing the compare with the
true and false values of the select gives the same result.
If so, that can be used as the value of the comparison.

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

13 years agoSpeed up AddSectionToTheEnd. It was walking all fragments in all sections.
Rafael Espindola [Sun, 7 Nov 2010 15:03:27 +0000 (15:03 +0000)]
Speed up AddSectionToTheEnd. It was walking all fragments in all sections.
This is really slow with we have 1000s of sections each with a corresponding
relocation section. Also, it is only used by the ELF writer to add
basic data, so there is no need to force a new layout pass.

Should fix PR8563.

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

13 years agotypos
Rafael Espindola [Sun, 7 Nov 2010 13:48:10 +0000 (13:48 +0000)]
typos

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

13 years agoIn this context, a reglist is a reg.
Bill Wendling [Sun, 7 Nov 2010 13:08:28 +0000 (13:08 +0000)]
In this context, a reglist is a reg.

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

13 years agoFix memory leak in StringRef::edit_distance(). 'Allocated' could be leaked on an...
Ted Kremenek [Sun, 7 Nov 2010 06:09:02 +0000 (06:09 +0000)]
Fix memory leak in StringRef::edit_distance().  'Allocated' could be leaked on an early return.

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

13 years agoTestcase for llvm-gcc 118368. 8629268.
Dale Johannesen [Sun, 7 Nov 2010 04:58:48 +0000 (04:58 +0000)]
Testcase for llvm-gcc 118368.  8629268.

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

13 years agoAdd method for checking if a path is a symbolic link.
Rafael Espindola [Sun, 7 Nov 2010 04:36:50 +0000 (04:36 +0000)]
Add method for checking if a path is a symbolic link.

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

13 years agoRelax dwarf line fragments. This fixes a crash in the included testcase.
Rafael Espindola [Sun, 7 Nov 2010 02:07:12 +0000 (02:07 +0000)]
Relax dwarf line fragments. This fixes a crash in the included testcase.

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

13 years agoimplement aliases for div/idiv that have an explicit A register operand,
Chris Lattner [Sat, 6 Nov 2010 22:41:18 +0000 (22:41 +0000)]
implement aliases for div/idiv that have an explicit A register operand,
implementing rdar://8431864

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

13 years agoAdd support for parsing register lists. We can't use a bitfield to keep track of
Bill Wendling [Sat, 6 Nov 2010 22:36:58 +0000 (22:36 +0000)]
Add support for parsing register lists. We can't use a bitfield to keep track of
the registers, because the register numbers may be much greater than the number
of bits available in the machine's register.

I extracted the register list verification code out of the actual parsing of the
registers. This made checking for errors much easier. It also limits the number
of warnings that would be emitted for cascading infractions.

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

13 years agoadd aliases for movs between seg registers and mem. There are multiple
Chris Lattner [Sat, 6 Nov 2010 22:35:34 +0000 (22:35 +0000)]
add aliases for movs between seg registers and mem.  There are multiple
different forms of this instruction (movw/movl/movq) which we reported
as being ambiguous.  Since they all do the same thing, gas just picks the
one with the shortest encoding.  Follow its lead here.

This implements rdar://8208615

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

13 years agomove the "sh[lr]d op,op" -> "shld $1, op,op" aliases to the .td file.
Chris Lattner [Sat, 6 Nov 2010 22:25:39 +0000 (22:25 +0000)]
move the "sh[lr]d op,op" -> "shld $1, op,op" aliases to the .td file.

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

13 years agoReturn the base register of a register list for the "getReg()" method. This is
Bill Wendling [Sat, 6 Nov 2010 22:19:43 +0000 (22:19 +0000)]
Return the base register of a register list for the "getReg()" method. This is
to satisfy the ClassifyOperand method of the Asm matcher without having to add a
RegList type to every back-end.

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

13 years agopass literals like $$1 through to the asm matcher. This isn't right yet, but doesn...
Chris Lattner [Sat, 6 Nov 2010 22:06:03 +0000 (22:06 +0000)]
pass literals like $$1 through to the asm matcher.  This isn't right yet, but doesn't hurt.

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

13 years agowork-in-progress
Chris Lattner [Sat, 6 Nov 2010 22:05:43 +0000 (22:05 +0000)]
work-in-progress

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

13 years agoGeneral cleanup:
Bill Wendling [Sat, 6 Nov 2010 21:42:12 +0000 (21:42 +0000)]
General cleanup:

- Make ARMOperand a class so that some things are internal to the class.
- Reformatting.

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

13 years agogo to great lengths to work around a GAS bug my previous patch
Chris Lattner [Sat, 6 Nov 2010 21:37:06 +0000 (21:37 +0000)]
go to great lengths to work around a GAS bug my previous patch
exposed:

GAS doesn't accept "fcomip %st(1)", it requires "fcomip %st(1), %st(0)"
even though st(0) is implicit in all other fp stack instructions.

Fortunately, there is an alias for fcomip named "fcompi" and gas does
accept the default argument for the alias (boggle!).

As such, switch the canonical form of this instruction to "pi" instead
of "ip".  This makes the code generator and disassembler generate pi,
avoiding the gas bug.

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

13 years agorework the rotate-by-1 instructions to be defined like the
Chris Lattner [Sat, 6 Nov 2010 21:23:40 +0000 (21:23 +0000)]
rework the rotate-by-1 instructions to be defined like the
shift-by-1 instructions, where the asmstring doesn't contain
the implicit 1.  It turns out that a bunch of these rotate
instructions were completely broken because they used 1
instead of $1.

This fixes assembly mismatches on "rclb $1, %bl" and friends,
where we used to generate the 3 byte form, we now generate the
proper 2-byte form.

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

13 years agochange the fp comparison instructions to not have %st0 explicitly
Chris Lattner [Sat, 6 Nov 2010 20:55:09 +0000 (20:55 +0000)]
change the fp comparison instructions to not have %st0 explicitly
listed in its asm string, for consistency with the other similar
instructions.

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

13 years agomove the plethora of fp stack aliases to the .td file.
Chris Lattner [Sat, 6 Nov 2010 20:47:38 +0000 (20:47 +0000)]
move the plethora of fp stack aliases to the .td file.

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

13 years agoadd (and document) the ability for alias results to have
Chris Lattner [Sat, 6 Nov 2010 19:57:21 +0000 (19:57 +0000)]
add (and document) the ability for alias results to have
fixed physical registers.  Start moving fp comparison
aliases to the .td file (which default to using %st1 if
nothing is specified).

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

13 years agoAdd a RegList (register list) object to ARMOperand. It will be used soon to hold
Bill Wendling [Sat, 6 Nov 2010 19:56:04 +0000 (19:56 +0000)]
Add a RegList (register list) object to ARMOperand. It will be used soon to hold
(surprise!) a list of registers. Register lists are consecutive, so we only need
to record the start register plus the number of registers.

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

13 years agogeneralize alias support to allow the result of an alias to
Chris Lattner [Sat, 6 Nov 2010 19:25:43 +0000 (19:25 +0000)]
generalize alias support to allow the result of an alias to
add fixed immediate values.  Move the aad and aam aliases to
use this, and document it.

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

13 years agomove fnstsw aliases to .td file, fix typo
Chris Lattner [Sat, 6 Nov 2010 18:58:32 +0000 (18:58 +0000)]
move fnstsw aliases to .td file, fix typo

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

13 years agomove in/out aliases to the .td files.
Chris Lattner [Sat, 6 Nov 2010 18:52:40 +0000 (18:52 +0000)]
move in/out aliases to the .td files.

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

13 years agomove sldt, imul, and movabsq aliases from c++ to .td file.
Chris Lattner [Sat, 6 Nov 2010 18:44:26 +0000 (18:44 +0000)]
move sldt, imul, and movabsq aliases from c++ to .td file.

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

13 years agocorrect suffix matching to search for s/l/t suffixes on
Chris Lattner [Sat, 6 Nov 2010 18:28:02 +0000 (18:28 +0000)]
correct suffix matching to search for s/l/t suffixes on
floating point stack instructions instead of looking for b/w/l/q.

This fixes issues where we'd accidentally match fistp to fistpl,
when it is in fact an ambiguous instruction.

This changes the behavior of llvm-mc to reject fstp, which was the
correct fix for rdar://8456389:
t.s:1:1: error: ambiguous instructions require an explicit suffix (could be 'fstps', 'fstpl', or 'fstpt')
fstp (%rax)

it also causes us to correctly reject fistp and fist, which addresses
PR8528:

t.s:2:1: error: ambiguous instructions require an explicit suffix (could be 'fistps', or 'fistpl')
fistp (%rax)
^
t.s:3:1: error: ambiguous instructions require an explicit suffix (could be 'fists', or 'fistl')
fist (%rax)
^

Thanks to Ismail Donmez for tracking down the issue here!

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