oota-llvm.git
14 years agoAdd isDebug argument to ChangeToRegister; this prevents
Dale Johannesen [Wed, 10 Feb 2010 00:41:49 +0000 (00:41 +0000)]
Add isDebug argument to ChangeToRegister; this prevents
the field from being used uninitialized later in some cases.

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

14 years agoprint all the newlines at the end of instructions with
Chris Lattner [Wed, 10 Feb 2010 00:36:00 +0000 (00:36 +0000)]
print all the newlines at the end of instructions with
OutStreamer.AddBlankLine instead of textually.

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

14 years agoIntegerValType holds a uint32_t, so its constructor should take a uint32_t. This...
Kenneth Uildriks [Wed, 10 Feb 2010 00:14:03 +0000 (00:14 +0000)]
IntegerValType holds a uint32_t, so its constructor should take a uint32_t.  This allows it to be properly initialized with bit widths > 65535

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

14 years agoFix comments to reflect renaming elsewhere.
Dale Johannesen [Wed, 10 Feb 2010 00:11:11 +0000 (00:11 +0000)]
Fix comments to reflect renaming elsewhere.

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

14 years agoFix the encoding of the movntdqa X86 instruction. It was missing the 0x66
Kevin Enderby [Wed, 10 Feb 2010 00:10:31 +0000 (00:10 +0000)]
Fix the encoding of the movntdqa X86 instruction.  It was missing the 0x66
prefix which is part of the opcode encoding.

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

14 years agoAdd ability for MCInstPrinters to add comments for instructions.
Chris Lattner [Wed, 10 Feb 2010 00:10:18 +0000 (00:10 +0000)]
Add ability for MCInstPrinters to add comments for instructions.
Enhance the x86 backend to show the hex values of immediates in
comments when they are large.  For example:

        movl    $1072693248, 4(%esp)    ## imm = 0x3FF00000

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

14 years agoTableGen fragment refactoring.
David Greene [Tue, 9 Feb 2010 23:52:19 +0000 (23:52 +0000)]
TableGen fragment refactoring.

Move some utility TableGen defs, classes, etc. into a common file so
they may be used my multiple pattern files.  We will use this for
the AVX specification to help with the transition from the current
SSE specification.

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

14 years agoAdds a JIT based exception handling example to the examples directory.
Garrison Venn [Tue, 9 Feb 2010 23:22:43 +0000 (23:22 +0000)]
Adds a JIT based exception handling example to the examples directory.
Both zero cost example domain specific, and C++ foreign exception handling are
shown. The example's documentation fully explains how to run the example.

Notes:

1)   The code uses an extremely simple type info model.
2)   Only a single landing pad is used per unwind edge
     (one call to llvm.eh.selector)
3)   llvm.eh.selector support for filter arguments is not given.
4)   llvm.eh.typeid.for is not used.
5)   Forced unwind behavior is not supported.
6)   Very little if any error handling is given.
7)   __attribute__((__aligned__)) is used.
8)   The code uses parts from the llvm compiler-rt project and
     the llvm Kaleidoscope example.
9)   The code has not been ported or tested on WINDOWS.
10)  The code was not tested with a cmake build.
11)  The code was tested for a debug build on 32bit X86 CentOS LINUX,
     and both a debug and release build on OS X 10.6.2 (64bit).

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

14 years agoFixed some indentation in the AsmWriterInst
Sean Callanan [Tue, 9 Feb 2010 23:06:35 +0000 (23:06 +0000)]
Fixed some indentation in the AsmWriterInst
implementation.  Also changed the constructor
so that it does not require a Record, making it
usable by the EDEmitter.

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

14 years agoAdd VBIF/VBIT for disassembly only.
Johnny Chen [Tue, 9 Feb 2010 23:05:23 +0000 (23:05 +0000)]
Add VBIF/VBIT for disassembly only.
A8.6.279

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

14 years agoMake --disable-libffi work on systems with libffi installed. Also
Jeffrey Yasskin [Tue, 9 Feb 2010 23:03:44 +0000 (23:03 +0000)]
Make --disable-libffi work on systems with libffi installed.  Also
make no-ffi the default even on systems with libffi.  This fixes
http://llvm.org/PR5018.

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

14 years agoOnly dump output in debug mode.
David Greene [Tue, 9 Feb 2010 23:03:05 +0000 (23:03 +0000)]
Only dump output in debug mode.

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

14 years agollvm-mc: Add --show-fixups option, for displaying the instruction fixup information...
Daniel Dunbar [Tue, 9 Feb 2010 23:00:14 +0000 (23:00 +0000)]
llvm-mc: Add --show-fixups option, for displaying the instruction fixup information in the asm comments.

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

14 years agoMC/X86: Add a dummy implementation of MCFixup generation for hacky X86 MCCodeEmitter.
Daniel Dunbar [Tue, 9 Feb 2010 23:00:03 +0000 (23:00 +0000)]
MC/X86: Add a dummy implementation of MCFixup generation for hacky X86 MCCodeEmitter.

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

14 years agoMC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEm...
Daniel Dunbar [Tue, 9 Feb 2010 22:59:55 +0000 (22:59 +0000)]
MC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEmitter.

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

14 years agoImprove comments in the LSDA somewhat. They can be improved much more.
Bill Wendling [Tue, 9 Feb 2010 22:49:16 +0000 (22:49 +0000)]
Improve comments in the LSDA somewhat. They can be improved much more.

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

14 years agoAdded VMRS/VMSR for disassembly only.
Johnny Chen [Tue, 9 Feb 2010 22:35:38 +0000 (22:35 +0000)]
Added VMRS/VMSR for disassembly only.
A8.6.335 & A8.6.336

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

14 years agoAdded AsmWriterInst.cpp to the CMakeList so that
Sean Callanan [Tue, 9 Feb 2010 22:29:16 +0000 (22:29 +0000)]
Added AsmWriterInst.cpp to the CMakeList so that
it builds OK on Visual Studio.

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

14 years agoDisable unittests/ADT/BitVectorTest on PPC Darwin.
Dale Johannesen [Tue, 9 Feb 2010 22:15:27 +0000 (22:15 +0000)]
Disable unittests/ADT/BitVectorTest on PPC Darwin.
It fails with a release build only, for reasons
as yet unknown.  (If there's a better way to Xfail
things here let me know, doesn't seem to be any
prior art in unittests.)

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

14 years agoport encoder enhancements over to the new encoder.
Chris Lattner [Tue, 9 Feb 2010 21:57:34 +0000 (21:57 +0000)]
port encoder enhancements over to the new encoder.

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

14 years agoPer PR 6219, factored AsmWriterInst and AsmWriterOperand
Sean Callanan [Tue, 9 Feb 2010 21:50:41 +0000 (21:50 +0000)]
Per PR 6219, factored AsmWriterInst and AsmWriterOperand
out of the AsmWriterEmitter.  This patch does the physical
code movement, but leaves the implementation unchanged. I'll
make any changes necessary to generalize the code in a
separate patch.

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

14 years agofix X86 encoder to output [disp] only addresses with no SIB byte
Chris Lattner [Tue, 9 Feb 2010 21:47:19 +0000 (21:47 +0000)]
fix X86 encoder to output [disp] only addresses with no SIB byte
in X86-32 mode.  This is still required in x86-64 mode to avoid
forming [disp+rip] encoding.  Rewrite the SIB byte decision logic
to be actually understandable.

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

14 years agoMove Intrinsic::objectsize lowering back to InstCombineCalls and
Eric Christopher [Tue, 9 Feb 2010 21:24:27 +0000 (21:24 +0000)]
Move Intrinsic::objectsize lowering back to InstCombineCalls and
enable constant 0 offset lowering.

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

14 years agorevert r95689: getX86RegNum(BaseReg) != N86::ESP is
Chris Lattner [Tue, 9 Feb 2010 21:21:26 +0000 (21:21 +0000)]
revert r95689: getX86RegNum(BaseReg) != N86::ESP is
a confusing idiom to check for ESP or RSP.

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

14 years agosimplify.
Chris Lattner [Tue, 9 Feb 2010 21:00:12 +0000 (21:00 +0000)]
simplify.

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

14 years agoRe-disable for Darwin; I was mistaken to think this was fixed.
Dale Johannesen [Tue, 9 Feb 2010 19:54:29 +0000 (19:54 +0000)]
Re-disable for Darwin; I was mistaken to think this was fixed.

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

14 years agomove target-independent opcodes out of TargetInstrInfo
Chris Lattner [Tue, 9 Feb 2010 19:54:29 +0000 (19:54 +0000)]
move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the
codebase.

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

14 years agoRadar 7417921
Jim Grosbach [Tue, 9 Feb 2010 19:51:37 +0000 (19:51 +0000)]
Radar 7417921

tMOVCCi pattern only valid for low registers, as the Thumb1 mov immediate to
register instruction only works with low registers. Allowing high registers
for the instruction resulted in the assembler choosing the wide (32-bit)
encoding for the mov, but LLVM though the instruction was only 16 bits wide,
so offset calculations for constant pools became incorrect, leading to
out of range constant pool entries.

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

14 years agoAdd support for TypeBuilder<const/volatile void*, false>.
Jeffrey Yasskin [Tue, 9 Feb 2010 19:07:19 +0000 (19:07 +0000)]
Add support for TypeBuilder<const/volatile void*, false>.
Thanks to Jochen Wilhelmy for the suggestion!

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

14 years agoPull these back out, they're a little too aggressive and time
Eric Christopher [Tue, 9 Feb 2010 17:29:18 +0000 (17:29 +0000)]
Pull these back out, they're a little too aggressive and time
consuming for a simple optimization.

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

14 years agoOops.
Jakob Stoklund Olesen [Tue, 9 Feb 2010 17:24:21 +0000 (17:24 +0000)]
Oops.

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

14 years agoAdded vcvtb/vcvtt (between half-precision and single-precision, VFP).
Johnny Chen [Tue, 9 Feb 2010 17:21:56 +0000 (17:21 +0000)]
Added vcvtb/vcvtt (between half-precision and single-precision, VFP).
For disassembly only.

A8.6.300

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

14 years agoRemember to update live-in lists when coalescing physregs.
Jakob Stoklund Olesen [Tue, 9 Feb 2010 17:20:11 +0000 (17:20 +0000)]
Remember to update live-in lists when coalescing physregs.

Patch by M Wahab!

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

14 years agoclang test suite
Jakob Stoklund Olesen [Tue, 9 Feb 2010 17:20:03 +0000 (17:20 +0000)]
clang test suite

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

14 years agoMention IndVarSimplify in the comment by getSmallConstantTripCount, as
Dan Gohman [Tue, 9 Feb 2010 17:00:40 +0000 (17:00 +0000)]
Mention IndVarSimplify in the comment by getSmallConstantTripCount, as
is done for getTripCount.

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

14 years agoMention vAny and iPTRAny in a comment.
Dan Gohman [Tue, 9 Feb 2010 16:59:14 +0000 (16:59 +0000)]
Mention vAny and iPTRAny in a comment.

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

14 years agomove tests that depend on the x86 backend out of codegen/generic,
Chris Lattner [Tue, 9 Feb 2010 06:41:03 +0000 (06:41 +0000)]
move tests that depend on the x86 backend out of codegen/generic,
and remove a few old and unreduced ones.  Fixes PR5624.

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

14 years agomake target independent.
Chris Lattner [Tue, 9 Feb 2010 06:36:30 +0000 (06:36 +0000)]
make target independent.

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

14 years agomerge a target-specific add test into x86 directory.
Chris Lattner [Tue, 9 Feb 2010 06:35:50 +0000 (06:35 +0000)]
merge a target-specific add test into x86 directory.

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

14 years agomerge another test in, drop the trivially constant folded cases.
Chris Lattner [Tue, 9 Feb 2010 06:33:27 +0000 (06:33 +0000)]
merge another test in, drop the trivially constant folded cases.

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

14 years agoconsolidate and filecheckize two tests.
Chris Lattner [Tue, 9 Feb 2010 06:24:00 +0000 (06:24 +0000)]
consolidate and filecheckize two tests.

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

14 years agomerge two tests, make target independent.
Chris Lattner [Tue, 9 Feb 2010 06:19:20 +0000 (06:19 +0000)]
merge two tests, make target independent.

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

14 years agomove PR3462 to here.
Chris Lattner [Tue, 9 Feb 2010 05:55:14 +0000 (05:55 +0000)]
move PR3462 to here.

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

14 years agoadd a note from PR6194
Chris Lattner [Tue, 9 Feb 2010 05:45:29 +0000 (05:45 +0000)]
add a note from PR6194

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

14 years agoSkip DEBUG_VALUE in some places where it was affecting codegen.
Dale Johannesen [Tue, 9 Feb 2010 02:01:46 +0000 (02:01 +0000)]
Skip DEBUG_VALUE in some places where it was affecting codegen.

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

14 years agoAdd declaration attribute to a variable DIE, if there is a separate DIE for the defin...
Devang Patel [Tue, 9 Feb 2010 01:58:33 +0000 (01:58 +0000)]
Add declaration attribute to a variable DIE, if there is a separate DIE for the definition.

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

14 years agoUpdated the enhanced disassembly library to produce
Sean Callanan [Tue, 9 Feb 2010 01:50:54 +0000 (01:50 +0000)]
Updated the enhanced disassembly library to produce
whitespace tokens in the right places.

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

14 years agofix llvm_build_struct_gep for PR6167, patch by
Chris Lattner [Tue, 9 Feb 2010 01:39:46 +0000 (01:39 +0000)]
fix llvm_build_struct_gep for PR6167, patch by
Peter Hawkins!

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

14 years agosimplify this code, duh.
Chris Lattner [Tue, 9 Feb 2010 01:14:06 +0000 (01:14 +0000)]
simplify this code, duh.

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

14 years agofix PR6193, only considering sign extensions *from i1* for this
Chris Lattner [Tue, 9 Feb 2010 01:12:41 +0000 (01:12 +0000)]
fix PR6193, only considering sign extensions *from i1* for this
xform.

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

14 years agoAdd file in here too.
Eric Christopher [Tue, 9 Feb 2010 01:11:03 +0000 (01:11 +0000)]
Add file in here too.

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

14 years agoFixed a problem where the enhanced disassembly
Sean Callanan [Tue, 9 Feb 2010 01:00:18 +0000 (01:00 +0000)]
Fixed a problem where the enhanced disassembly
library was reporting inaccurate token IDs.

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

14 years agomake -show-inst be formatted a bit nicer. Before:
Chris Lattner [Tue, 9 Feb 2010 00:54:51 +0000 (00:54 +0000)]
make -show-inst be formatted a bit nicer.  Before:

movl $3735928559, a          ## inst: <MCInst 1273 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> <MCOperand Expr:(a)> <MCOperand Reg:0> <MCOperand Expr:(3735928559)>>

after:

movl $3735928559, a          ## <MCInst #1273
                                        ##   <MCOperand Reg:0>
                                        ##   <MCOperand Imm:1>
                                        ##   <MCOperand Reg:0>
                                        ##   <MCOperand Expr:(a)>
                                        ##   <MCOperand Reg:0>
                                        ##   <MCOperand Expr:(3735928559)>>

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

14 years agoFixed a bug in the PBQP allocator's findCoalesces method.
Lang Hames [Tue, 9 Feb 2010 00:50:27 +0000 (00:50 +0000)]
Fixed a bug in the PBQP allocator's findCoalesces method.

Previously spill registers, whose def indexes are not defined, would sometimes be improperly marked as coalescable with conflicting registers. The new findCoalesces routine conservatively assumes that any register with at least one undefined def is not coalescable with any register it interferes with.

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

14 years agoImplement x86 asm parsing support for %st and %st(4)
Chris Lattner [Tue, 9 Feb 2010 00:49:22 +0000 (00:49 +0000)]
Implement x86 asm parsing support for %st and %st(4)

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

14 years agoAdded copy sensible construction & assignment to PBQP graphs and fixed a memory acces...
Lang Hames [Tue, 9 Feb 2010 00:45:48 +0000 (00:45 +0000)]
Added copy sensible construction & assignment to PBQP graphs and fixed a memory access bug in the heuristic solver.

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

14 years agoDebug operands should not be def or kill.
Dale Johannesen [Tue, 9 Feb 2010 00:42:08 +0000 (00:42 +0000)]
Debug operands should not be def or kill.

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

14 years agoChanged the definition of an "invalid" slot to include the empty & tombstone values...
Lang Hames [Tue, 9 Feb 2010 00:41:23 +0000 (00:41 +0000)]
Changed the definition of an "invalid" slot to include the empty & tombstone values, but not zero.

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

14 years agostop using reserved identifiers.
Chris Lattner [Tue, 9 Feb 2010 00:40:07 +0000 (00:40 +0000)]
stop using reserved identifiers.

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

14 years agoAdd a new pass to do llvm.objsize lowering using SCEV.
Eric Christopher [Tue, 9 Feb 2010 00:35:38 +0000 (00:35 +0000)]
Add a new pass to do llvm.objsize lowering using SCEV.
Initial skeleton and SCEVUnknown lowering implemented,
the rest should come relatively quickly.  Move testcase
to new directory.

Move pass to right before SimplifyLibCalls - which is
moved down a bit so we can take advantage of a few opts.

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

14 years agopass stringref by value instead of by const&
Chris Lattner [Tue, 9 Feb 2010 00:34:28 +0000 (00:34 +0000)]
pass stringref by value instead of by const&

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

14 years agoAdd explicit keywords.
Dan Gohman [Tue, 9 Feb 2010 00:29:29 +0000 (00:29 +0000)]
Add explicit keywords.

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

14 years agomove PR6212 to this file.
Chris Lattner [Tue, 9 Feb 2010 00:11:10 +0000 (00:11 +0000)]
move PR6212 to this file.

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

14 years agoenhance bits_storage to work with enums by using a c-style
Chris Lattner [Tue, 9 Feb 2010 00:05:45 +0000 (00:05 +0000)]
enhance bits_storage to work with enums by using a c-style
cast instead of reinterpret_cast, fixing PR6243.  Apparently
reinterpret_cast and I aren't getting along today.

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

14 years agoImplement AsmPrinter support for several more operators which have
Dan Gohman [Tue, 9 Feb 2010 00:02:37 +0000 (00:02 +0000)]
Implement AsmPrinter support for several more operators which have
direct MCExpr equivalents. Don't use MCExpr::Shr because it isn't
consistent between targets.

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

14 years agoDocument that MCExpr::Mod is actually remainder.
Dan Gohman [Mon, 8 Feb 2010 23:58:47 +0000 (23:58 +0000)]
Document that MCExpr::Mod is actually remainder.

Document that MCExpr::Div, Mod, and the comparison operators are all
signed operators.

Document that the comparison operators' results are target-dependent.

Document that the behavior of shr is target-dependent.

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

14 years agofix some problems handling large vectors reported in PR6230
Chris Lattner [Mon, 8 Feb 2010 23:56:03 +0000 (23:56 +0000)]
fix some problems handling large vectors reported in PR6230

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

14 years agothis is done, tested by CodeGen/ARM/iabs.ll
Chris Lattner [Mon, 8 Feb 2010 23:48:10 +0000 (23:48 +0000)]
this is done, tested by CodeGen/ARM/iabs.ll

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

14 years agoconvert to filecheck.
Chris Lattner [Mon, 8 Feb 2010 23:47:34 +0000 (23:47 +0000)]
convert to filecheck.

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

14 years agoAdded header file declarations and .exports entries
Sean Callanan [Mon, 8 Feb 2010 23:34:25 +0000 (23:34 +0000)]
Added header file declarations and .exports entries
for the new APIs offered by the enhanced disassembler
for inspecting operands.

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

14 years agotest case for r95604.
Devang Patel [Mon, 8 Feb 2010 23:27:46 +0000 (23:27 +0000)]
test case for r95604.

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

14 years agotighten up eh.setjmp sequence a bit.
Jim Grosbach [Mon, 8 Feb 2010 23:22:00 +0000 (23:22 +0000)]
tighten up eh.setjmp sequence a bit.

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

14 years agonow that @GOTOFF is no longer represented as a suffix on a
Chris Lattner [Mon, 8 Feb 2010 23:10:08 +0000 (23:10 +0000)]
now that @GOTOFF is no longer represented as a suffix on a
MCSymbol, we can remove the 'suffix' argument of
GetBlockAddressSymbol.  Do so.

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

14 years agounify the paths for external symbols and global variables:
Chris Lattner [Mon, 8 Feb 2010 23:03:41 +0000 (23:03 +0000)]
unify the paths for external symbols and global variables:
 2 files changed, 48 insertions(+), 83 deletions(-)

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

14 years agoswitch the rest of the "@ concatentation" logic in the X86
Chris Lattner [Mon, 8 Feb 2010 22:52:47 +0000 (22:52 +0000)]
switch the rest of the "@ concatentation" logic in the X86
backend to use X86MCTargetExpr, simplifying a bunch of code.

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

14 years agoFixed the AT&T AsmLexer to report the proper strings
Sean Callanan [Mon, 8 Feb 2010 22:50:23 +0000 (22:50 +0000)]
Fixed the AT&T AsmLexer to report the proper strings
for register tokens.  Before, if it encountered
'%al,' it would report 'al,' as the token.  Now it
correctly reports '%al'.

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

14 years agoswitch ELF @GOTOFF references to use X86MCTargetExpr.
Chris Lattner [Mon, 8 Feb 2010 22:33:55 +0000 (22:33 +0000)]
switch ELF @GOTOFF references to use X86MCTargetExpr.

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

14 years agoConstantFoldConstantExpression can theoretically return the original
Dan Gohman [Mon, 8 Feb 2010 22:19:11 +0000 (22:19 +0000)]
ConstantFoldConstantExpression can theoretically return the original
expression; don't go into an infinite loop if it does.

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

14 years agoadd an x86 implementation of MCTargetExpr for
Chris Lattner [Mon, 8 Feb 2010 22:09:08 +0000 (22:09 +0000)]
add an x86 implementation of MCTargetExpr for
representing @GOT and friends.  Use it for
personality references as a first use.

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

14 years agodon't make hte dtor private or we can't construct the class.
Chris Lattner [Mon, 8 Feb 2010 22:07:36 +0000 (22:07 +0000)]
don't make hte dtor private or we can't construct the class.

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

14 years agouse a c-style cast instead of reinterpret-cast, as sometimes the
Chris Lattner [Mon, 8 Feb 2010 22:05:38 +0000 (22:05 +0000)]
use a c-style cast instead of reinterpret-cast, as sometimes the
cast needs to adjust for a vtable pointer when going from base to
derived type (when the base doesn't have a vtable but the
derived type does).

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

14 years agoAdd VCVTR (between floating-point and integer, VFP) for disassembly purpose.
Johnny Chen [Mon, 8 Feb 2010 22:02:41 +0000 (22:02 +0000)]
Add VCVTR (between floating-point and integer, VFP) for disassembly purpose.
The 'R' suffix means the to-integer operations use the rounding mode specified
by the FPSCR, encoded as Inst{7} = 0.

A8.6.295

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

14 years agoWhen CodeGen'ing unoptimized code, there may be unfolded constant expressions
Dan Gohman [Mon, 8 Feb 2010 22:02:38 +0000 (22:02 +0000)]
When CodeGen'ing unoptimized code, there may be unfolded constant expressions
in global initializers. Instead of aborting, attempt to fold them on the
spot. If folding succeeds, emit the folded expression instead.

This fixes PR6255.

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

14 years agoAdd const qualifiers.
Dan Gohman [Mon, 8 Feb 2010 22:00:06 +0000 (22:00 +0000)]
Add const qualifiers.

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

14 years agoApply the 95471 fix to SelectionDAGBuilder as well;
Dale Johannesen [Mon, 8 Feb 2010 21:53:27 +0000 (21:53 +0000)]
Apply the 95471 fix to SelectionDAGBuilder as well;
we can get in here if FastISel gives up in a block.
(Actually the two copies of this need to be unified.  Later.)

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

14 years agoIn guaranteed tailcall mode, don't decline the tailcall optimization
Dan Gohman [Mon, 8 Feb 2010 20:34:14 +0000 (20:34 +0000)]
In guaranteed tailcall mode, don't decline the tailcall optimization
for blocks ending in "unreachable".

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

14 years agoRename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflect
Dan Gohman [Mon, 8 Feb 2010 20:27:50 +0000 (20:27 +0000)]
Rename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflect
its current purpose.

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

14 years agoAdd VCMP (VFP floating-point compare without 'E' bit set) for disassembly purpose.
Johnny Chen [Mon, 8 Feb 2010 19:41:48 +0000 (19:41 +0000)]
Add VCMP (VFP floating-point compare without 'E' bit set) for disassembly purpose.

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

14 years agoadd scaffolding for target-specific MCExprs.
Chris Lattner [Mon, 8 Feb 2010 19:41:07 +0000 (19:41 +0000)]
add scaffolding for target-specific MCExprs.

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

14 years agoFlesh out the list of predicates, for those who like this style. I was
Duncan Sands [Mon, 8 Feb 2010 19:36:51 +0000 (19:36 +0000)]
Flesh out the list of predicates, for those who like this style.  I was
looking for isPointer, and added the rest for uniformity.

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

14 years agoImmutableIntervalMap: Fix for unqualified lookup into dependent base class, done
Daniel Dunbar [Mon, 8 Feb 2010 18:08:46 +0000 (18:08 +0000)]
ImmutableIntervalMap: Fix for unqualified lookup into dependent base class, done
by clang's -fixit! :)

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

14 years agoAdded VMOVRRS/VMOVSRR to ARMInstrVFP.td for disassembly purpose.
Johnny Chen [Mon, 8 Feb 2010 17:26:09 +0000 (17:26 +0000)]
Added VMOVRRS/VMOVSRR to ARMInstrVFP.td for disassembly purpose.

A8.6.331 VMOV (between two ARM core registers and two single-precision registers)

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

14 years agoFix some typos.
Duncan Sands [Mon, 8 Feb 2010 11:03:31 +0000 (11:03 +0000)]
Fix some typos.

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

14 years agoFix x86 JIT stub on MSVC.
Torok Edwin [Mon, 8 Feb 2010 08:37:27 +0000 (08:37 +0000)]
Fix x86 JIT stub on MSVC.
Thanks to Kristaps Straupe for noticing the bug.

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

14 years agoFixed build error for redefinition.
Sanjiv Gupta [Mon, 8 Feb 2010 06:08:32 +0000 (06:08 +0000)]
Fixed build error for redefinition.

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

14 years agoAdd uppercase and lowercase part defines in driver.
Sanjiv Gupta [Mon, 8 Feb 2010 05:56:37 +0000 (05:56 +0000)]
Add uppercase and lowercase part defines in driver.
Use a temp dir with a unique name in the current dir itself.
Use forward_value instead of unpack_values.

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

14 years agoMake the destructor for TypeMapBase protected. Spotted by Duncan Sands with
Nick Lewycky [Sun, 7 Feb 2010 21:13:46 +0000 (21:13 +0000)]
Make the destructor for TypeMapBase protected. Spotted by Duncan Sands with
cppcheck!

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

14 years agoGive DwarfPrinter a protected (but not virtual) destructor. Cppcheck
Duncan Sands [Sun, 7 Feb 2010 21:09:22 +0000 (21:09 +0000)]
Give DwarfPrinter a protected (but not virtual) destructor.  Cppcheck
warns about this base class not having a virtual destructor, but since
this class has no virtual methods and neither it or the types derived
from it has a destructor, a protected trivial destructor will do (and
shuts cppcheck up) the trick without the cost of introducing a vtable.

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

14 years agoAdd suport for VASTART on Mips.
Bruno Cardoso Lopes [Sat, 6 Feb 2010 21:00:02 +0000 (21:00 +0000)]
Add suport for VASTART on Mips.

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

14 years agoFirst step towards varargs support in Mips:
Bruno Cardoso Lopes [Sat, 6 Feb 2010 19:20:49 +0000 (19:20 +0000)]
First step towards varargs support in Mips:
- o32 cc must pass all arguments in A0...A3 and stack regardless
if its type (but respect the alignment).
- Store all variable arguments back to the caller stack.

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