Chris Lattner
97868fe1b9
second half of commit.
...
llvm-svn: 78744
2009-08-11 22:52:15 +00:00
Chris Lattner
63d5be8a7b
pass "is64Bit" flag into PPC TAI ctors instead of a whole targetmachine.
...
llvm-svn: 78743
2009-08-11 22:51:34 +00:00
Chris Lattner
e655521a28
eliminate asmflavor from subtarget, PPCTAI is the only client
...
and each callee knows that it returns.
llvm-svn: 78742
2009-08-11 22:49:34 +00:00
Chris Lattner
abdcbc7ef2
Change the asmprinter to print the comment character before the
...
"inlineasmstart/end" strings so that the contents of the directive
are separate from the comment character. This lets elf targets
get #APP/#NOAPP for free even if they don't use "#" as the comment
character. This also allows hoisting the darwin stuff up to the
shared TAI class.
llvm-svn: 78737
2009-08-11 22:39:40 +00:00
David Goodwin
fd5defed1d
Allow a zero cycle stage to reserve/require a FU without advancing the cycle counter.
...
llvm-svn: 78736
2009-08-11 22:38:43 +00:00
Chris Lattner
54075a78b4
factorize more darwin TAI stuff. Note that this gives
...
darwin/arm support for .no_dead_strip
llvm-svn: 78734
2009-08-11 22:31:42 +00:00
Daniel Dunbar
526bcd461a
X86/AsmParser: Mark MOV64GSrm, MOV64FSrm, GS_MOV32rm, FS_MOV32rm as codegen only.
...
llvm-svn: 78733
2009-08-11 22:24:40 +00:00
Chris Lattner
6747b39ca5
factorize darwin ProtectedDirective and SetDirective.
...
llvm-svn: 78732
2009-08-11 22:22:44 +00:00
Daniel Dunbar
c4f8ea4ccb
Add 'isCodeGenOnly' bit to Instruction .td records.
...
- Used to mark fake instructions which don't correspond to an actual machine
instruction (or are duplicates of a real instruction). This is to be used for
"special cases" in the .td files, which should be ignored by things like the
assembler and disassembler. We still need a good solution to handle pervasive
duplication, like with the Int_ instructions.
- Set the bit on fake "mov 0" style instructions, which allows turning an
assembler matcher warning into a hard error.
- -2 FIXMEs.
llvm-svn: 78731
2009-08-11 22:17:52 +00:00
Chris Lattner
d832c8e87c
all darwin targets have .space and .zerofill, pull up.
...
llvm-svn: 78730
2009-08-11 22:17:31 +00:00
Chris Lattner
f710f71839
eliminate template from arm TAI
...
llvm-svn: 78729
2009-08-11 22:14:59 +00:00
Chris Lattner
374d5770f0
fix a bug I introduced in r78724 that caused failures in:
...
CodeGen/X86/dll-linkage.ll & CodeGen/X86/mingw-alloca.ll
llvm-svn: 78728
2009-08-11 22:12:58 +00:00
Chris Lattner
7faf1fd9a0
move LCOMMDirective = "\t.lcomm\t" up to DarwinTAI, eliminate
...
template in PPC backend for TAI.
llvm-svn: 78727
2009-08-11 22:06:07 +00:00
Owen Anderson
c6daf8f17c
Fix warnings.
...
llvm-svn: 78725
2009-08-11 21:59:30 +00:00
Chris Lattner
0909918514
eliminate the X86TargetAsmInfo template.
...
llvm-svn: 78724
2009-08-11 21:57:08 +00:00
Sean Callanan
f0e62eb78f
Added ADD instructions with rAX as one parameter to the Intel instruction
...
tables.
llvm-svn: 78721
2009-08-11 21:26:06 +00:00
Evan Cheng
cc9ca3500d
Shrinkify Thumb2 load / store multiple instructions.
...
llvm-svn: 78717
2009-08-11 21:11:32 +00:00
Daniel Dunbar
e431871851
llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will be
...
used to strip hard coded comments out of .td assembly strings.
llvm-svn: 78716
2009-08-11 20:59:47 +00:00
Owen Anderson
828e2644fc
struct -> class
...
llvm-svn: 78715
2009-08-11 20:52:44 +00:00
Dan Gohman
dbae4db67a
Optimize exact sdiv by a constant power of 2 to ashr.
...
llvm-svn: 78714
2009-08-11 20:47:47 +00:00
Owen Anderson
9f94459d24
Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
...
the latter is capable of representing either a primitive or an extended type.
llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Daniel Dunbar
a1e04d43c4
StringRef: Add find(char) and find(StringRef).
...
Also, regroup functions.
llvm-svn: 78712
2009-08-11 20:47:15 +00:00
Chris Lattner
2c30970b22
pass the TargetTriple down from each target ctor to the
...
LLVMTargetMachine ctor. It is currently unused.
llvm-svn: 78711
2009-08-11 20:42:37 +00:00
Chris Lattner
67e5ea2726
now that JumpTableDirective can differentate picness itself, MIPS TAI
...
no longer needs a targetmachine to initialize itself.
llvm-svn: 78710
2009-08-11 20:32:51 +00:00
Chris Lattner
fe27130454
split "JumpTableDirective" (an existing hack) into a PIC and nonPIC
...
version. This allows TAI implementations to specify the directive to use
based on the mode being codegen'd for.
The real fix for this is to remove JumpTableDirective, but I don't feel
like diving into the jumptable snarl just now.
llvm-svn: 78709
2009-08-11 20:30:58 +00:00
Chris Lattner
d5a9179685
"TAI::JumpTableDirective" is always null for current arm targets, simplify
...
the code based on this and make it fall through better.
llvm-svn: 78708
2009-08-11 20:29:57 +00:00
Dan Gohman
77ad32ab0e
Add convenience functions for creating nsw add operators.
...
llvm-svn: 78707
2009-08-11 20:20:39 +00:00
Daniel Dunbar
34c8791ff0
llvm-mc/AsmMatcher: Fix two thinkos in determining whether two classes are
...
related.
llvm-svn: 78706
2009-08-11 20:10:07 +00:00
Dan Gohman
f9d12f23cb
Use wchar.h to get wchar_t, not ctype.h.
...
llvm-svn: 78703
2009-08-11 19:59:21 +00:00
Dan Gohman
221a2c711d
Don't set the isexact flag if an sdiv operator has been folded into
...
something else.
llvm-svn: 78702
2009-08-11 19:56:00 +00:00
Jim Grosbach
841850ed26
Add Thumb2 eh_sjlj_setjmp implementation
...
llvm-svn: 78701
2009-08-11 19:42:21 +00:00
Daniel Dunbar
919fe2bd2f
Simplify ConstantExpr::getInBoundsGetElementPtr and fix a possible crash, if
...
constant folding eliminated the GEP instruction.
- clang was hitting this on its test suite (for x86_64, at least).
llvm-svn: 78698
2009-08-11 18:28:09 +00:00
Daniel Dunbar
270968279b
Revert 78680 until I figure out why it completely broke things.
...
llvm-svn: 78697
2009-08-11 18:11:15 +00:00
Devang Patel
5c310be0ff
Link NamedMDNodes.
...
llvm-svn: 78696
2009-08-11 18:01:24 +00:00
Dan Gohman
50c09d0ca3
Add convenience functions for creating inbounds GEPs.
...
llvm-svn: 78695
2009-08-11 17:57:01 +00:00
David Goodwin
92492f2f8e
Use DEBUG macro for debug output.
...
llvm-svn: 78694
2009-08-11 17:56:42 +00:00
Chris Lattner
5d47e93532
add a trivial line # cache to SourceMgr to make repeated queries to
...
FindLineNumber much faster when in sequence.
llvm-svn: 78693
2009-08-11 17:49:14 +00:00
Daniel Dunbar
7f8a9ebc8d
llvm-mc: Fix a crash on invalid due to a typo in relocatable expression
...
evaluation.
llvm-svn: 78692
2009-08-11 17:47:52 +00:00
Benjamin Kramer
78c3bcb582
Make LLVMContext and LLVMContextImpl classes instead of structs.
...
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Daniel Dunbar
5c13812e2f
Remove some unnecessary LoadInst constructors, missed during Twinification.
...
llvm-svn: 78689
2009-08-11 17:38:47 +00:00
Chris Lattner
73e9f8c636
make owen happy by being explicit.
...
llvm-svn: 78688
2009-08-11 17:38:15 +00:00
David Goodwin
ebd694bb0a
Add some debug output.
...
llvm-svn: 78687
2009-08-11 17:35:23 +00:00
Benjamin Kramer
0334d91a4a
Fix struct/class mismatch.
...
llvm-svn: 78686
2009-08-11 17:27:20 +00:00
Dan Gohman
4bdbad7ebf
Use isa instead of dyn_cast when the result is only converted to bool.
...
llvm-svn: 78685
2009-08-11 17:20:16 +00:00
Devang Patel
6fdf5484c9
Fix cut-n-pasto in comment.
...
llvm-svn: 78684
2009-08-11 17:15:47 +00:00
Jim Grosbach
1d5350c08f
fix GetInstSizeInBytes for eh_sjlj_setjmp
...
llvm-svn: 78683
2009-08-11 17:08:15 +00:00
Dan Gohman
58f4d89a10
Add convenience functions for creating exact sdiv operators, and
...
use them in CreatePtrDiff.
llvm-svn: 78682
2009-08-11 17:05:24 +00:00
Dan Gohman
d6c611e6e8
Avoid implicitly depending on Instructions.h.
...
llvm-svn: 78681
2009-08-11 17:03:18 +00:00
Chris Lattner
ab2460c066
move some 32-bit instrs to x86instrinfo.td
...
llvm-svn: 78680
2009-08-11 16:58:39 +00:00
Benjamin Kramer
7570a9ceae
Revert 78662 to fix broken windows build. Add a comment which explains the problem.
...
llvm-svn: 78679
2009-08-11 16:41:22 +00:00
Benjamin Kramer
eda08015ee
This void is implicit in C++.
...
llvm-svn: 78678
2009-08-11 16:03:08 +00:00
Dan Gohman
7c50c9bd63
Tidy #includes.
...
llvm-svn: 78677
2009-08-11 16:02:12 +00:00
Dan Gohman
aa3fb65349
Simplify this code. The case where one class is GR64RegClass and the
...
other is a subclass of it is effectively handled by the prior tests.
llvm-svn: 78676
2009-08-11 15:59:48 +00:00
Dan Gohman
557baeeae4
Add an explicit keyword.
...
llvm-svn: 78675
2009-08-11 15:57:42 +00:00
Dan Gohman
f5adff9c41
ConstantFolder and NoFolder no longer require their Context members.
...
llvm-svn: 78673
2009-08-11 15:56:12 +00:00
Chris Lattner
0c533d909a
now that these are in file-check format, we can merge them together
...
into one bigger test (which runs faster)
llvm-svn: 78672
2009-08-11 15:54:17 +00:00
Dan Gohman
5211b0128b
Fix a typo in an assertion string.
...
llvm-svn: 78671
2009-08-11 15:53:15 +00:00
Dan Gohman
866d263392
Use the default copy-ctor, copy-assignment, and destructor.
...
llvm-svn: 78670
2009-08-11 15:52:30 +00:00
Dan Gohman
ce594f5d64
Add a comment about the additional meaning of setPreservesCFG() for
...
MachineFunctionPass passes.
llvm-svn: 78669
2009-08-11 15:50:56 +00:00
Dan Gohman
a72f856aa4
Don't assume that external global variables are aligned at their preferred
...
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.
llvm-svn: 78668
2009-08-11 15:50:03 +00:00
Dan Gohman
c7c2bc9663
Remove unnecessary throw() specifications; LLVM doesn't use exceptions.
...
llvm-svn: 78667
2009-08-11 15:35:57 +00:00
Jim Grosbach
f24f9d9cb6
Whitespace cleanup. Remove trailing whitespace.
...
llvm-svn: 78666
2009-08-11 15:33:49 +00:00
Jim Grosbach
74eb9e7bfd
Move ~ARMConstantPoolValue() to the .cpp file to avoid needing to include <cstdlib> in the header.
...
llvm-svn: 78665
2009-08-11 15:26:27 +00:00
Dan Gohman
38484ceec9
Remove unnecessary casts.
...
llvm-svn: 78664
2009-08-11 15:15:10 +00:00
Dan Gohman
e02f9ba9b1
Add const qualifiers.
...
llvm-svn: 78663
2009-08-11 15:13:43 +00:00
Dan Gohman
b5147e845f
Remove an unnecessary mutable.
...
llvm-svn: 78662
2009-08-11 15:03:52 +00:00
Shantonu Sen
1f90bd277b
Regenerate per request of Gabor Greif (r78628)
...
llvm-svn: 78661
2009-08-11 13:39:52 +00:00
Benjamin Kramer
6d78d69586
Silence MSVC warning.
...
llvm-svn: 78660
2009-08-11 11:01:19 +00:00
Evan Cheng
806845daec
Fix the previous accidental commit. Now shrinking common Thumb2 load / store instructions.
...
llvm-svn: 78659
2009-08-11 09:37:40 +00:00
Evan Cheng
3606467709
Fix Thumb2 load / store addressing mode matching code. Do not use so_reg form to
...
match base only address, i.e. [r] since Thumb2 requires a offset register field.
For those, use [r + imm12] where the immediate is zero.
Note the generated assembly code does not look any different after the patch.
But the bug would have broken the JIT (if there is Thumb2 support) and it can
break later passes which expect the address mode to be well-formed.
llvm-svn: 78658
2009-08-11 08:52:18 +00:00
Evan Cheng
d4d352c663
80 column violation.
...
llvm-svn: 78657
2009-08-11 08:47:46 +00:00
Erick Tryzelaar
70ede4843c
Change llvm-c's ordering of contexts to make it consistent.
...
llvm-svn: 78656
2009-08-11 07:46:16 +00:00
Evan Cheng
192d7c0752
Cosmetic changes.
...
llvm-svn: 78655
2009-08-11 07:36:14 +00:00
Evan Cheng
6e62e93a8d
Adding a blank line back.
...
llvm-svn: 78654
2009-08-11 07:32:58 +00:00
Devang Patel
4d4a2e09a9
Link metadata.
...
llvm-svn: 78652
2009-08-11 06:46:31 +00:00
Devang Patel
c5aa8c6d29
Remove dead metadata.
...
llvm-svn: 78651
2009-08-11 06:31:57 +00:00
Jakob Stoklund Olesen
b39a5aa794
Rebuild RegScavenger::DistanceMap each time it is needed.
...
The register scavenger maintains a DistanceMap that maps MI pointers to their
distance from the top of the current MBB. The DistanceMap is built
incrementally in forward() and in bulk in findFirstUse(). It is used by
scavengeRegister() to determine which candidate register has the longest
unused interval.
Unfortunately the DistanceMap contents can become outdated. The first time
scavengeRegister() is called, the DistanceMap is filled to cover the MBB. If
then instructions are inserted in the MBB (as they always are following
scavengeRegister()), the recorded distances are too short. This causes bad
behaviour in the included test case where a register use /after/ the current
position is ignored because findFirstUse() thinks is is /before/ the current
position. A "using an undefined register" assertion follows promptly.
The fix is to build a fresh DistanceMap at the top of scavengeRegister(), and
discard it after use. This means that DistanceMap is no longer needed as a
RegScavenger member variable, and forward() doesn't need to update it.
The fix then discloses issue number two in the same test case: The candidate
search in scavengeRegister() finds a CSR that has been saved in the prologue,
but is currently unused. It would be both inefficient and wrong to spill such
a register in the emergency spill slot. In the present case, the emergency
slot restore is placed immediately before the normal epilogue restore, leading
to a "Redefining a live register" assertion.
Fix number two: When scavengerRegister() stumbles upon an unused register that
is overwritten later in the MBB, return that register early. It is important
to verify that the register is defined later in the MBB, otherwise it might be
an unspilled CSR.
llvm-svn: 78650
2009-08-11 06:25:12 +00:00
Daniel Dunbar
0c04f2b454
Fix a -Asserts warning.
...
- Since the function is never called in NDEBUG mode, just dropped the DEBUG()
uses here.
llvm-svn: 78649
2009-08-11 06:22:47 +00:00
Bob Wilson
8f5c447bfa
Convert more Neon tests to use FileCheck.
...
llvm-svn: 78648
2009-08-11 05:51:19 +00:00
Bob Wilson
12842f9865
Use vAny type to get rid of Neon intrinsics that differed only in whether
...
the overloaded vector types allowed floating-point or integer vector elements.
Most of these operations actually depend on the element type, so bitcasting
was not an option.
If you include the vpadd intrinsics that I updated earlier, this gets rid
of 20 intrinsics.
llvm-svn: 78646
2009-08-11 05:39:44 +00:00
Bob Wilson
781797f586
Fix a few more places in TableGen that need to handle EVT::vAny types.
...
llvm-svn: 78643
2009-08-11 05:03:38 +00:00
Daniel Dunbar
71527c1493
llvm-mc/X86: Parse '*' correctly (in the way the matcher expects).
...
llvm-svn: 78642
2009-08-11 05:00:25 +00:00
Daniel Dunbar
ba95a7cd8d
llvm-mc: Accept .word as a synonym for .short
...
llvm-svn: 78641
2009-08-11 04:44:00 +00:00
Daniel Dunbar
cd4eee5443
llvm-mc: Honor -o option (and add -f).
...
llvm-svn: 78640
2009-08-11 04:34:48 +00:00
Daniel Dunbar
a4b069ce00
llvm-mc: Sketch parsing for .file, .line, and .loc. No streamer hooks for these
...
yet (I'm not even sure what they do).
llvm-svn: 78639
2009-08-11 04:24:50 +00:00
Daniel Dunbar
9af747b421
llvm-mc: Fix darwin .section parsing. It was skipping the section name and a ','
...
(and outputting a diagnostic pointing at the wrong place), all of which lead to
much confusion.
llvm-svn: 78637
2009-08-11 03:42:33 +00:00
Daniel Dunbar
bb98db2d21
llvm-mc/AsmParser: Implement automatic classification of RegisterClass operands.
...
- This drops us to 123 ambiguous instructions (previously ~500) on X86.
llvm-svn: 78636
2009-08-11 02:59:53 +00:00
Sanjiv Gupta
dd4103b55b
Fixed more problems caused by 78142.
...
Passing of indirect arguments starts after return value on the callee's frame.
llvm-svn: 78635
2009-08-11 01:51:55 +00:00
David Goodwin
f20236ac83
Replace DOUT.
...
llvm-svn: 78634
2009-08-11 01:44:26 +00:00
Bob Wilson
741a9c7bf6
Use new EVT::vAny type to combine Neon intrinsics for VPADD.
...
llvm-svn: 78632
2009-08-11 01:15:26 +00:00
Bob Wilson
2cd5da8300
Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsic
...
arguments that are vectors of any size and element type.
llvm-svn: 78631
2009-08-11 01:14:02 +00:00
Sean Callanan
5cfb60ffc7
Added the x86 INT instructions; both the special-case INT 3 and the general-case
...
INT i8. These instructions are only for interpretation by disassemblers, not
for emission, so they do not as yet have patterns.
llvm-svn: 78630
2009-08-11 01:09:06 +00:00
David Goodwin
b80734bb15
Fix bug in NEON convert for single-precision FP. This also fixes the tblgen warnings.
...
llvm-svn: 78629
2009-08-11 01:07:38 +00:00
Gabor Greif
bc0b457f93
Lay the groundwork for my upcoming ilist sentinel shrinking patch
...
by defining a LLVM_COMPACT_SENTINELS symbol to 0 or 1 in config.h.
I'm asking for 3 favors:
- may an autofoo expert look at this and suggest improvements?
- may a cmake expert suggest analogous functionality for config.h?
- may somebody with the right autofoo mix regenerate configure? (mine is too new)
Thanks!
--This line, and those below, will be ignored--
M configure.ac
llvm-svn: 78628
2009-08-11 00:59:39 +00:00
Jim Grosbach
9382d5ac05
Add stdlib.h
...
llvm-svn: 78627
2009-08-11 00:20:00 +00:00
Jim Grosbach
693e36a3e8
SjLj based exception handling unwinding support. This patch is nasty, brutish
...
and short. Well, it's kinda short. Definitely nasty and brutish.
The front-end generates the register/unregister calls into the SjLj runtime,
call-site indices and landing pad dispatch. The back end fills in the LSDA
with the call-site information provided by the front end. Catch blocks are
not yet implemented.
Built on Darwin and verified no llvm-core "make check" regressions.
llvm-svn: 78625
2009-08-11 00:09:57 +00:00
Evan Cheng
475f8a4fa2
Enable Thumb2 instruction shrinking (32-bit to 16-bit) pass. Convert a bunch of thumb2 tests to FileCheck.
...
llvm-svn: 78622
2009-08-10 23:56:04 +00:00
Lang Hames
3b90d973b0
Modified VNInfo. The "copy" member is now a union which holds the copy for a register interval, or the defining register for a stack interval. Access is via getCopy/setCopy and getReg/setReg.
...
llvm-svn: 78620
2009-08-10 23:43:28 +00:00
Dan Gohman
9d26c85bdc
Fix a bug in the DAGCombiner's handling of multiple linked
...
MERGE_VALUES nodes. Replacing the result values with the
operands in one MERGE_VALUES node may cause another
MERGE_VALUES node be CSE'd with the first one, and bring
its uses along, so that the first one isn't dead, as this
code expects. Fix this by iterating until the node is
really dead. This fixes PR4699.
llvm-svn: 78619
2009-08-10 23:43:19 +00:00
Dan Gohman
733a64db57
Fix a bug where DAGCombine was producing an illegal ConstantFP
...
node after legalize, and remove the workaround code from the
ARM backend.
llvm-svn: 78615
2009-08-10 23:15:10 +00:00
David Goodwin
d9aedcae23
Use FileCheck.
...
llvm-svn: 78614
2009-08-10 23:14:14 +00:00
David Goodwin
bdf1a1d1a2
Use FileCheck... its good for you...
...
llvm-svn: 78613
2009-08-10 23:06:57 +00:00
Devang Patel
9b4ea1c474
Remove MDNode from ValueMap when MDNode is destroyed.
...
llvm-svn: 78612
2009-08-10 22:59:46 +00:00
David Goodwin
9e7c7e748f
Fix test.
...
llvm-svn: 78611
2009-08-10 22:58:08 +00:00
Owen Anderson
53aa7a960c
Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
...
llvm-svn: 78610
2009-08-10 22:56:29 +00:00
Eric Christopher
d91dceea0f
Whitespace, 80-column, and isTwoAddress -> Constraints = "" changes.
...
No functional change.
llvm-svn: 78608
2009-08-10 22:37:37 +00:00
Devang Patel
2c6c743039
Rename MDNodeSet as MDNodes.
...
llvm-svn: 78607
2009-08-10 22:31:31 +00:00
David Goodwin
108b522912
Fix test.
...
llvm-svn: 78606
2009-08-10 22:31:04 +00:00
Devang Patel
33dadac722
Align comments.
...
llvm-svn: 78605
2009-08-10 22:20:38 +00:00
David Goodwin
85b5b027f7
Use NEON for single-precision int<->FP conversions.
...
llvm-svn: 78604
2009-08-10 22:17:39 +00:00
Devang Patel
148e9f0d3f
Do not rely on magic "llvm.dbg.*" global variable name to find debug info.
...
PIC16 developers, please verify.
llvm-svn: 78603
2009-08-10 22:11:20 +00:00
Devang Patel
d0658efdca
Keep track of DIType.
...
llvm-svn: 78602
2009-08-10 22:09:58 +00:00
Owen Anderson
eddff647ac
Remove a bunch of debugging code that was slowing PBQP down by 25% or so.
...
llvm-svn: 78601
2009-08-10 21:49:45 +00:00
Eric Christopher
458c91732c
Fix up whitespace, remove commented out code.
...
llvm-svn: 78600
2009-08-10 21:48:58 +00:00
Daniel Dunbar
e4f79d140d
llvm-mc/AsmParser: Disambiguate i64i8imm.
...
llvm-svn: 78598
2009-08-10 21:06:41 +00:00
Daniel Dunbar
aeb1feb67a
llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to call
...
on target specific operands for testing class membership and converting to
MCInst operands.
llvm-svn: 78597
2009-08-10 21:00:45 +00:00
Daniel Dunbar
009ac1ae04
Rename ConvertType to ConvertConstant to avoid a name conflict on llvm-gcc.
...
llvm-svn: 78596
2009-08-10 20:56:46 +00:00
Owen Anderson
3e77df2bcd
SimpleValueType-ify a few more methods on TargetLowering.
...
llvm-svn: 78595
2009-08-10 20:46:15 +00:00
Evan Cheng
f72c13bdf5
Handle the constantfp created during post-legalization dag combiner phase.
...
llvm-svn: 78594
2009-08-10 20:25:59 +00:00
Owen Anderson
246617857f
Continue the SimpleValueType-ification.
...
llvm-svn: 78593
2009-08-10 20:18:46 +00:00
Erick Tryzelaar
a1025faf84
Fix ocaml "make check" tests, that wasn't finding the proper c++ compiler.
...
llvm-svn: 78592
2009-08-10 19:45:05 +00:00
Erick Tryzelaar
48708c9641
Fix comment in llvm.mli.
...
llvm-svn: 78591
2009-08-10 19:45:00 +00:00
Erick Tryzelaar
e4fa5ac925
Convert comments to C90-style so llvm-c can import DataTypes.h.
...
llvm-svn: 78590
2009-08-10 19:44:53 +00:00
Erick Tryzelaar
c475d136cb
Fix docstring for ocaml binding's const_float.
...
llvm-svn: 78589
2009-08-10 19:44:45 +00:00
Daniel Dunbar
26454f794c
llvm-mc/AsmMatcher: Remove some code which has been obsoleted by move to
...
explicit parser match classes.
llvm-svn: 78588
2009-08-10 19:08:50 +00:00
Daniel Dunbar
0afe2cc097
llvm-mc/AsmMatcher: Fix thinko, Mem isn't a subclass of Imm.
...
llvm-svn: 78587
2009-08-10 19:08:02 +00:00
Devang Patel
0bdbee14cd
We are not using FoldingSet for metadata uniquing anymore.
...
llvm-svn: 78585
2009-08-10 18:59:07 +00:00
Owen Anderson
c30530d105
Start moving TargetLowering away from using full MVTs and towards SimpleValueType, which will simplify the privatization of IntegerType in the future.
...
llvm-svn: 78584
2009-08-10 18:56:59 +00:00
Daniel Dunbar
17410a4b92
llvm-mc/AsmMatcher: Change assembler parser match classes to their own record
...
structure.
llvm-svn: 78581
2009-08-10 18:41:10 +00:00
Benjamin Kramer
850e0f9e7e
g++ 4.0 doesn't have std::vector::data.
...
llvm-svn: 78579
2009-08-10 18:27:33 +00:00
Owen Anderson
13234f83ac
Change the MDNode uniquing to a ValueMap, at Devang's request.
...
llvm-svn: 78577
2009-08-10 18:16:08 +00:00
Chris Lattner
6c20391d38
split MachO section handling stuff out to its out .h/.cpp file.
...
llvm-svn: 78576
2009-08-10 18:15:01 +00:00
Chris Lattner
97189e5d04
add a fixme
...
llvm-svn: 78575
2009-08-10 18:05:55 +00:00
Chris Lattner
fbcafd4c6c
arm only needs to emit one .align directive for hidden nlp's, not one
...
per pointer.
llvm-svn: 78574
2009-08-10 18:02:16 +00:00
Chris Lattner
292472d3d3
make sure that arm nonlazypointers are aligned properly
...
llvm-svn: 78573
2009-08-10 18:01:34 +00:00
Chris Lattner
ec64b73712
Fix a weird ppc64-specific link error during an llvm-gcc build:
...
ld: bad offset (0x00000091) for lo14 instruction pic-base fix-up in ___popcountdi2 from libgcc/./_popcountsi2_s.o
The problem is that the non lazy symbol pointers need to be 8 byte aligned
on ppc64 and .section doesn't have an implicit alignment like ".non_lazy_symbol_pointer"
does.
llvm-svn: 78572
2009-08-10 17:58:51 +00:00
Chris Lattner
7b01bf6125
fix some warnings for the MSVC build, by Yonggang Luo!
...
llvm-svn: 78571
2009-08-10 17:35:42 +00:00
Dan Gohman
b717091e69
Make this comment more closely reflect the code.
...
llvm-svn: 78569
2009-08-10 16:50:32 +00:00
Dan Gohman
676d115ce5
Add nounwind keywords.
...
llvm-svn: 78568
2009-08-10 16:48:40 +00:00
David Greene
f354b6ef90
Add support for printing loop structure information in asm comments.
...
This definitely slows down asm output so put it under an -asm-exuberant
flag.
This information is useful when doing static analysis of performance
issues.
llvm-svn: 78567
2009-08-10 16:38:07 +00:00
Devang Patel
714612b1eb
Clarify limitations of a ModulePass requiring a FunctionPass.
...
llvm-svn: 78566
2009-08-10 16:37:29 +00:00
Daniel Dunbar
2587b61533
llvm-mc/AsmParser: Check for matches with super classes when matching
...
instruction operands.
llvm-svn: 78565
2009-08-10 16:05:47 +00:00
David Goodwin
62e053b790
Checkpoint scheduling itinerary changes.
...
llvm-svn: 78564
2009-08-10 15:56:13 +00:00
David Goodwin
6021b4dccc
Post RA scheduler changes. Introduce a hazard recognizer that uses the target schedule information to accurately model the pipeline. Update the scheduler to correctly handle multi-issue targets.
...
llvm-svn: 78563
2009-08-10 15:55:25 +00:00
Evan Cheng
5bb93ce769
Watch out for empty BB.
...
llvm-svn: 78562
2009-08-10 08:10:13 +00:00
Evan Cheng
8a640ae504
rev, rev16, and revsh do not set CPSR.
...
llvm-svn: 78561
2009-08-10 07:58:45 +00:00
Evan Cheng
f16a1d5b79
Duh. Most 16-bit Thumb rr instructions are two-address. Fix table.
...
llvm-svn: 78560
2009-08-10 07:20:37 +00:00
Evan Cheng
1f5bee14a1
CPSR can be livein; transfer predicate operands correctly; tMUL is two-address.
...
llvm-svn: 78559
2009-08-10 06:57:42 +00:00
Evan Cheng
092b701a2c
Add support for folding loads / stores into 16-bit moves used by Thumb2.
...
llvm-svn: 78558
2009-08-10 06:32:05 +00:00
Evan Cheng
55c014a9f3
80 col violation.
...
llvm-svn: 78557
2009-08-10 05:51:48 +00:00
Evan Cheng
f5b73869f2
Use tMOVgpr2gpr instead of t2MOVr.
...
llvm-svn: 78556
2009-08-10 05:49:43 +00:00
Daniel Dunbar
1bf60c257c
Add support for a user supplied pointer argument to llvm_install_error_handler.
...
llvm-svn: 78553
2009-08-10 03:36:26 +00:00
Bruno Cardoso Lopes
9b3484dd14
Move ConstantExpr handling to ResolveConstantExpr method and also
...
add support for PtrToInt, Add, Mul.
llvm-svn: 78552
2009-08-10 03:32:40 +00:00
Evan Cheng
51cbd2d6c4
Add support to reduce most of 32-bit Thumb2 arithmetic instructions.
...
llvm-svn: 78550
2009-08-10 02:37:24 +00:00
Evan Cheng
5b4c308f0c
Always use the 16-bit tMOVgpr2gpr instead of the 32-bit t2MOVr.
...
llvm-svn: 78549
2009-08-10 02:06:53 +00:00
Chris Lattner
cb307a27bf
Make the big switch: Change MCSectionMachO to represent a section *semantically*
...
instead of syntactically as a string. This means that it keeps track of the
segment, section, flags, etc directly and asmprints them in the right format.
This also includes parsing and validation support for llvm-mc and
"attribute(section)", so we should now start getting errors about invalid
section attributes from the compiler instead of the assembler on darwin.
Still todo:
1) Uniquing of darwin mcsections
2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h]
3) there are a few FIXMEs, for example what is the syntax to get the
S_GB_ZEROFILL segment type?
llvm-svn: 78547
2009-08-10 01:39:42 +00:00
Chris Lattner
aea9dfc167
add a simple back() method to StringRef.
...
llvm-svn: 78544
2009-08-10 00:44:02 +00:00
Benjamin Kramer
6e046f4291
Use abs64 instead abs; some platforms don't have a 64-bit abs overload. Noticed by Yonggang Luo!
...
llvm-svn: 78543
2009-08-09 22:37:07 +00:00
Evan Cheng
d461c1c559
Add support to convert 32-bit instructions to 16-bit non-two-address ones.
...
llvm-svn: 78540
2009-08-09 19:17:19 +00:00
Chris Lattner
f4c2eee251
always end a section with \n on elf.
...
llvm-svn: 78534
2009-08-09 15:31:10 +00:00
Daniel Dunbar
d9631912cf
llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
...
llvm-svn: 78533
2009-08-09 08:23:23 +00:00
Daniel Dunbar
e0891c2109
llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
...
make it easier to see interesting ambiguities.
- Also, check that user doesn't try to redefine the super class. This is a wart
in the current design, in that assembler match classes aren't explicitly
declared somewhere (so there isn't a unique place to declare the super
class). This should probably be fixed.
llvm-svn: 78532
2009-08-09 08:19:00 +00:00
Daniel Dunbar
5877782962
Disable this test for now, we don't check for super classes when matching yet.
...
llvm-svn: 78531
2009-08-09 07:35:56 +00:00
Daniel Dunbar
8e33cb2de1
llvm-mc/AsmParser: Implement user defined super classes.
...
- We can now discriminate SUB32ri8 from SUB32ri, for example.
llvm-svn: 78530
2009-08-09 07:20:21 +00:00
Bob Wilson
7fc63417d7
Add tests for Neon VZIP and VUZP instructions.
...
llvm-svn: 78529
2009-08-09 06:48:29 +00:00
Bob Wilson
f60c8807e8
Add a test for Neon VTRN instructions.
...
llvm-svn: 78528
2009-08-09 06:30:46 +00:00
Daniel Dunbar
f573b563e1
llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.
...
- We want the ordering operation to be simple, since we run it on every
match. The old ordering is also not a strict weak ordering when there are
ambiguities, which makes MSVC unhappy.
- While we are at it, detect all ambiguities instead of just the adjacent
ones. There are actually 655, for X86.
llvm-svn: 78526
2009-08-09 06:05:33 +00:00
Bob Wilson
45fa71a392
Change Neon table lookup (VTBL) and table extension (VTBX) intrinsics to
...
take the table vectors as separate arguments, instead of the previous
approach where they were combined into one big vector.
llvm-svn: 78525
2009-08-09 06:03:09 +00:00
Daniel Dunbar
447c4ab91d
Extend comment on ParserMatchClass .td field, and add some missing
...
classes for X86.
llvm-svn: 78524
2009-08-09 06:00:04 +00:00
Daniel Dunbar
c32aa060bd
llvm-mc/AsmParser: Define match classes in the .td file.
...
-2 FIXMEs.
llvm-svn: 78523
2009-08-09 05:18:30 +00:00
Daniel Dunbar
3239f020eb
llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detecting
...
ambiguities.
- Currently there are 483 ambiguities to resolve. :)
llvm-svn: 78522
2009-08-09 04:00:06 +00:00
Daniel Dunbar
22dd774d8f
STLExtras: Add less_ptr.
...
llvm-svn: 78521
2009-08-09 03:36:59 +00:00
Chris Lattner
b7ff9e84be
fix edito
...
llvm-svn: 78520
2009-08-08 23:43:55 +00:00
Daniel Dunbar
d8c822f180
llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).
...
llvm-svn: 78518
2009-08-08 23:43:16 +00:00
Chris Lattner
591105c540
sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
...
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)
llvm-svn: 78517
2009-08-08 23:39:42 +00:00
Anton Korobeynikov
cfed3005e5
Use subclassing to print lane-like immediates (w/o hash) eliminating
...
'no_hash' modifier. Hopefully this will make Daniel happy :)
llvm-svn: 78514
2009-08-08 23:10:41 +00:00
Daniel Dunbar
5478125143
llvm-mc/AsmMatcher: Tweak string matcher.
...
- Track whether we need to insert an explicit 'break'.
- Invert conditional when matching a single prefix to reduce
nesting/bracing/breaking.
- wc -l of X86GenAsmMatcher.inc decreased by 10%. :)
llvm-svn: 78513
2009-08-08 22:57:25 +00:00
Chris Lattner
c51023b0bc
remove nondeterminstic test.
...
llvm-svn: 78512
2009-08-08 22:56:37 +00:00
Chris Lattner
3219d85f16
add a note about dead zero extends.
...
llvm-svn: 78511
2009-08-08 22:46:59 +00:00
Chris Lattner
1cb9396f4f
1. Make MCSection an abstract class.
...
2. Move section switch printing to MCSection virtual method which takes a
TAI. This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
TLOFELF::AtIsCommentChar.
llvm-svn: 78510
2009-08-08 22:41:53 +00:00
Chris Lattner
089b7de20d
switch this to create coff sections for now, it doesn't really matter for
...
llvm-mc's purpose yet and we'll want to switch to creating semantic sections
at some point.
llvm-svn: 78509
2009-08-08 22:38:48 +00:00
Eric Christopher
7dfa9f2e56
Add crc32 instruction and intrinsics. Add a new class of prefix
...
bytes for F2 0F 38 and propagate. Add a FIXME for a set
of possibilities which correspond to intrinsics already used.
New test.
llvm-svn: 78508
2009-08-08 21:55:08 +00:00
Jakob Stoklund Olesen
e2dc8a46e9
Add support for READCYCLECOUNTER in Blackfin back-end.
...
llvm-svn: 78506
2009-08-08 21:42:22 +00:00
Chris Lattner
26cc5b78d0
add new PIC16Section class, this time hopefully not breaking the build :)
...
llvm-svn: 78505
2009-08-08 21:37:01 +00:00
Daniel Dunbar
66f4f54e8a
llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.
...
Also, redefined MatchRegisterName to just return the register value or a
sentinel, to simplify the generated code.
llvm-svn: 78504
2009-08-08 21:22:41 +00:00
Daniel Dunbar
59410aaea6
Revert r78501, it doesn't build.
...
--- Reverse-merging r78501 into '.':
U lib/Target/PIC16/PIC16TargetObjectFile.cpp
D lib/Target/PIC16/PIC16Section.h
llvm-svn: 78503
2009-08-08 21:12:40 +00:00
Chris Lattner
4a4e4487fc
make PIC16 create its own custom MCSection.
...
llvm-svn: 78501
2009-08-08 20:55:25 +00:00
Chris Lattner
245fdfb9c3
make target-specific TLOF impls (except PIC16) create target-specific
...
MCSection instances.
llvm-svn: 78500
2009-08-08 20:52:13 +00:00
Chris Lattner
5a9bc50fa8
stub out PECOFF/MachO/ELF MCSection classes
...
llvm-svn: 78499
2009-08-08 20:50:49 +00:00
Chris Lattner
c9ea8fddb2
eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
...
A TAI hook is appropriate in this case because this is just an
asm syntax issue, not a semantic difference. TLOF should model
the semantics of the section.
llvm-svn: 78498
2009-08-08 20:43:12 +00:00
Jakob Stoklund Olesen
dc6bccbaa6
Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().
...
Blackfin supports and/or/xor on i32 but not on i16. Teach
DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes
after legalize ops.
llvm-svn: 78497
2009-08-08 20:42:17 +00:00
Chris Lattner
36d04ec972
give pic16 a target-specific section creation name too
...
llvm-svn: 78496
2009-08-08 20:23:47 +00:00
Chris Lattner
ce7d14032b
now that getOrCreateSection is all object-file specific,
...
give the impls an object-file-specific name. In the future
they can take different arguments etc.
llvm-svn: 78495
2009-08-08 20:22:20 +00:00
Chris Lattner
302041d5c9
sink getOrCreateSection down into all the object file implementations,
...
now that they create *all* the sections.
llvm-svn: 78494
2009-08-08 20:14:13 +00:00
Eric Christopher
e7064fdc9d
Fix some cut and paste-os.
...
llvm-svn: 78493
2009-08-08 20:09:33 +00:00
Chris Lattner
00e2e74fb2
add a little function to do arbitrary string pattern matching in a
...
much more efficient way than a sequence of if's. Switch MatchRegisterName
to use it. It would be nice if someone could factor this out to a shared
place in tblgen :)
llvm-svn: 78492
2009-08-08 20:02:57 +00:00
Chris Lattner
16cf1967f5
add another const
...
llvm-svn: 78487
2009-08-08 19:16:05 +00:00
Chris Lattner
099003bc19
remove a useless anon-ns, make table const.
...
llvm-svn: 78486
2009-08-08 19:15:25 +00:00
Daniel Dunbar
2f140834cf
Some ProfileInfo cleanups.
...
- Part of optimal static profiling patch sequence by Andreas Neustifter.
llvm-svn: 78485
2009-08-08 18:59:03 +00:00
Daniel Dunbar
003a1b1c1d
Add a basic static ProfileInfo provider (ProfileEstimatorPass).
...
- Part of optimal static profiling patch sequence by Andreas Neustifter.
llvm-svn: 78484
2009-08-08 18:44:18 +00:00