Craig Topper
d07a59f288
Fix disassembling of INVEPT and INVVPID to take operands
...
llvm-svn: 140955
2011-10-01 21:20:14 +00:00
Craig Topper
88cb33e0d4
Fix disassembler handling of CRC32 which is an odd instruction that uses 0xf2 as an opcode extension and allows the opsize prefix. This necessitated adding IC_XD_OPSIZE and IC_64BIT_XD_OPSIZE contexts. Unfortunately, this increases the size of the disassembler tables. Fixes PR10702.
...
llvm-svn: 140954
2011-10-01 19:54:56 +00:00
Chad Rosier
a88cb23da7
Revert r140924 "Attempt to fix dynamic stack realignment for thumb1 functions."
...
to appease nightly testers. Not quite there yet.
llvm-svn: 140953
2011-10-01 19:30:36 +00:00
Nadav Rotem
52e8ed9214
Moved type construction out of the loop and added an assert on the legality of the type. Formatted lines to the 80 char limit.
...
llvm-svn: 140952
2011-10-01 18:39:28 +00:00
Peter Collingbourne
84c287e33c
Move TableGen's parser and entry point into a library
...
This is the first step towards splitting LLVM and Clang's tblgen executables.
llvm-svn: 140951
2011-10-01 16:41:13 +00:00
Bill Wendling
d072b73d78
No one should be using the method directly. Assert if they do.
...
llvm-svn: 140947
2011-10-01 12:47:34 +00:00
Bill Wendling
f977ff5fb5
Add a convenience method to tell if two things are equal.
...
llvm-svn: 140946
2011-10-01 12:44:28 +00:00
Bill Wendling
4a4772fae2
Use the ARMConstantPoolMBB class to handle the MBB values.
...
llvm-svn: 140943
2011-10-01 09:30:42 +00:00
Bill Wendling
6dbc9fe82b
Add ARMConstantPoolMBB to hold an MBB value in the constant pool.
...
llvm-svn: 140942
2011-10-01 09:19:10 +00:00
Bill Wendling
c5a86069ca
Remove dead code.
...
llvm-svn: 140941
2011-10-01 09:05:12 +00:00
Bill Wendling
9ff05f740f
Remove now dead methods and ivar.
...
llvm-svn: 140940
2011-10-01 09:04:18 +00:00
Bill Wendling
c214cb055d
Use the new ARMConstantPoolSymbol class to handle external symbols.
...
llvm-svn: 140939
2011-10-01 08:58:29 +00:00
Bill Wendling
d7fa016720
Add an ARMConstantPool class for external symbols. This will split out the support for external symbols from the base class.
...
llvm-svn: 140938
2011-10-01 08:36:59 +00:00
Bill Wendling
d115c4d300
Remove now dead methods and ivar from ARMConstantPoolValue.
...
llvm-svn: 140937
2011-10-01 08:02:05 +00:00
Bill Wendling
7753d66468
Switch over to using ARMConstantPoolConstant for global variables, functions,
...
and block addresses.
llvm-svn: 140936
2011-10-01 08:00:54 +00:00
Bill Wendling
f117a35de0
Some more refactoring.
...
* Add a couple of Create methods to the ARMConstantPoolConstant class,
* Add its own version of getExistingMachineCPValue, and
* Modify hasSameValue to return false if the object isn't an ARMConstantPoolConstant.
llvm-svn: 140935
2011-10-01 07:52:37 +00:00
Bill Wendling
6722556380
Add a Create method that accepts 'kind' and 'pcadj' arguments.
...
llvm-svn: 140934
2011-10-01 06:44:24 +00:00
Bill Wendling
396c211ae1
Refactoring: Separate out the ARM constant pool Constant from the ARM constant
...
pool value.
It's not used right now, but will be soon.
llvm-svn: 140933
2011-10-01 06:40:33 +00:00
Bob Wilson
ce29158bc4
Subtarget getFeatureBits() returns a uint64_t, not unsigned.
...
llvm-svn: 140928
2011-10-01 02:47:54 +00:00
Chad Rosier
21360a4949
Attempt to fix dynamic stack realignment for thumb1 functions. It is in fact
...
useful if an optimization assumes the stack has been realigned. Credit to
Eli for his assistance.
rdar://10043857
llvm-svn: 140924
2011-10-01 02:03:18 +00:00
Andrew Trick
f7656015fc
Inlining and unrolling heuristics should be aware of free truncs.
...
We want heuristics to be based on accurate data, but more importantly
we don't want llvm to behave randomly. A benign trunc inserted by an
upstream pass should not cause a wild swings in optimization
level. See PR11034. It's a general problem with threshold-based
heuristics, but we can make it less bad.
llvm-svn: 140919
2011-10-01 01:39:05 +00:00
Andrew Trick
caa500bf93
whitespace
...
llvm-svn: 140916
2011-10-01 01:27:56 +00:00
Michael J. Spencer
44a36c872e
Add Windows x64 stack walking support. Patch by Aaron Ballman!
...
llvm-svn: 140906
2011-10-01 00:05:20 +00:00
Jakob Stoklund Olesen
6417395d67
Use precomputed BitVector for CodeGenRegisterClass::hasSubClass().
...
All the sub-class bit vectors are computed when first creating the
register bank.
llvm-svn: 140905
2011-09-30 23:47:05 +00:00
Bill Wendling
b34639de75
Filecheck-ize.
...
llvm-svn: 140904
2011-09-30 23:40:29 +00:00
Bill Wendling
24b6b8d16a
Add new line at end of file.
...
llvm-svn: 140903
2011-09-30 23:21:11 +00:00
Bill Wendling
9925f197cc
When inferring the pointer alignment, if the global doesn't have an initializer
...
and the alignment is 0 (i.e., it's defined globally in one file and declared in
another file) it could get an alignment which is larger than the ABI allows for
that type, resulting in aligned moves being used for unaligned loads.
For instance, in file A.c:
struct S s;
In file B.c:
struct {
// something long
};
extern S s;
void foo() {
struct S p = s;
// ...
}
this copy is a 'memcpy' which is turned into a series of 'movaps' instructions
on X86. But this is wrong, because 'struct S' has alignment of 4, not 16.
llvm-svn: 140902
2011-09-30 23:19:55 +00:00
Nick Lewycky
f40df1d46c
Promote comment to doxycomment. Adjust whitespace. No functionality change.
...
llvm-svn: 140899
2011-09-30 22:19:53 +00:00
Jakob Stoklund Olesen
237dceff90
Store sub-class lists as a bit vector.
...
This uses less memory and it reduces the complexity of sub-class
operations:
- hasSubClassEq() and friends become O(1) instead of O(N).
- getCommonSubClass() becomes O(N) instead of O(N^2).
In the future, TableGen will infer register classes. This makes it
cheap to add them.
llvm-svn: 140898
2011-09-30 22:19:07 +00:00
Jakob Stoklund Olesen
8153f6c39f
Extract a slightly more general BitVector printer.
...
This one can also print 32-bit groups.
llvm-svn: 140897
2011-09-30 22:18:54 +00:00
Jakob Stoklund Olesen
1352be2bd3
Move getCommonSubClass() into TRI.
...
It will soon need the context.
llvm-svn: 140896
2011-09-30 22:18:51 +00:00
Jakob Stoklund Olesen
b15fad9df4
Compute lists of super-classes in CodeGenRegisterClass.
...
Use these lists instead of computing them on the fly in
RegisterInfoEmitter.
llvm-svn: 140895
2011-09-30 22:18:45 +00:00
Jim Grosbach
d76f43e18c
Correct for my over-eager delete finger.
...
llvm-svn: 140892
2011-09-30 22:02:45 +00:00
Akira Hatanaka
e67a10d54d
Add definition of MipsELFObjectWriter.
...
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140891
2011-09-30 21:55:40 +00:00
Akira Hatanaka
ee09394644
Register the MC object streamer.
...
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140887
2011-09-30 21:29:38 +00:00
Akira Hatanaka
44220ca045
Register Asm backend. Add functions to MipsAsmBackend.
...
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140886
2011-09-30 21:23:45 +00:00
Akira Hatanaka
587fe6cd52
Add MCELFObjectTargetWriter and MCAsmBackend classes.
...
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140885
2011-09-30 21:04:02 +00:00
David Greene
dc221dd649
Test More Complicated Lists
...
Test of indexing lists of lists of lists works. This also exercises
some operators.
llvm-svn: 140884
2011-09-30 20:59:52 +00:00
David Greene
0c3a2b48e7
Test VarListElementInit:: resolveListElementReference
...
Add a TableGen test to check if indexing lists of lists works.
llvm-svn: 140883
2011-09-30 20:59:51 +00:00
David Greene
74ce80f34e
Implement VarListElementInit:: resolveListElementReference
...
Implement VarListElementInit:: resolveListElementReference so that
lists of lists can be indexed.
llvm-svn: 140882
2011-09-30 20:59:49 +00:00
Benjamin Kramer
3bad73a900
Update CMake build.
...
llvm-svn: 140879
2011-09-30 20:44:33 +00:00
Akira Hatanaka
750ecec7d5
Initial implementation of MipsMCCodeEmitter.
...
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140878
2011-09-30 20:40:03 +00:00
Jim Grosbach
011dafba61
Don't modify constant in-place.
...
llvm-svn: 140875
2011-09-30 19:58:46 +00:00
Andrew Trick
2f0cbf6a99
Tracing or debug-printing a newly formed instruction should not crash.
...
llvm-svn: 140874
2011-09-30 19:50:40 +00:00
Andrew Trick
ec4b6e7fe5
whitespace
...
llvm-svn: 140873
2011-09-30 19:48:58 +00:00
Akira Hatanaka
1fef284cf9
Remove unnecessary checking of register operands.
...
llvm-svn: 140872
2011-09-30 19:18:24 +00:00
Akira Hatanaka
7ba8a8d656
Add definitions of Mips64 rotate instructions.
...
llvm-svn: 140870
2011-09-30 18:51:46 +00:00
Jim Grosbach
24ff834671
float comparison to double 'zero' constant can just be a float 'zero.'
...
InstCombine was incorrectly considering the conversion of the constant
zero to be unsafe.
We want to transform:
define float @bar(float %x) nounwind readnone optsize ssp {
%conv = fpext float %x to double
%cmp = fcmp olt double %conv, 0.000000e+00
%conv1 = zext i1 %cmp to i32
%conv2 = sitofp i32 %conv1 to float
ret float %conv2
}
Into:
define float @bar(float %x) nounwind readnone optsize ssp {
%cmp = fcmp olt float %x, 0.000000e+00 ; <---- This
%conv1 = zext i1 %cmp to i32
%conv2 = sitofp i32 %conv1 to float
ret float %conv2
}
rdar://10215914
llvm-svn: 140869
2011-09-30 18:45:50 +00:00
Bill Wendling
e8e4dbf468
Constify 'isLSDA' and move a method out-of-line.
...
llvm-svn: 140868
2011-09-30 18:42:06 +00:00
Jim Grosbach
129c52af18
Tidy up. Trailing whitespace.
...
llvm-svn: 140865
2011-09-30 18:09:53 +00:00
Jim Grosbach
4e0dbee62b
ARM Darwin default relocation model is PIC.
...
This matches clang, so default options in llc and friends are now closer to
clang's defaults.
llvm-svn: 140863
2011-09-30 17:41:35 +00:00
Akira Hatanaka
9727af7657
isCommutable should be 0 for DSUBu.
...
llvm-svn: 140862
2011-09-30 17:26:36 +00:00
Jim Grosbach
d2222c386c
ARM Fixup valus for movt/movw are for the whole value.
...
Remove an assert that was expecting only the relevant 16bit portion for
the fixup being handled. Also kill some dead code in the T2 portion.
rdar://9653509
llvm-svn: 140861
2011-09-30 17:23:05 +00:00
Akira Hatanaka
b381129095
Check values of immediate operands.
...
llvm-svn: 140860
2011-09-30 17:19:21 +00:00
Jakob Stoklund Olesen
c874e2d8fb
Fix a bug in compare_numeric().
...
Thanks to Alexandru Dura and Jonas Paulsson for finding it.
llvm-svn: 140859
2011-09-30 17:03:55 +00:00
Duncan Sands
d6c0011d92
Add forgotten tests that the cleanup flag is cleared if there
...
is a catch-all landingpad clause.
llvm-svn: 140858
2011-09-30 17:00:34 +00:00
Danil Malyshev
64b1aad4e3
MCJIT initialization TargetData
...
llvm-svn: 140856
2011-09-30 16:40:10 +00:00
Justin Holewinski
ea3f90ae40
PTX: Various stylistic and code readability changes recommended by Jim Grosbach.
...
llvm-svn: 140855
2011-09-30 14:36:36 +00:00
Justin Holewinski
957a6d5c51
PTX: Add programmable rounding mode specifier for int <-> fp conversion instrs.
...
Also take this opportunity to clean up the rounding mode pass.
llvm-svn: 140854
2011-09-30 13:46:52 +00:00
Duncan Sands
5c05579f94
Inlining often produces landingpad instructions with repeated
...
catch or repeated filter clauses. Teach instcombine a bunch
of tricks for simplifying landingpad clauses. Currently the
code only recognizes the GNU C++ and Ada personality functions,
but that doesn't stop it doing a bunch of "generic" transforms
which are hopefully fine for any real-world personality function.
If these "generic" transforms turn out not to be generic, they
can always be conditioned on the personality function. Probably
someone should add the ObjC++ personality function. I didn't as
I don't know anything about it.
llvm-svn: 140852
2011-09-30 13:12:16 +00:00
Torok Edwin
52cac090c4
some 3.0 API notes
...
llvm-svn: 140851
2011-09-30 13:07:52 +00:00
Torok Edwin
be5020eb95
Comment grammar fixes.
...
thanks to Duncan.
llvm-svn: 140850
2011-09-30 13:07:47 +00:00
Justin Holewinski
3111d11f23
PTX: Attempt to cleanup/unify the handling of FP rounding modes. This requires
...
us to manually provide Pat<> definitions for all FP instruction patterns.
llvm-svn: 140849
2011-09-30 12:54:43 +00:00
Torok Edwin
319a1415b8
Instead of crashing when MCAsmInfo is NULL, add an assert.
...
This helps with porting code from 2.9 to 3.0 as TargetSelect.h changed location,
and if you include the old one by accident you will trigger this assert.
llvm-svn: 140848
2011-09-30 12:31:57 +00:00
Akira Hatanaka
61e256aa69
Mips64 shift instructions.
...
llvm-svn: 140841
2011-09-30 03:18:46 +00:00
Akira Hatanaka
7769a77710
Mips64 arithmetic and logical instructions with one source register and
...
immediate.
llvm-svn: 140839
2011-09-30 02:08:54 +00:00
Jim Grosbach
efc761a1eb
ARM fix encoding of VMOV.f32 and VMOV.f64 immediates.
...
Encode the immediate into its 8-bit form as part of isel rather than later,
which simplifies things for mapping the encoding bits, allows the removal
of the custom disassembler decoding hook, makes the operand printer trivial,
and prepares things more cleanly for handling these in the asm parser.
rdar://10211428
llvm-svn: 140834
2011-09-30 00:50:06 +00:00
Jakob Stoklund Olesen
2c024b2d6a
Precompute a bit vector of register sub-classes.
...
llvm-svn: 140827
2011-09-30 00:10:40 +00:00
Jakob Stoklund Olesen
c0fc173da0
Order register classes topologically.
...
All register classes are given a lower ID than their sub-classes.
Cliques are ordered alphabetically.
This will be used to simplify some sub-class operations.
llvm-svn: 140826
2011-09-30 00:10:36 +00:00
Akira Hatanaka
f2619ee3ff
Fill delay slot with useful instructions. Modified from Sparc's version of delay
...
slot filler.
Patch by Reed Kotler at Mips Technologies.
llvm-svn: 140825
2011-09-29 23:52:13 +00:00
Bill Wendling
69bc3de4fc
Create a machine basic block in the constant pool and retrieve the symbol for an MBB.
...
llvm-svn: 140824
2011-09-29 23:50:42 +00:00
Bill Wendling
a1127b2fa2
Support creating a constant pool value for a machine basic block.
...
This is used when we want to take the address of a machine basic block, but it's
not associated with a BB in LLVM IR.
llvm-svn: 140823
2011-09-29 23:48:44 +00:00
Nick Lewycky
a3e7ffdae8
Fold two identical set lookups into one. No functionality change.
...
llvm-svn: 140821
2011-09-29 23:40:12 +00:00
Jakob Stoklund Olesen
19be2ab320
Switch to ArrayRef<CodeGenRegisterClass*>.
...
This makes it possible to allocate CodeGenRegisterClass instances
dynamically and reorder them.
llvm-svn: 140816
2011-09-29 22:28:37 +00:00
Dan Gohman
4ac148dcbc
When eliminating unnecessary retain+autorelease on return values,
...
handle the case where the retain is in a different basic block.
rdar://10210274.
llvm-svn: 140815
2011-09-29 22:27:34 +00:00
Dan Gohman
2053a5dd64
Don't eliminate objc_retainBlock calls on stack objects if the
...
objc_retainBlock call is potentially responsible for copying
the block to the heap to extend its lifetime. rdar://10209613.
llvm-svn: 140814
2011-09-29 22:25:23 +00:00
Jim Grosbach
3f030ff016
Tidy up. Formatting.
...
llvm-svn: 140810
2011-09-29 21:43:01 +00:00
Nick Lewycky
8574cbfd58
Fix typo.
...
llvm-svn: 140807
2011-09-29 21:07:46 +00:00
Akira Hatanaka
36036412e2
Mips64 arithmetic and logical instructions with two source registers.
...
llvm-svn: 140806
2011-09-29 20:37:56 +00:00
Eli Friedman
95031ed837
Clean up uses of switch instructions so they are not dependent on the operand ordering. Patch by Stepan Dyatkovskiy.
...
llvm-svn: 140803
2011-09-29 20:21:17 +00:00
Devang Patel
e5a8f2f9f3
Simplify.
...
llvm-svn: 140789
2011-09-29 17:06:40 +00:00
Devang Patel
eec5c5bf6e
Clarify comments.
...
llvm-svn: 140787
2011-09-29 16:52:53 +00:00
Devang Patel
1e6ee351fc
Remove unnecessary and unused data member.
...
llvm-svn: 140786
2011-09-29 16:48:44 +00:00
Devang Patel
a9e8a2504c
Cosmetic changes, as per Nick's review.
...
llvm-svn: 140785
2011-09-29 16:46:47 +00:00
Duncan Sands
cac86805bf
Place this bracket according to the LLVM style.
...
llvm-svn: 140784
2011-09-29 16:01:46 +00:00
Justin Holewinski
abcc57669d
PTX: Fix broken shared library build
...
llvm-svn: 140783
2011-09-29 14:25:48 +00:00
Jakob Stoklund Olesen
dd1904e7a6
Expand the x86 V_SET0* pseudos right after register allocation.
...
This also makes it possible to reduce the number of pseudo instructions
and get rid of the encoding information.
llvm-svn: 140776
2011-09-29 05:10:54 +00:00
NAKAMURA Takumi
15b3c9c684
Target/ARM: Unbreak! CMake! Build!
...
llvm-svn: 140774
2011-09-29 03:32:49 +00:00
Jakob Stoklund Olesen
bf64024a39
Delete NEONMoveFix, now unused.
...
llvm-svn: 140773
2011-09-29 02:56:45 +00:00
Jakob Stoklund Olesen
f7ad189033
Use ExecutionDepsFix instead of NEONMoveFix.
...
This enables NEON domain tracking across basic blocks, but should
otherwise do the same thing.
llvm-svn: 140772
2011-09-29 02:48:41 +00:00
Andrew Trick
168dfffdb8
typo + pasto
...
llvm-svn: 140769
2011-09-29 01:53:08 +00:00
Jakob Stoklund Olesen
463b05a2d0
Remove NumImplicitOps which is now unused.
...
llvm-svn: 140767
2011-09-29 01:47:36 +00:00
Andrew Trick
bc6de90a5f
LSR: rewrite inner loops only.
...
Rewriting the entire loop nest now requires -enable-lsr-nested.
See PR11035 for some performance data.
A few unit tests specifically test nested LSR, and are now under a flag.
llvm-svn: 140762
2011-09-29 01:33:38 +00:00
Andrew Trick
37470d5bde
whitespace
...
llvm-svn: 140761
2011-09-29 01:31:48 +00:00
Andrew Trick
7dc278dc52
Fix build failures better.
...
llvm-svn: 140758
2011-09-29 01:22:31 +00:00
Daniel Dunbar
9a6fa7cf3d
Fix build failure.
...
llvm-svn: 140755
2011-09-29 01:14:42 +00:00
Bill Wendling
a0d5f268a9
Move to ISelLowering.
...
llvm-svn: 140754
2011-09-29 01:13:55 +00:00
Justin Holewinski
fd47d8af8b
PTX: Add new patterns for bitconvert and any_extend
...
llvm-svn: 140753
2011-09-29 01:13:12 +00:00
Michael J. Spencer
cc5f8d4517
llvm-size: Apply Chris's code review fixes.
...
This doesn't use formated_raw_ostream because it doesn't support the
functionality needed.
llvm-svn: 140751
2011-09-29 00:59:18 +00:00
Eric Christopher
d299dccf91
Use the local we already set up.
...
llvm-svn: 140745
2011-09-29 00:50:59 +00:00
Jakob Stoklund Olesen
2318d1e0e9
Rewrite MachineInstr::addOperand() to avoid NumImplicitOps.
...
The function needs to scan the implicit operands anyway, so no
performance is won by caching the number of implicit operands added to
an instruction.
This also fixes a bug when adding operands after an implicit operand has
been added manually. The NumImplicitOps count wasn't kept up to date.
MachineInstr::addOperand() will now consistently place all explicit
operands before all the implicit operands, regardless of the order they
are added. It is possible to change an MI opcode and add additional
explicit operands. They will be inserted before any existing implicit
operands.
The only exception is inline asm instructions where operands are never
reordered. This is because of a hack that marks explicit clobber regs
on inline asm as <implicit-def> to please the fast register allocator.
This hack can go away when InstrEmitter and FastIsel can add exact
<dead> flags to physreg defs.
llvm-svn: 140744
2011-09-29 00:40:51 +00:00
Daniel Dunbar
9c248ac29e
tblgen/ClangDiagnostics: Add support for split default warning "no-werror" and
...
"show-in-system-header" bits, which I will be adding in Clang shortly.
llvm-svn: 140741
2011-09-29 00:29:04 +00:00
Jakob Stoklund Olesen
6728958279
Revert r140731, "Define classes for unary and binary FP instructions and use them to define"
...
It broke the unit tests. Please reapply with tests fixed.
llvm-svn: 140735
2011-09-28 23:59:28 +00:00
Evan Cheng
8156376aa9
Tighten a ARM dag combine condition to avoid an identity transformation, which
...
ends up introducing a cycle in the DAG.
rdar://10196296
llvm-svn: 140733
2011-09-28 23:16:31 +00:00
Akira Hatanaka
5a1b4a80c3
Define classes for unary and binary FP instructions and use them to define
...
multiclasses.
llvm-svn: 140731
2011-09-28 21:58:01 +00:00
Bill Wendling
899da52d60
Have the SjLjEHPrepare pass do some more heavy lifting.
...
Upon further review, most of the EH code should remain written at the IR
level. The part which breaks SSA form is the dispatch table, so that part will
be moved to the back-end.
llvm-svn: 140730
2011-09-28 21:56:53 +00:00
Michael J. Spencer
7f168777e5
Fix cast.
...
llvm-svn: 140726
2011-09-28 21:24:44 +00:00
Eli Friedman
2fb357a5b0
PR11033: Make sure we don't generate PCMPGTQ and PCMPEQQ if the target CPU does not support them.
...
llvm-svn: 140723
2011-09-28 21:00:25 +00:00
Michael J. Spencer
c4ad46605e
Add llvm-size.
...
llvm-svn: 140722
2011-09-28 20:57:46 +00:00
Michael J. Spencer
800619f2bb
Object: Add isSection{Data,BSS}.
...
llvm-svn: 140721
2011-09-28 20:57:30 +00:00
Eli Friedman
c7a710f61e
NULL cannot be portably used as the last argument to a function with __attribute((sentinel)), even though it usually works. Use (void*)0 instead. PR11002.
...
llvm-svn: 140720
2011-09-28 20:41:50 +00:00
Bill Wendling
315b9573c6
Perform the lowering only if there are invokes.
...
llvm-svn: 140719
2011-09-28 20:29:45 +00:00
Bill Wendling
dfe5acd34e
Ahem...actually *add* the ARMSjLjLowering pass to the pass manager.
...
llvm-svn: 140718
2011-09-28 20:29:28 +00:00
Eric Christopher
508503b473
Add a note on removing LLVMC.
...
llvm-svn: 140715
2011-09-28 19:47:28 +00:00
Devang Patel
3714065a94
Introduce llvm-cov.
...
Add llvm-cov skeleton. It has initial support to read coverage info generated by GCOVProfiling.cpp.
Today, you can do
prompt> clang a.c -ftest-coverage -fprofile-arcs -o a
prompt> ./a
prompt> llvm-cov -gcno a.gcno -gcda a.gcda
a.c
: #include "a.h"
:
: int main() {
: int i = 0;
: if (i) {
1: int j = 0;
1: j = 1;
1: } else {
: int k = 1;
: k = 2;
: }
1: return 0;
: }
:
:
llvm-svn: 140712
2011-09-28 18:50:00 +00:00
Justin Holewinski
933d51682f
PTX: Fix alignment logic
...
llvm-svn: 140709
2011-09-28 18:24:58 +00:00
Akira Hatanaka
6f37b4a5a5
Rename predicate In32BitMode to NotFP64bit and add definition of IsFP64bit.
...
llvm-svn: 140705
2011-09-28 18:11:19 +00:00
Akira Hatanaka
edc172d4cc
Remove definitions of branch-on-FP-likely instructions. They are deprecated.
...
llvm-svn: 140704
2011-09-28 17:56:55 +00:00
Akira Hatanaka
c117967b19
Mips64 predicate definitions. Patch by Liu.
...
llvm-svn: 140703
2011-09-28 17:50:27 +00:00
Andrew Trick
ef8e4efff8
indvars: generalize SCEV getPreStartForSignExtend.
...
Handle general Add expressions to avoid leaving around redundant
32-bit IVs.
llvm-svn: 140701
2011-09-28 17:02:54 +00:00
Justin Holewinski
f3d1d4eb4b
PTX: MC-ize the PTX backend (patch 2 of N)
...
Get rid of some of the no-longer-needed parts of PTXAsmPrinter.
llvm-svn: 140698
2011-09-28 14:32:06 +00:00
Justin Holewinski
5e18b14ee2
PTX: MC-ize the PTX back-end (patch 1 of N)
...
Lay some groundwork for converting to MC-based asm printer. This is the first
of probably many patches to bring the back-end back up-to-date with all of the
recent MC changes.
llvm-svn: 140697
2011-09-28 14:32:04 +00:00
James Molloy
21efa7d6e1
Check in a patch that has already been code reviewed by Owen that I'd forgotten to commit.
...
Build on previous patches to successfully distinguish between an M-series and A/R-series MSR and MRS instruction. These take different mask names and have a *slightly* different opcode format.
Add decoder and disassembler tests.
Improvement on the previous patch - successfully distinguish between valid v6m and v7m masks (one is a subset of the other). The patch had to be edited slightly to apply to ToT.
llvm-svn: 140696
2011-09-28 14:21:38 +00:00
Garrison Venn
56c58ce3d6
Changed comments on foreign C++ exceptions (generated with type info 7),
...
handling with references to
http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22).
llvm-svn: 140695
2011-09-28 10:53:56 +00:00
Duncan Sands
2e67937f76
A typeid of zero means a cleanup, not a catch. This case occurs
...
when there is both a catch and a cleanup. Correct the comment.
llvm-svn: 140686
2011-09-28 09:13:02 +00:00
Benjamin Kramer
8747e3e7ea
PTX: Simplify code. No functionality change.
...
llvm-svn: 140680
2011-09-28 04:32:36 +00:00
Benjamin Kramer
5d7a73fa8c
PTX: Pass param name strings per const reference.
...
The copies caused use-after-free bugs on std::string implementations without COW (i.e. anything but libstdc++)
llvm-svn: 140679
2011-09-28 04:08:02 +00:00
Bill Wendling
baf3941fde
Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.
...
llvm-svn: 140678
2011-09-28 03:52:41 +00:00
Bill Wendling
225e8481b0
Bitcast the alloca to an i8* to match the intrinsic's signature.
...
llvm-svn: 140677
2011-09-28 03:47:11 +00:00
Bill Wendling
66b110f571
Create and use an llvm.eh.sjlj.functioncontext intrinsic.
...
This intrinsic is used to pass the index of the function context to the back-end
for further processing. The back-end is in charge of filling in the rest of the
entries.
llvm-svn: 140676
2011-09-28 03:36:43 +00:00
Bill Wendling
2e76ca9d9a
In the new EH model, setup the function context and the call site info.
...
The DWARF exception pass uses the call site information, which is set up here. A
pre-RA pass is too late for it to use this information. So create and setup the
function context here, and then insert the call site values here (and map the
call sites for the DWARF EH pass). This is simpler than the original pass, and
doesn't make the CFG lose its SSA-ness.
It's a win-win-win-win-lose-win-win situation.
llvm-svn: 140675
2011-09-28 03:14:05 +00:00
Bill Wendling
e6138e3ad1
Don't conditionalize execution of the SjLj EH prepare pass.
...
We may need an SjLj EH preparation pass for some call site information, at least
in the short term.
llvm-svn: 140674
2011-09-28 03:07:34 +00:00
Andrew Trick
8c219ecd1a
Test case for r140670: indvars should hoist sext.
...
llvm-svn: 140671
2011-09-28 02:13:32 +00:00
Andrew Trick
e0e30532a5
indvars should hoist [sz]ext because licm is not rerun.
...
llvm-svn: 140670
2011-09-28 01:35:36 +00:00
Eli Friedman
5f476dc3ef
PR10628: Fix getModRefInfo so it queries the underlying alias() implementation correctly while checking nocapture calls.
...
llvm-svn: 140666
2011-09-28 00:34:27 +00:00
Jakob Stoklund Olesen
bd5109f14d
Rename class and clean up source.
...
No functional change intended.
llvm-svn: 140664
2011-09-28 00:01:56 +00:00
Jakob Stoklund Olesen
934b7d7645
Rename SSEDomainFix -> lib/CodeGen/ExecutionDepsFix.
...
I'll clean up the source in the next commit.
llvm-svn: 140663
2011-09-28 00:01:54 +00:00
Akira Hatanaka
ae40dc735d
Remove MipsFPRound. Mips1 is no longer supported.
...
llvm-svn: 140661
2011-09-27 23:55:37 +00:00
Jakob Stoklund Olesen
30c811246f
Remove X86-dependent stuff from SSEDomainFix.
...
This also enables domain swizzling for AVX code which required a few
trivial test changes.
The pass will be moved to lib/CodeGen shortly.
llvm-svn: 140659
2011-09-27 23:50:46 +00:00
Ted Kremenek
e3e36f80f5
Unbreak CMake build.
...
llvm-svn: 140655
2011-09-27 23:29:59 +00:00
Jakob Stoklund Olesen
f9b71a2e01
Implement TII::get/setExecutionDomain() for ARM.
...
llvm-svn: 140653
2011-09-27 22:57:21 +00:00
Jakob Stoklund Olesen
b48c994cc0
Promote the X86 Get/SetSSEDomain functions to TargetInstrInfo.
...
I am going to unify the SSEDomainFix and NEONMoveFix passes into a
single target independent pass. They are essentially doing the same
thing.
llvm-svn: 140652
2011-09-27 22:57:18 +00:00
Jim Grosbach
c63af1b7b6
ARM Thumb2 asm parsing [SU]XT[BH] without rotate but with .w.
...
Add inst alias to handle these assembly forms. Add tests, too.
rdar://10178799
llvm-svn: 140647
2011-09-27 22:18:54 +00:00
Bill Wendling
354ff9e348
This is the start of the new SjLj EH preparation pass, which will replace the
...
current IR-level pass.
The old SjLj EH pass has some problems, especially with the new EH model. Most
significantly, it violates some of the new restrictions the new model has. For
instance, the 'dispatch' table wants to jump to the landing pad, but we cannot
allow that because only an invoke's unwind edge can jump to a landing pad. This
requires us to mangle the code something awful. In addition, we need to keep the
now dead landingpad instructions around instead of CSE'ing them because the
DWARF emitter uses that information (they are dead because no control flow edge
will execute them - the control flow edge from an invoke's unwind is superceded
by the edge coming from the dispatch).
Basically, this pass belongs not at the IR level where SSA is king, but at the
code-gen level, where we have more flexibility.
llvm-svn: 140646
2011-09-27 22:14:12 +00:00
Akira Hatanaka
a5d18f2d7e
Embed patterns in definitions of MFC1 and MTC1 instead of defining them outside
...
of the instruction definitions using Pat<>.
llvm-svn: 140644
2011-09-27 22:01:01 +00:00
Cameron Zwarich
7a6e8f2c5d
Remove an invalid assert that is really just asserting when the scheduler emits
...
a suboptimal schedule.
llvm-svn: 140643
2011-09-27 21:59:16 +00:00
NAKAMURA Takumi
6a2eb5c1c8
test/CMakeLists.txt: Depend on llvm-objdump. "make check" is expected to resolve test-dependent targets on CMake build.
...
llvm-svn: 140641
2011-09-27 21:54:50 +00:00
Jim Grosbach
af136f71ec
Rename AddSelectionDAGCSEId() to addSelectionDAGCSEId().
...
Naming conventions consistency. No functional change.
llvm-svn: 140636
2011-09-27 20:59:33 +00:00
Benjamin Kramer
547b6c5ecd
Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit.
...
If someone prefers %tmp42 to %42, run instnamer.
llvm-svn: 140634
2011-09-27 20:39:19 +00:00
Bill Wendling
b762df5840
Remove incorrect passage.
...
llvm-svn: 140631
2011-09-27 20:16:57 +00:00
Chad Rosier
bf415251df
These symbols appear to be visible by SearchForAddressOfSymbol and no longer
...
require special case handling.
rdar://10117377
llvm-svn: 140629
2011-09-27 20:01:41 +00:00
Michael J. Spencer
2bc774ac1a
Add binary archive support to llvm-nm.
...
llvm-svn: 140627
2011-09-27 19:37:18 +00:00
Michael J. Spencer
d3b7b12618
Object: Add archive support.
...
llvm-svn: 140626
2011-09-27 19:36:55 +00:00
Duncan Sands
68ba81346e
Check that catch clauses have pointer type.
...
llvm-svn: 140625
2011-09-27 19:34:22 +00:00
Justin Holewinski
4f7054e56e
PTX: Fix case where printed alignment could be 0
...
llvm-svn: 140624
2011-09-27 19:25:49 +00:00
Michael J. Spencer
554a012eb5
Unbreak tests.
...
llvm-svn: 140622
2011-09-27 19:06:37 +00:00
Bill Wendling
d9f23c4f6b
Add FCA to the lexicon.
...
llvm-svn: 140619
2011-09-27 18:44:01 +00:00
Justin Holewinski
e074593498
PTX: Use external symbols to keep track of params and locals. This also fixes
...
a couple of outstanding issues with frame objects occuring as instruction
operands.
llvm-svn: 140616
2011-09-27 18:12:55 +00:00
Jakob Stoklund Olesen
1c7597693c
Use existing function.
...
llvm-svn: 140615
2011-09-27 17:55:08 +00:00
Akira Hatanaka
e41b1d59f0
Fix function MipsRegisterInfo::getRegisterNumbering.
...
Return numbers of 64-bit registers.
llvm-svn: 140609
2011-09-27 17:15:27 +00:00
Akira Hatanaka
ff5d0965b0
Do not add the pass that restores $gp if target is Mips64.
...
llvm-svn: 140607
2011-09-27 16:58:43 +00:00
Duncan Sands
86de1a666d
Have the verifier check that all landingpad operands are constants.
...
llvm-svn: 140606
2011-09-27 16:43:19 +00:00
Nadav Rotem
38b3b83362
Cleanup PromoteIntOp_EXTRACT_VECTOR_ELT and PromoteIntRes_SETCC.
...
Add a new method: getAnyExtOrTrunc and use it to replace the manual check.
llvm-svn: 140603
2011-09-27 11:16:47 +00:00
Nadav Rotem
1b857d2762
Revert r140463; The patch assumes that <4 x i1> is saved to memory as 4 x i8,
...
while the decision is to bit-pack small values.
llvm-svn: 140601
2011-09-27 10:48:29 +00:00
Bill Wendling
614c8e5146
Remove some not-really-correct wording.
...
llvm-svn: 140600
2011-09-27 10:37:28 +00:00
Akira Hatanaka
bb050745e7
Mark MipsPseudo isPseudo.
...
llvm-svn: 140598
2011-09-27 04:57:54 +00:00
Justin Holewinski
9f01f89386
PTX: Add support for sitofp in backend
...
llvm-svn: 140593
2011-09-27 01:04:47 +00:00
Bill Wendling
90f90da156
Split the landing pad basic block with the correct function. Also merge the
...
split landingpad instructions into a PHI node.
PR11016
llvm-svn: 140592
2011-09-27 00:59:31 +00:00
Andrew Trick
581243919d
Disable LSR retry by default.
...
Disabling aggressive LSR saves compilation time, and with the new
indvars behavior usually improves performance.
llvm-svn: 140590
2011-09-27 00:44:14 +00:00
Eli Friedman
f6fbfd3f83
Last batch of test conversions to new atomic instructions.
...
llvm-svn: 140585
2011-09-27 00:17:29 +00:00
Andrew Trick
8868faec63
LSR, one of the new Cost::isLoser() checks did not get merged in the previous checkin.
...
llvm-svn: 140583
2011-09-26 23:35:25 +00:00
Eli Friedman
a486cb972f
Convert a bunch more tests over to the new atomic instructions.
...
llvm-svn: 140582
2011-09-26 23:15:09 +00:00
Owen Anderson
b1a9f65487
Remove extraneous commit garbage.
...
llvm-svn: 140581
2011-09-26 23:14:02 +00:00
Andrew Trick
784729d408
LSR cost metric minor fix and verification.
...
The minor bug heuristic was noticed by inspection. I added the
isLoser/isValid helpers because they will become more
important with subsequent checkins.
llvm-svn: 140580
2011-09-26 23:11:04 +00:00
Owen Anderson
287d6ef088
Fix an incorrect decoder test.
...
llvm-svn: 140579
2011-09-26 23:08:34 +00:00
Bob Wilson
02bb7573fb
Remove old hack for compiling with gcc-4.0.
...
llvm-svn: 140573
2011-09-26 22:30:57 +00:00
Owen Anderson
d20cd25c69
Remove incorrect testcases.
...
llvm-svn: 140572
2011-09-26 22:13:55 +00:00
Akira Hatanaka
a6a9c20c23
Set register class of a register according to value of HasMips64.
...
llvm-svn: 140570
2011-09-26 21:55:17 +00:00
Akira Hatanaka
7b502920ef
Define variable HasMips64 in MipsTargetLowering.
...
llvm-svn: 140569
2011-09-26 21:47:02 +00:00
Akira Hatanaka
e5ce709022
In single float mode, double precision FP arguments are passed in integer
...
registers, so there is no need to check here.
llvm-svn: 140568
2011-09-26 21:37:50 +00:00
Eli Friedman
ab7b99ab9c
Convert more tests to new atomic instructions.
...
llvm-svn: 140567
2011-09-26 21:36:10 +00:00
Eli Friedman
6fb0c1e474
Convert more tests over to the new atomic instructions.
...
I did not convert Atomics-32.ll and Atomics-64.ll by hand; the diff is autoupgrade output.
The wmb test is gone because there isn't any way to express wmb with the new atomic instructions; if someone really needs a non-asm way to write a wmb on Alpha, a platform-specific intrisic could be added.
llvm-svn: 140566
2011-09-26 21:30:17 +00:00
Bill Wendling
878a67397d
Fix grammar.
...
llvm-svn: 140564
2011-09-26 21:10:31 +00:00
Bill Wendling
dec0ee3237
Remove dead table entry.
...
llvm-svn: 140563
2011-09-26 21:08:28 +00:00
Bill Wendling
58c80f886c
Some minor (and more involved) cleanups. No real context changes.
...
llvm-svn: 140561
2011-09-26 21:06:33 +00:00
Owen Anderson
f01e2de5e6
ASR #32 is not allowed on Thumb2 USAT and SSAT instructions.
...
llvm-svn: 140560
2011-09-26 21:06:22 +00:00
Eli Friedman
c064f2c33e
Convert more tests over to the new atomic instructions.
...
llvm-svn: 140559
2011-09-26 20:27:49 +00:00
Eli Friedman
bda9e7af58
Upgrade a couple more tests to the new atomic instructions.
...
llvm-svn: 140558
2011-09-26 20:15:56 +00:00
Eli Friedman
5c91891cf3
Enhance alias analysis for atomic instructions a bit. Upgrade a couple alias-analysis tests to the new atomic instructions.
...
llvm-svn: 140557
2011-09-26 20:15:28 +00:00
Justin Holewinski
da2919dbd8
PTX: Fix memcpy intrinsic to handle 64-bit pointers
...
llvm-svn: 140556
2011-09-26 19:19:48 +00:00
Eli Friedman
67d33b3bf2
Fix this test so it doesn't fail on Mac.
...
llvm-svn: 140553
2011-09-26 19:13:47 +00:00
Justin Holewinski
b40da7f956
PTX: Implement PTXSelectionDAGInfo
...
llvm-svn: 140549
2011-09-26 18:57:27 +00:00
Justin Holewinski
c3edaddfea
PTX: Implement ISD::ANY_EXTEND
...
llvm-svn: 140548
2011-09-26 18:57:24 +00:00
Justin Holewinski
1395cf8423
PTX: Fix detection of stack load/store vs. global load/store, as well as fix the
...
printing of local offsets
llvm-svn: 140547
2011-09-26 18:57:22 +00:00
James Molloy
0ceb8cadd2
Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.
...
llvm-svn: 140539
2011-09-26 17:40:42 +00:00
Justin Holewinski
55f340eb62
PTX: Add .align tests to stack object test file
...
llvm-svn: 140537
2011-09-26 16:20:38 +00:00
Justin Holewinski
f8dd701bf9
PTX: SM > 2.0 implies +double
...
llvm-svn: 140536
2011-09-26 16:20:36 +00:00
Justin Holewinski
14defde057
PTX: Fix some lingering issues with stack allocation
...
llvm-svn: 140535
2011-09-26 16:20:34 +00:00
Justin Holewinski
37fd87675f
PTX: Split up the TableGen instruction definitions into logical units
...
llvm-svn: 140534
2011-09-26 16:20:31 +00:00
Justin Holewinski
d40f5ababf
PTX: Unify handling of loads/stores
...
llvm-svn: 140533
2011-09-26 16:20:28 +00:00
Justin Holewinski
8c80019352
PTX: Handle FrameIndex nodes
...
llvm-svn: 140532
2011-09-26 16:20:25 +00:00
David Meyer
1748b37acd
Only run tests in test/CodeGen/CBackend/X86 when both X86 and CBackend are supported
...
llvm-svn: 140517
2011-09-26 06:44:27 +00:00
David Meyer
b1fbf9ff26
PR11004: Inline memcpy to avoid generating nested call sequence. Un-XFAIL 2011-06-09-TailCallByVal and 2010-11-04-BigByval
...
llvm-svn: 140516
2011-09-26 06:13:20 +00:00
Craig Topper
45faba98b4
Fix VEX decoding in i386 mode. Fixes PR11008.
...
llvm-svn: 140515
2011-09-26 05:12:43 +00:00
Jakob Stoklund Olesen
df977fedb6
Add target hook for pseudo instruction expansion.
...
Many targets use pseudo instructions to help register allocation. Like
the COPY instruction, these pseudos can be expanded after register
allocation. The early expansion can make life easier for PEI and the
post-ra scheduler.
This patch adds a hook that is called for all remaining pseudo
instructions from the ExpandPostRAPseudos pass.
llvm-svn: 140472
2011-09-25 19:21:35 +00:00
Nadav Rotem
2279949129
[vector-select] Address one of the issues in pr10902. EXTRACT_VECTOR_ELEMENT
...
SDNodes may return values which are wider than the incoming element types. In
this patch we fix the integer promotion of these nodes.
Fixes spill-q.ll when running -promote-elements.
llvm-svn: 140471
2011-09-25 18:59:42 +00:00
Jakob Stoklund Olesen
fd719d184e
Clean up code after renaming LowerSubregs -> ExpandPostRAPseudos.
...
No functional change intended.
llvm-svn: 140470
2011-09-25 16:46:08 +00:00
Jakob Stoklund Olesen
f152df1e6b
Rename LowerSubregs to ExpandPostRAPseudos.
...
I'll fix the file contents in the next commit.
This pass is currently expanding the COPY and SUBREG_TO_REG pseudos. I
am going to add a hook so targets can expand more pseudo-instructions
after register allocation.
Many targets have pseudo-instructions that assist the register
allocator. They can be expanded after register allocation, before PEI
and PostRA scheduling.
llvm-svn: 140469
2011-09-25 16:46:00 +00:00
Benjamin Kramer
f550fa9173
Sort CMakeLists.txt.
...
llvm-svn: 140465
2011-09-24 22:06:35 +00:00
Nadav Rotem
c2deabd202
Implement Duncan's suggestion to use the result of getSetCCResultType if it is legal
...
(this is always the case for scalars), otherwise use the promoted result type.
Fix test/CodeGen/X86/vsplit-and.ll when promote-elements is enabled.
llvm-svn: 140464
2011-09-24 19:48:19 +00:00
Nadav Rotem
77426a754b
[Vector-Select] Address one of the problems in 10902.
...
When generating the trunc-store of i1's, we need to use the vector type and not
the scalar type.
This patch fixes the assertion in CodeGen/Generic/bool-vector.ll when
running with -promote-elements.
llvm-svn: 140463
2011-09-24 18:32:19 +00:00
Akira Hatanaka
7d7ee0c3ac
Add .td file.
...
llvm-svn: 140446
2011-09-24 01:40:18 +00:00
Akira Hatanaka
e8b2a297c1
Revert change made in .gitignore.
...
llvm-svn: 140445
2011-09-24 01:37:58 +00:00
Akira Hatanaka
e96273e75d
Preparation for adding simple Mips64 instructions.
...
llvm-svn: 140443
2011-09-24 01:34:44 +00:00
Jakob Stoklund Olesen
55cf2ed148
Only run MF.verify() with EXPENSIVE_CHECKS=1.
...
llvm-svn: 140441
2011-09-24 01:11:19 +00:00
Daniel Dunbar
9b92e2be30
sys::Process: Add a SetWorkingDirectory method.
...
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
Andrew Trick
8b2fe2f744
LSR minor bug fix in RateRegister.
...
No test case. Noticed by inspection and I doubt it ever affects the
outcome of the overall heuristic, let alone final codegen.
llvm-svn: 140431
2011-09-23 23:05:19 +00:00
Chris Lattner
ad4ab93e48
Duncan owns dragonegg too, it's all his fault :)
...
llvm-svn: 140430
2011-09-23 22:46:43 +00:00
Jakob Stoklund Olesen
3bb99bc957
Verify that terminators follow non-terminators.
...
This exposes a -segmented-stacks bug.
llvm-svn: 140429
2011-09-23 22:45:39 +00:00
Eli Friedman
8a15a5aa93
PR10998: It is not legal to sink an instruction past the terminator of a block; make sure we don't do that.
...
llvm-svn: 140428
2011-09-23 22:41:57 +00:00
Owen Anderson
4916840eb8
Teach the Thumb2 AsmParser to accept pre-indexed loads/stores with an offset of #-0.
...
llvm-svn: 140426
2011-09-23 22:25:02 +00:00
Jakob Stoklund Olesen
2056d15bd9
Also match negative offsets for addrmode3 and addrmode5.
...
Math is hard, and isScaledConstantInRange() always returned false for
negative constants. It was doing unsigned division of negative numbers
before casting back to signed.
llvm-svn: 140425
2011-09-23 22:10:33 +00:00
Owen Anderson
b75772201f
Fix incorrect disassembly test.
...
llvm-svn: 140423
2011-09-23 22:05:54 +00:00
Owen Anderson
b0b865d658
Add more fixed bits to USAT16 encoding to filter out incorrect decodings.
...
llvm-svn: 140422
2011-09-23 21:57:50 +00:00
Owen Anderson
737beaf86d
Post-index loads/stores in still need to print the post-indexed immediate, even if it's zero, to distinguish them from non-post-indexed instructions.
...
llvm-svn: 140420
2011-09-23 21:26:40 +00:00
Owen Anderson
987a878946
Reapply r140412 (Thumb2 reg-reg loads cannot target SP or PC), with invalid testcases updated.
...
llvm-svn: 140415
2011-09-23 21:07:25 +00:00
Owen Anderson
ffa8428acf
Revert r140412. This affects more instructions than intended.
...
llvm-svn: 140413
2011-09-23 21:02:01 +00:00
Owen Anderson
7591d0c363
Thumb2 register-shifted-register loads cannot target the PC or the SP.
...
llvm-svn: 140412
2011-09-23 21:00:32 +00:00
Anna Zaks
632bf5f084
Add getTreeFactory() to ImmutableSet to allow construction of ImmutableSetRef from an ImmutableSet object.
...
llvm-svn: 140402
2011-09-23 19:10:26 +00:00
Akira Hatanaka
d6af2c62b4
Implement N32/64 calling convention. Patch by Liu.
...
llvm-svn: 140401
2011-09-23 19:08:15 +00:00
Akira Hatanaka
ceb55e72de
Make FGR64RegisterClass available if target is Mips64.
...
llvm-svn: 140397
2011-09-23 18:28:39 +00:00
Akira Hatanaka
77709a6793
Add definitions of 64-bit register files. Add code for returning Mips64's sets of
...
callee-saved registers and reserved registers.
llvm-svn: 140395
2011-09-23 18:11:56 +00:00
Justin Holewinski
71d32c980d
PTX: Fix parameter order bug
...
llvm-svn: 140394
2011-09-23 17:59:11 +00:00
Wesley Peck
24e45cabbc
Fix a couple of 80 column violations.
...
patch contributed by Jia Liu!
llvm-svn: 140391
2011-09-23 17:24:41 +00:00
Justin Holewinski
6e84a68023
PTX: Cleanup unused code in PTXMachineFunctionInfo
...
llvm-svn: 140390
2011-09-23 17:15:53 +00:00
Justin Holewinski
0f1af22183
PTX: Fix another 80-column violation
...
llvm-svn: 140387
2011-09-23 16:50:35 +00:00
Justin Holewinski
37f35f0083
PTX: Handle function call return values
...
llvm-svn: 140386
2011-09-23 16:48:41 +00:00
Richard Osborne
ae191ef63b
Fix 80 column violations.
...
Original patch by Liu.
llvm-svn: 140385
2011-09-23 16:28:10 +00:00
Duncan Sands
a54fd541c2
Implement Chris's suggestion of legalizing the various SSE and AVX
...
hadd/hsub intrinsics into the new fhadd/fhsub X86 node.
llvm-svn: 140383
2011-09-23 16:10:22 +00:00
Garrison Venn
0a2eb8d35d
Modified demo to use 3.0 resume instruction vs calling _Unwine_Resume.
...
Also conducted some reformatting. As the LLVM coding standard doc does not
seem to touch on how to align function arguments, and format code longer than
80 cols in general, the confusion persists. There is the golden rule, but as
this code has gone through several styles to deal with this, the golden rule
seems to be ignored. The latest reformatting effort tries to match the other
source files as much as possible.
Tested on OS X 10.7.1 with, and without the OLD_EXC_SYSTEM defined. Have NOT
tested on LINUX.
llvm-svn: 140379
2011-09-23 14:45:10 +00:00
Justin Holewinski
6c23d2ee55
PTX: Start fixing function calls
...
llvm-svn: 140378
2011-09-23 14:31:12 +00:00
Justin Holewinski
edc6bf474d
PTX: Remove PTX calling convention files
...
llvm-svn: 140377
2011-09-23 14:18:27 +00:00
Justin Holewinski
f2b540e815
[PATCH 2/2] PTXInstrInfo.td PTXIntrinsicInstrInfo.td 80 columns
...
From 5936c03172e251f12a0332d1033de5718e6e2091 Mon Sep 17 00:00:00 2001
---
lib/Target/PTX/PTXInstrInfo.td | 165 ++++++++++++++++++++----------
lib/Target/PTX/PTXIntrinsicInstrInfo.td | 88 +++++++++++------
2 files changed, 167 insertions(+), 86 deletions(-)
llvm-svn: 140376
2011-09-23 14:18:24 +00:00
Justin Holewinski
b823e41bf4
PTX: Generalize handling of .param types
...
llvm-svn: 140375
2011-09-23 14:18:22 +00:00
Justin Holewinski
2f82cc61af
PTX: Cleanup unused code in the PTXMFInfoExtract pass
...
llvm-svn: 140374
2011-09-23 14:18:19 +00:00
Duncan Sands
b461176cfb
Tweak the handling of MERGE_VALUES nodes: remove the need for
...
DecomposeMERGE_VALUES to "know" that results are legalized in
a particular order, by passing it the number of the result
being legalized (the type legalization core provides this, it
just needs to be passed on).
llvm-svn: 140373
2011-09-23 13:59:22 +00:00
Nadav Rotem
57e30726ad
Vector-Select: Address one of the problems in pr10902. Add handling for the
...
integer-promotion of CONCAT_VECTORS.
Test: test/CodeGen/X86/widen_shuffle-1.ll
This patch fixes the above tests (when running in with -promote-elements).
llvm-svn: 140372
2011-09-23 09:33:24 +00:00
Craig Topper
526adabe87
Don't allow 32-bit only instructions to be disassembled in 64-bit mode. Fixes part of PR10700.
...
llvm-svn: 140370
2011-09-23 06:57:25 +00:00
Akira Hatanaka
42fe6bd5f2
Add definitions of 64-bit int registers.
...
llvm-svn: 140366
2011-09-23 02:33:15 +00:00
Akira Hatanaka
61bbcce84a
Do not rely on the enum values of argument registers A0-A3 being consecutive.
...
Define function getNextIntArgReg, which takes a register as a parameter and
returns the next O32 argument integer register. Use this function when double
precision floating point arguments are passed in two integer registers.
llvm-svn: 140363
2011-09-23 00:58:33 +00:00
Eric Christopher
b9a11322b1
We're no longer going to bother supporting platforms that don't
...
support C89.
We probably didn't support them anyways.
llvm-svn: 140361
2011-09-23 00:53:10 +00:00
Eli Friedman
64a4bf1788
PR10989: Don't print .hidden on Windows.
...
llvm-svn: 140356
2011-09-23 00:13:02 +00:00
Eli Friedman
87c844cdf8
PR10991: make fast-isel correctly check whether accessing a global through an alias involves thread-local storage. (I'm not entirely sure how this is supposed to work, but this patch makes fast-isel consistent with the normal isel path.)
...
llvm-svn: 140355
2011-09-22 23:41:28 +00:00
Akira Hatanaka
f25c37e384
Make changes in instruction and pattern definitions so that tablegen does not
...
complain it cannot infer types in patterns. Fix a mistake in definition of
SDT_MipsExtractElementF64.
llvm-svn: 140354
2011-09-22 23:31:54 +00:00
Owen Anderson
adea3f0c01
Add new files to CMake.
...
llvm-svn: 140352
2011-09-22 23:20:48 +00:00
Dan Gohman
e83e1b2d2c
Fix SimplifySelectCC to add newly created nodes to the DAGCombiner
...
worklist, as it may be possible to perform further optimization on them.
llvm-svn: 140349
2011-09-22 23:01:29 +00:00
Jakob Stoklund Olesen
f05864ad7d
Add support for GR32 <-> FR32 cross class copies.
...
We already support GR64 <-> VR128 copies. All of these copies break
partial register dependencies by zeroing the high part of the target
register.
llvm-svn: 140348
2011-09-22 22:45:24 +00:00
Benjamin Kramer
fbf0fba9f4
Update CMake build.
...
llvm-svn: 140347
2011-09-22 22:38:34 +00:00
Owen Anderson
6cca67fc4a
Start stubbing out MCModule and MCAtom, which provide an API for accessing the rich disassembly of a complete object or executable.
...
These are very much a work in progress, and not really useful yet.
llvm-svn: 140345
2011-09-22 22:32:22 +00:00
Jakob Stoklund Olesen
e92e5ee81f
Constrain register classes instead of emitting copies.
...
Sometimes register class constraints are trivial, like GR32->GR32_NOSP,
or GPR->rGPR. Teach InstrEmitter to simply constrain the virtual
register instead of emitting a copy in these cases.
Normally, these copies are handled by the coalescer. This saves some
coalescer work.
llvm-svn: 140340
2011-09-22 21:39:34 +00:00
Jakob Stoklund Olesen
0f36544c08
Add a MinNumRegs argument to MRI::constrainRegClass().
...
The function will refuse to use a register class with fewer registers
than MinNumRegs. This can be used by clients to avoid accidentally
increase register pressure too much.
The default value of MinNumRegs=0 doesn't affect how constrainRegClass()
works.
llvm-svn: 140339
2011-09-22 21:39:31 +00:00
Duncan Sands
0e4fcb8e3b
Synthesize SSE3/AVX 128 bit horizontal add/sub instructions from
...
floating point add/sub of appropriate shuffle vectors. Does not
synthesize the 256 bit AVX versions because they work differently.
llvm-svn: 140332
2011-09-22 20:15:48 +00:00
Eli Friedman
f9b785f185
PR10987: add a missed safety check to isSafePHIToSpeculate in scalarrepl.
...
llvm-svn: 140327
2011-09-22 18:56:30 +00:00
Chris Lattner
e643b854a5
Resynch intro to section with copyright section.
...
llvm-svn: 140326
2011-09-22 18:54:31 +00:00
Akira Hatanaka
56acf840f1
Print parentheses in next line.
...
llvm-svn: 140325
2011-09-22 18:29:29 +00:00
Akira Hatanaka
c021a4b8b4
Change subreg index of AFPR64 from sub_fpeven to sub_32 per Jakob's comment.
...
llvm-svn: 140324
2011-09-22 18:24:21 +00:00
Akira Hatanaka
79a45a839c
Define a new sub-register index sub_32 for accessing the 32-bit sub-register of
...
a 64-bit integer register. Move the subreg index definitions to the beginning
of the file.
llvm-svn: 140319
2011-09-22 17:57:32 +00:00
Bill Wendling
a58fde665a
Use the C personality function instead of the C++ personality function.
...
llvm-svn: 140318
2011-09-22 17:56:40 +00:00
Akira Hatanaka
35b7fe8c25
Print three closing parentheses when Kind is either VK_Mips_GPOFF_HI or
...
VK_Mips_GPOFF_LO.
llvm-svn: 140316
2011-09-22 17:44:37 +00:00
Akira Hatanaka
da33066424
Add F31 to the set of callee-saved registers.
...
llvm-svn: 140315
2011-09-22 17:35:03 +00:00
Galina Kistanova
285540eaad
Fix for warnings: ignoring return value of ‘write’, declared with attribute warn_unused_result.
...
llvm-svn: 140314
2011-09-22 17:33:24 +00:00
Akira Hatanaka
cf9c4f80ba
Fix typo.
...
llvm-svn: 140313
2011-09-22 17:26:58 +00:00
Justin Holewinski
5862332f59
PTX: fixup test cases for register changes
...
llvm-svn: 140311
2011-09-22 16:45:51 +00:00
Justin Holewinski
efc211d977
PTX: Remove physical register defs
...
llvm-svn: 140310
2011-09-22 16:45:48 +00:00
Justin Holewinski
43787cd447
PTX: Use .param space for device function return values on SM 2.0+, and attempt
...
to fix up parameter passing on SM < 2.0
llvm-svn: 140309
2011-09-22 16:45:46 +00:00
Justin Holewinski
ae10a30386
PTX: Fix style issues
...
llvm-svn: 140308
2011-09-22 16:45:43 +00:00
Justin Holewinski
8bc34e72e9
PTX: Fixup codegen to handle emission of virtual registers.
...
llvm-svn: 140307
2011-09-22 16:45:40 +00:00
Justin Holewinski
47423e4fb9
PTX: Customize codegen passes in backend
...
llvm-svn: 140306
2011-09-22 16:45:37 +00:00
Justin Holewinski
28a548ebe3
PTX: Add new PTX-specific register allocator that keeps virtual registers
...
instead of allocating physical registers.
This is part of a work-in-progress overhaul of the PTX register allocation scheme.
llvm-svn: 140305
2011-09-22 16:45:33 +00:00
Garrison Venn
8cb0035ee9
Converted Exception demo over to using new 3.0 landingpad instruction. This
...
was compiled and tested on OS X 10.7.1. It was not tested on LINUX. In
addition the defined OLD_EXC_SYSTEM was not tested with this version.
llvm-svn: 140303
2011-09-22 15:45:14 +00:00
Garrison Venn
eb89d36b9d
This is a hack to get the demo working with the new 3.0 exception
...
infrastructure. As this makes the demo no longer a demo, and especially not a
demo on how to use the llvm exception mechanism, this hack will shortly be
changed to use the new 3.0 exception infrastructure. However for the time being
this demo is an example on how to use the AutoUpgrade
UpgradeExceptionHandling(...) function on < 3.0 exception handling code.
llvm-svn: 140301
2011-09-22 14:07:50 +00:00
Craig Topper
6d1872b77a
Fix register printing in disassembling of push/pop of segment registers and in/out in Intel syntax mode. Fixes PR10960
...
llvm-svn: 140299
2011-09-22 07:01:50 +00:00
Akira Hatanaka
3d10b95bf7
Add definition of 64-bit floating registers used for Mips64.
...
llvm-svn: 140297
2011-09-22 03:48:47 +00:00
Benjamin Kramer
cfd26cd744
The SSE version differences for fmin/fmax are more involved than I thought.
...
- x87: no min or max.
- SSE1: min/max for single precision scalars and vectors.
- SSE2: min/max for single and double precision scalars and vectors.
- AVX: as SSE2, but also supports the wider ymm vectors. (this is covered by the isTypeLegal check)
llvm-svn: 140296
2011-09-22 03:27:22 +00:00
Akira Hatanaka
25ce3647e5
Add enums and functions for symbols Mips64 uses.
...
llvm-svn: 140295
2011-09-22 03:09:07 +00:00
Benjamin Kramer
dc397a6402
X86: Don't form min/max nodes if the target is missing SSE.
...
llvm-svn: 140294
2011-09-22 03:01:42 +00:00
Akira Hatanaka
dc7baed9d3
Mips64 aligns stack on 16-byte boundary.
...
llvm-svn: 140292
2011-09-22 02:53:37 +00:00
Akira Hatanaka
6a5f8b2fd4
Remove unnecessary condition check.
...
llvm-svn: 140291
2011-09-22 02:41:29 +00:00
Owen Anderson
fbe52c0192
Turns out that Thumb2 ADR doesn't need special printing like LDR does. Fix other test failures I caused.
...
llvm-svn: 140284
2011-09-21 23:53:44 +00:00
Owen Anderson
f52c68f0ca
Print out immediate offset versions of PC-relative load/store instructions as [pc, #123 ] rather than simply #123 .
...
llvm-svn: 140283
2011-09-21 23:44:46 +00:00
Devang Patel
5e6b65cf0d
Do not unnecessarily use AT_specification DIE because it does not add any value.
...
Few weeks ago, llvm completely inverted the debug info graph. Earlier each debug info node used to keep track of its compile unit, now compile unit keeps track of important nodes. One impact of this change is that the global variable's do not have any context, which should be checked before deciding to use AT_specification DIE.
llvm-svn: 140282
2011-09-21 23:41:11 +00:00
Galina Kistanova
ef65f002df
Fix for DbgInfoPrinter.cpp:174:12: warning: ‘LineNo’ may be used uninitialized in this function.
...
llvm-svn: 140281
2011-09-21 23:34:23 +00:00
Bill Wendling
f4bbc0416f
The last verification check for the new EH model.
...
This makes sure that the unwind destination of an invoke is a landing pad.
llvm-svn: 140280
2011-09-21 22:57:02 +00:00
Benjamin Kramer
8a529dc10a
llvm-objdump: Detach symbol listing from section enumeration for mach-o.
...
This reduces memory usage as we don't add the same symbol multiple times anymore.
llvm-svn: 140278
2011-09-21 22:16:43 +00:00
Bill Wendling
7b3fc8ee38
Attempt to update the shadow stack GC pass to the new EH model.
...
This inserts a cleanup landingpad instruction and a resume to mimic the old
unwind instruction.
llvm-svn: 140277
2011-09-21 22:14:28 +00:00
Benjamin Kramer
e5e189f669
X86Disassembler: if verbose logging is going to nulls(), disable logging completely.
...
Otherwise we'll spend a ridiculous amount of time pretty printing debug output and then discarding it.
llvm-svn: 140276
2011-09-21 21:47:35 +00:00
Jim Grosbach
098f5a2911
Tidy up. Whitepsace.
...
llvm-svn: 140275
2011-09-21 21:36:53 +00:00
Wesley Peck
eee3afcb86
Fix some simple copy-paste errors in MBlaze ASM Parser and Makefile.
...
patch contributed by Jia Liu!
llvm-svn: 140273
2011-09-21 19:23:46 +00:00
Benjamin Kramer
37a7151b1f
llvm-objdump: Take the data from the right object when there's no dSYM around.
...
llvm-svn: 140269
2011-09-21 18:18:53 +00:00
Owen Anderson
bcc3fadad9
These do not need to be conditional on the presence of CommentStream, as they have a fallback path now.
...
llvm-svn: 140267
2011-09-21 17:58:45 +00:00