Commit Graph

71326 Commits

Author SHA1 Message Date
Johnny Chen 04efb8f6ce Add sanity checking for invalid register encodings for signed/unsigned extend instructions.
Add some test cases.

llvm-svn: 129098
2011-04-07 19:28:58 +00:00
Johnny Chen 07606661f9 Add sanity checking for invalid register encodings for saturating instructions.
llvm-svn: 129096
2011-04-07 19:02:08 +00:00
Jakob Stoklund Olesen 64beb47783 Recompute hasPHIKill flags when shrinking live intervals.
PHI values may be deleted, causing the flags to be wrong. This fixes PR9616.

llvm-svn: 129092
2011-04-07 18:43:14 +00:00
Johnny Chen 194a2267ad Add some more comments about checkings of invalid register numbers.
And two test cases.

llvm-svn: 129090
2011-04-07 18:33:19 +00:00
Rafael Espindola e4e4e37580 Expose more passes to the C API.
llvm-svn: 129087
2011-04-07 18:20:46 +00:00
Jakob Stoklund Olesen 994c16833c Avoid moving iterators when the previous block was just visited.
llvm-svn: 129081
2011-04-07 17:27:50 +00:00
Jakob Stoklund Olesen 1c0db0fd21 Prefer multiplications to divisions.
llvm-svn: 129080
2011-04-07 17:27:48 +00:00
Jakob Stoklund Olesen 6d2bbc1c20 Extract SpillPlacement::addLinks for handling the special transparent blocks.
llvm-svn: 129079
2011-04-07 17:27:46 +00:00
Devang Patel 197c35298a While hoisting common code from if/else, hoist debug info intrinsics if they match.
llvm-svn: 129078
2011-04-07 17:27:36 +00:00
Tanya Lattner 266792a55a Prevent ARM DAG Combiner from doing an AND or OR combine on an illegal vector type (vectors of size 3). Also included test cases.
llvm-svn: 129074
2011-04-07 15:24:20 +00:00
Jay Foad 65bef04ea7 Fix a bit of nonsense.
llvm-svn: 129073
2011-04-07 12:41:09 +00:00
Chris Lattner 5ddaab1789 add faust too
llvm-svn: 129053
2011-04-07 03:09:21 +00:00
Chris Lattner caefe9346d add a few late stragglers.
llvm-svn: 129052
2011-04-07 03:08:22 +00:00
Sean Callanan 6c6be946fc Fixed a bug where missing EDInstInfo would cause
tokenization to crash and burn.

llvm-svn: 129051
2011-04-07 01:56:01 +00:00
Johnny Chen 313ec7953a Sanity check MSRi for invalid mask values and reject it as invalid.
rdar://problem/9246844

llvm-svn: 129050
2011-04-07 01:37:34 +00:00
Eli Friedman c5f22a7815 PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad
is equivalent to any other relevant value; it isn't true in general.
If it is equivalent, the LoopPromoter will tell the AST the equivalence.
Also, delete the PreheaderLoad if it is unused.

Chris, since you were the last one to make major changes here, can you check
that this is sane?

llvm-svn: 129049
2011-04-07 01:35:06 +00:00
Johnny Chen c0e86fb965 The ARM disassembler was not recognizing USADA8 instruction. Need to add checking for register values
for USAD8 and USADA8.

rdar://problem/9247060

llvm-svn: 129047
2011-04-07 01:05:52 +00:00
Evan Cheng a7c7b54dde Change -arm-divmod-libcall to a target neutral option.
llvm-svn: 129045
2011-04-07 00:58:44 +00:00
Evan Cheng b7c9c407f9 Remove dead code. rdar://9221736.
llvm-svn: 129044
2011-04-07 00:56:37 +00:00
Johnny Chen d4cced54b3 Should also check SMLAD for invalid register values.
rdar://problem/9246650

llvm-svn: 129042
2011-04-07 00:50:25 +00:00
Devang Patel e48ddf863b Simplify. isIdenticalToWhenDefined() checks opcode.
llvm-svn: 129041
2011-04-07 00:30:15 +00:00
Nick Lewycky 561f1755cc Set unnamed_addr on strings created through the IRBuilder.
llvm-svn: 129040
2011-04-07 00:14:29 +00:00
Nick Lewycky 9363fdc9b7 Add support for ArrayRef in IRBuilder's CreateCall.
llvm-svn: 129039
2011-04-07 00:03:25 +00:00
Owen Anderson bdff1c997a Teach the ARM peephole optimizer that RSB, RSC, ADC, and SBC can be used for folded comparisons, just like ADD and SUB.
llvm-svn: 129038
2011-04-06 23:35:59 +00:00
Owen Anderson f9bd6bad8a Cleanups from Jim: remove redundant constraints and a dead FIXME.
llvm-svn: 129036
2011-04-06 22:45:55 +00:00
Devang Patel d715ec82b4 While folding branch to a common destination into a predecessor, copy dbg values also.
llvm-svn: 129035
2011-04-06 22:37:20 +00:00
Jim Grosbach 6ade7e0bac Tidy up.
llvm-svn: 129034
2011-04-06 22:35:47 +00:00
Johnny Chen bd9a4f8d07 A8.6.393
The ARM disassembler should reject invalid (type, align) encodings as invalid instructions.

So, instead of:
Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1|
-------------------------------------------------------------------------------------------------

	vst2.32	{d0, d2}, [r3, :256], r3

we now have:
Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1|
-------------------------------------------------------------------------------------------------

mc-input.txt:1:1: warning: invalid instruction encoding
0xb3 0x9 0x3 0xf4
^

llvm-svn: 129033
2011-04-06 22:14:48 +00:00
Jim Grosbach 9c14679260 tidy up.
llvm-svn: 129032
2011-04-06 22:13:52 +00:00
Jakob Stoklund Olesen 8ce2f43694 Also account for the spill code that would be inserted in live-through blocks with interference.
llvm-svn: 129030
2011-04-06 21:32:41 +00:00
Jakob Stoklund Olesen 81439a83f4 Abort the constraint calculation early when all positive bias is lost.
Without any positive bias, there is nothing for the spill placer to to. It will
spill everywhere.

llvm-svn: 129029
2011-04-06 21:32:38 +00:00
Nick Lewycky 469d171ae2 Fix typo in doxy-comment.
llvm-svn: 129028
2011-04-06 20:54:07 +00:00
Johnny Chen 2ac486e387 A8.6.92 MCR (Encoding A1): if coproc == '101x' then SEE "Advanced SIMD and VFP"
Since these "Advanced SIMD and VFP" instructions have more specfic encoding bits
specified, if coproc == 10 or 11, we should reject the insn as invalid.

rdar://problem/9239922
rdar://problem/9239596

llvm-svn: 129027
2011-04-06 20:49:02 +00:00
Nick Lewycky 0cbfcb2b6d Fix comment to use llvm 2.x syntax.
llvm-svn: 129025
2011-04-06 20:38:44 +00:00
Nick Lewycky e30f330393 Replace const std::vector& with ArrayRef in the type creation APIs.
llvm-svn: 129024
2011-04-06 20:28:34 +00:00
Jakob Stoklund Olesen 6895b87dfe Keep track of the number of positively biased nodes when adding constraints.
If there are no positive nodes, the algorithm can be aborted early.

llvm-svn: 129021
2011-04-06 19:14:00 +00:00
Jakob Stoklund Olesen 36b5d8a698 Break the spill placement algorithm into three parts: prepare, addConstraints, and finish.
This will allow us to abort the algorithm early if it is determined to be futile.

llvm-svn: 129020
2011-04-06 19:13:57 +00:00
Roman Divacky 620f6967e0 Fix a typo.
llvm-svn: 129019
2011-04-06 19:12:21 +00:00
Johnny Chen 8bca174f48 Fix a bug in the disassembly of VGETLNs8 where the lane index was wrong.
Also set the encoding bits (for A8.6.303, A8.6.328, A8.6.329) Inst{3-0} = 0b0000,
in class NVLaneOp.

rdar://problem/9240648

llvm-svn: 129015
2011-04-06 18:27:46 +00:00
Rafael Espindola b4dd95b4f9 Add another case we are not optimizing.
llvm-svn: 129012
2011-04-06 17:35:32 +00:00
Rafael Espindola 7a3b244d45 The original issue has been fixed by not doing unnecessary sign extensions.
Change the test to force a sign extension and expose the problem again.

llvm-svn: 129011
2011-04-06 17:19:35 +00:00
Devang Patel 8aa6c326ac face+palm
Keep track of llvm.dbg.value intrinsics with non null values.

llvm-svn: 129010
2011-04-06 17:08:15 +00:00
Rafael Espindola 337a1b29e5 Do a topological sort of the types before writing them out.
This takes the linking of libxul on linux from 6m54.931s to 5m39.840s.

llvm-svn: 129009
2011-04-06 16:49:37 +00:00
Jim Grosbach 300504c135 EngineBuilder setter method for UseMCJIT was missing return value.
llvm-svn: 129008
2011-04-06 16:35:19 +00:00
Chris Lattner 958d299fca add rubinius
llvm-svn: 129006
2011-04-06 16:14:25 +00:00
Frits van Bommel 87e3367d32 Fix a few instances of "warning: extra ';' outside of a function [-pedantic]".
llvm-svn: 129002
2011-04-06 12:29:56 +00:00
Nadav Rotem cc771acd77 This testcase passed even without the fix. Added the target info to make the
test fail (without the fix). Thanks Dan.

llvm-svn: 128999
2011-04-06 11:18:29 +00:00
Duncan Sands ce5d9aedb9 Fix some typos. Minor tweaks to how some things were expressed.
llvm-svn: 128997
2011-04-06 08:07:40 +00:00
Jay Foad 1a7cc44157 Trivial typo fixes.
llvm-svn: 128996
2011-04-06 07:55:30 +00:00
Nick Lewycky d4b3d29c50 Add an empty key for DebugLoc so that you can store an empty DebugLoc in a
DenseMap.

llvm-svn: 128994
2011-04-06 06:49:59 +00:00
Chris Lattner 17c170a8e0 Finish up the first draft of the release notes.
improvements are welcome, please commit any changes directly to SVN.

llvm-svn: 128992
2011-04-06 06:29:50 +00:00
Chris Lattner 23e16b59d2 continue writing.
llvm-svn: 128990
2011-04-06 05:50:04 +00:00
Nick Lewycky ddc72895d0 Support using DebugLoc's in a DenseMap.
llvm-svn: 128988
2011-04-06 05:36:52 +00:00
Jakob Stoklund Olesen f3b2dcc74d Oops. Scary.
llvm-svn: 128986
2011-04-06 04:07:14 +00:00
Jakob Stoklund Olesen bf91c4e85e Analyze blocks with uses separately from live-through blocks without uses.
About 90% of the relevant blocks are live-through without uses, and the only
information required about them is their number. This saves memory and enables
later optimizations that need to look at only the use-blocks.

llvm-svn: 128985
2011-04-06 03:57:00 +00:00
Johnny Chen 0ec0e98a6a Add a missing opcode (SMLSLDX) to BadRegsMulFrm() function.
Add more complete sanity check for LdStFrm instructions where if IBit (Inst{25})
is 1, Inst{4} should be 0.  Otherwise, we should reject the insn as invalid.

rdar://problem/9239347
rdar://problem/9239467

llvm-svn: 128977
2011-04-06 01:18:32 +00:00
Chris Lattner ae6a89a890 add the external users that emailed me.
llvm-svn: 128974
2011-04-06 01:13:49 +00:00
Jim Grosbach 23de2437bd RuntimeDyld should use the memory manager API.
Start teaching the runtime Dyld interface to use the memory manager API
for allocating space. Rather than mapping directly into the MachO object,
we extract the payload for each object and copy it into a dedicated buffer
allocated via the memory manager. For now, just do Segment64, so this works
on x86_64, but not yet on ARM.

llvm-svn: 128973
2011-04-06 01:11:05 +00:00
Chris Lattner 14a3333cb3 some libc++ notes.
llvm-svn: 128970
2011-04-06 00:59:18 +00:00
Chris Lattner 9d5b3712de some edits.
llvm-svn: 128969
2011-04-06 00:56:12 +00:00
Chris Lattner c3a2c9817c distribute content out to the appropriate sections
llvm-svn: 128968
2011-04-06 00:45:11 +00:00
Owen Anderson 867846b1f0 Reapply r128946 (pseudoization of various instructions), and fix the extra imp-def of CPSR it was adding.
llvm-svn: 128965
2011-04-05 23:55:28 +00:00
Chandler Carruth 086f7080d6 Make the virtual destructor out-of-line so we have a key function.
llvm-svn: 128964
2011-04-05 23:54:31 +00:00
Jakob Stoklund Olesen 858afbb6ac Sign error
llvm-svn: 128963
2011-04-05 23:43:16 +00:00
Jakob Stoklund Olesen 5c482cd38f Don't crash when a value is defined after the last split point.
llvm-svn: 128962
2011-04-05 23:43:14 +00:00
Jakob Stoklund Olesen 30b5473d82 Permit blocks to branch directly to a landing pad.
Treat the landing pad as a normal successor when that happens.

llvm-svn: 128961
2011-04-05 23:43:11 +00:00
Jim Grosbach f642c1b600 Remove extraneous 'return'.
llvm-svn: 128959
2011-04-05 23:39:08 +00:00
Johnny Chen f6e327c6a3 Fix a typo in the handling of PKHTB opcode, plus add sanity check for illegal register
encodings for DisassembleArithMiscFrm().

rdar://problem/9238659

llvm-svn: 128958
2011-04-05 23:28:00 +00:00
Chris Lattner ce6b047a10 finished my pass through all the 2.9 commits, now to make this intelligible
llvm-svn: 128955
2011-04-05 23:22:33 +00:00
Chris Lattner a76507fdc3 mention llvm::ArrayRef, which should be use much more pervasively than
it already is.

llvm-svn: 128954
2011-04-05 23:18:20 +00:00
Bob Wilson d135c696c0 Clean up some code for clarity.
llvm-svn: 128953
2011-04-05 23:03:25 +00:00
Chandler Carruth f920fbf94b Provide an empty virtual destructor to go with the virtual methods in
this class. Clang was warning on this with -Wnon-virtual-dtor.

llvm-svn: 128952
2011-04-05 23:03:24 +00:00
Owen Anderson 61e7a935bd Revert r128946 while I figure out why it broke the buildbots.
llvm-svn: 128951
2011-04-05 23:03:06 +00:00
Johnny Chen c3656d29f6 A7.3 register encoding
Qd -> bit[12] == 0
    Qn -> bit[16] == 0
    Qm -> bit[0]  == 0

If one of these bits is 1, the instruction is UNDEFINED.

rdar://problem/9238399
rdar://problem/9238445

llvm-svn: 128949
2011-04-05 22:57:07 +00:00
Devang Patel 9f738849ab Add support to encode function's template parameters.
llvm-svn: 128947
2011-04-05 22:52:06 +00:00
Owen Anderson 3501655ad9 Give RSBS and RSCS the pseudo treatment.
llvm-svn: 128946
2011-04-05 22:42:54 +00:00
Johnny Chen 9da60e016b ARM disassembler was erroneously accepting an invalid RSC instruction.
Added checks for regs which should not be 15.

rdar://problem/9237734

llvm-svn: 128945
2011-04-05 22:18:07 +00:00
Chris Lattner 57ee5a5db7 remove postdom frontiers, because it is dead. Forward dom frontiers are
still used by RegionInfo :(

llvm-svn: 128943
2011-04-05 21:57:17 +00:00
NAKAMURA Takumi 530d739097 docs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified div.
It would be better to browse without stylesheet. (eg. on ViewVC)

llvm-svn: 128942
2011-04-05 21:55:14 +00:00
Johnny Chen 25883487a1 ARM disassembler was erroneously accepting an invalid LSL instruction.
For register-controlled shifts, we should check that the encoding constraint
Inst{7} = 0 and Inst{4} = 1 is satisfied.

rdar://problem/9237693

llvm-svn: 128941
2011-04-05 21:49:44 +00:00
Owen Anderson 77aa266de8 Fix bugs in the pseuo-ization of ADCS/SBCS pointed out by Jim, as well as doing the expansion earlier (using a custom inserter) to allow for the chance of predicating these instructions.
llvm-svn: 128940
2011-04-05 21:48:57 +00:00
Chris Lattner 706754c1f2 remove graphprinter support for domfrontier.
llvm-svn: 128938
2011-04-05 21:43:56 +00:00
Jakob Stoklund Olesen 1ec41e2bd9 These tests no longer require linear scan because reserved register coalescing is now universal.
llvm-svn: 128936
2011-04-05 21:40:41 +00:00
Jakob Stoklund Olesen 6aa0fbf4c0 Run LiveDebugVariables in RegAllocBasic and RegAllocGreedy.
llvm-svn: 128935
2011-04-05 21:40:37 +00:00
Chris Lattner 269ef9f6f0 only 7 more weeks to go.
llvm-svn: 128933
2011-04-05 21:37:08 +00:00
Devang Patel d4e20eacf0 Refactor.
llvm-svn: 128929
2011-04-05 21:08:24 +00:00
Jakob Stoklund Olesen 04123d40cd Document llvm/ADT/IntEqClasses.h in ProgrammersManual.html
llvm-svn: 128927
2011-04-05 20:56:08 +00:00
Bob Wilson 6c20b88173 Add an assertion instead of crashing when the scavenger goes past the end
of a basic block.

llvm-svn: 128925
2011-04-05 20:44:15 +00:00
Nick Lewycky ee54fa29d5 Fix typos. Adjust some whitespace for style. No functionality change.
llvm-svn: 128924
2011-04-05 20:39:27 +00:00
Johnny Chen e9c644d4a0 The r128085 checkin modified the operand ordering for MRC/MRC2 instructions.
Modify DisassembleCoprocessor() of ARMDisassemblerCore.cpp to react to the change.

rdar://problem/9236873

llvm-svn: 128922
2011-04-05 20:32:23 +00:00
Roman Divacky 92d313a021 Add support for detection of Intel SandyBridge.
llvm-svn: 128920
2011-04-05 20:25:36 +00:00
Jakob Stoklund Olesen e20fec7732 Fix one more batch of X86 tests to be register allocation dependent.
llvm-svn: 128919
2011-04-05 20:20:30 +00:00
Jakob Stoklund Olesen 18fd84c79a When dead code elimination removes all but one use, try to fold the single def into the remaining use.
Rematerialization can leave single-use loads behind that we might as well fold whenever possible.

llvm-svn: 128918
2011-04-05 20:20:26 +00:00
Devang Patel 651d06e036 Do not emit empty name.
llvm-svn: 128914
2011-04-05 20:14:13 +00:00
Johnny Chen 151582492d ARM disassembler should flag (rGPRRegClassID, r13|r15) as an error.
llvm-svn: 128913
2011-04-05 19:42:11 +00:00
Andrew Trick 40d388c25e Fix a typo.
llvm-svn: 128912
2011-04-05 19:13:11 +00:00
Andrew Trick 12004013ef Added *hidden* flags -print-options and -print-all-options so
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.

Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.

llvm-svn: 128910
2011-04-05 18:54:36 +00:00
Johnny Chen 56c15c64b0 LDRD now prints out two dst registers.
llvm-svn: 128909
2011-04-05 18:53:14 +00:00
Johnny Chen 293875ef55 Fix test-llvm failures.
llvm-svn: 128906
2011-04-05 18:41:40 +00:00
Andrew Trick b826ae8310 whitespace
llvm-svn: 128905
2011-04-05 18:41:31 +00:00
Shantonu Sen e59f8ca49e An MCDisassembler has the option to not implement
getEDInfo(), in which case this code would dereference
NULL. EDInst can already handle NULL info, so avoid
the dereference and pass NULL through.

Reviewed by Sean Callanan

llvm-svn: 128904
2011-04-05 18:40:45 +00:00
Jim Grosbach d9dce561b6 Make second source operand of LDRD pre/post explicit.
Finish what r128736 started.

llvm-svn: 128903
2011-04-05 18:40:13 +00:00
Chris Lattner 9ee0b01617 more notes to self.
llvm-svn: 128902
2011-04-05 18:38:45 +00:00
Johnny Chen 33d3a9fadc Constants with multiple encodings (ARM):
An alternative syntax is available for a modified immediate constant that permits the programmer to specify
the encoding directly. In this syntax, #<const> is instead written as #<byte>,#<rot>, where:

    <byte> is the numeric value of abcdefgh, in the range 0-255
    <rot> is twice the numeric value of rotation, an even number in the range 0-30.

llvm-svn: 128897
2011-04-05 18:02:46 +00:00
Johnny Chen 268d63f307 Check for invalid register encodings for UMAAL and friends where:
if dLo == 15 || dHi == 15 || n == 15 || m == 15 then UNPREDICTABLE;
    if dHi == dLo then UNPREDICTABLE;

rdar://problem/9230202

llvm-svn: 128895
2011-04-05 17:43:10 +00:00
Owen Anderson f7678b83d2 Convert ADCS and SBCS instructions into pseudos that are expanded to the ADC/ABC with the appropriate S-bit input value.
llvm-svn: 128892
2011-04-05 17:24:25 +00:00
Stuart Hastings 345094777f ARM doesn't support byval yet. XFAIL this test until it does.
llvm-svn: 128891
2011-04-05 17:16:21 +00:00
Oscar Fuentes d8a6dd6c99 Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming
scheme is used by the functionality related to find_package.

llvm-svn: 128889
2011-04-05 17:02:48 +00:00
Jakob Stoklund Olesen 76ad3debab Ensure all defs referring to a virtual register are marked dead by addRegisterDead().
There can be multiple defs for a single virtual register when they are defining
sub-registers.

The missing <dead> flag was stopping the inline spiller from eliminating dead
code after rematerialization.

llvm-svn: 128888
2011-04-05 16:53:50 +00:00
Rafael Espindola 7dd4d6e2e8 Print visibility info for external variables.
llvm-svn: 128887
2011-04-05 15:51:32 +00:00
Jakob Stoklund Olesen fe6e07fd8a Use std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots.
This allows us to always keep the smaller slot for an instruction which is what
we want when a register has early clobber defines.

Drop the UsingInstrs set and the UsingBlocks map. They are no longer needed.

llvm-svn: 128886
2011-04-05 15:18:18 +00:00
Nadav Rotem a069c6ce05 InstCombine optimizes gep(bitcast(x)) even when the bitcasts casts away address
space info. We crash with an assert in this case. This change checks that the
address space of the bitcasted pointer is the same as the gep ptr.

llvm-svn: 128884
2011-04-05 14:29:52 +00:00
NAKAMURA Takumi 8d89b8e684 docs/ReleaseNotes.html: Add a few notes to MCCOFF and x64. FIXME: fixme!
llvm-svn: 128882
2011-04-05 08:24:22 +00:00
NAKAMURA Takumi f8e44c35eb docs/GettingStarted.html: FIXME: dg, lit, and source tree layout.
llvm-svn: 128881
2011-04-05 08:24:15 +00:00
Chris Lattner fd97b88b2f add a bunch of notes to myself, this is not intended to be gramatic or
make sense to anyone else.

llvm-svn: 128879
2011-04-05 07:19:28 +00:00
Jakob Stoklund Olesen d93b0e3ced Stop precomputing last split points, query the SplitAnalysis cache on demand.
llvm-svn: 128875
2011-04-05 04:20:29 +00:00
Jakob Stoklund Olesen 50b2db8a02 Cache the fairly expensive last split point computation and provide a fast
inlined path for the common case.

Most basic blocks don't contain a call that may throw, so the last split point
os simply the first terminator.

llvm-svn: 128874
2011-04-05 04:20:27 +00:00
Bill Wendling dd4dcd549b Revamp the SjLj "dispatch setup" intrinsic.
It needed to be moved closer to the setjmp statement, because the code directly
after the setjmp needs to know about values that are on the stack. Also, the
'bitcast' of the function context was causing a dead load. This wouldn't be too
horrible, except that at -O0 it wasn't optimized out, and because it wasn't
using the correct base pointer (if there is a VLA), it would try to access a
value from a garbage address.
<rdar://problem/9130540>

llvm-svn: 128873
2011-04-05 01:37:43 +00:00
Eric Christopher f392a69ff7 Fix up testcase for previous commit.
llvm-svn: 128870
2011-04-05 00:56:01 +00:00
Eric Christopher b968f4defe Just use BL all the time. It's safer that way.
Fixes rdar://9184526

llvm-svn: 128869
2011-04-05 00:39:26 +00:00
Stuart Hastings ad68c93a2d Revert 123704; it broke threaded LLVM.
llvm-svn: 128868
2011-04-05 00:37:28 +00:00
Jakob Stoklund Olesen bd09d45489 Fix register-dependent X86 tests.
llvm-svn: 128867
2011-04-05 00:32:44 +00:00
Johnny Chen 9b3ccba636 Fix SRS/SRSW encoding bits.
rdar://problem/9230801 ARM disassembler discrepancy: erroneously accepting SRS

Plus add invalid-RFEorLDMIA-arm.txt test which should have been checked in with
http://llvm.org/viewvc/llvm-project?view=rev&revision=128859.

llvm-svn: 128864
2011-04-05 00:16:18 +00:00
Johnny Chen 782a60c117 A8.6.105 MUL
Inst{15-12} should be specified as 0b0000.

rdar://problem/9231168 ARM disassembler discrepancy: erroneously accepting MUL

llvm-svn: 128862
2011-04-04 23:57:05 +00:00
Bill Wendling db62424c3d Add info on where to get 2.9 final svn sources.
llvm-svn: 128860
2011-04-04 23:42:51 +00:00
Johnny Chen a6129b4a7f RFE encoding should also specify the "should be" encoding bits.
rdar://problem/9229922 ARM disassembler discrepancy: erroneously accepting RFE

Also LDC/STC instructions are predicated while LDC2/STC2 instructions are not, fixed while
doing regression testings.

llvm-svn: 128859
2011-04-04 23:39:08 +00:00
Jim Grosbach b070fd655d Add missing file from r128851.
llvm-svn: 128856
2011-04-04 23:20:40 +00:00
Jim Grosbach 2dcef0505f Layer the memory manager between the JIT and the runtime Dyld.
The JITMemory manager references LLVM IR constructs directly, while the
runtime Dyld works at a lower level and can handle objects which may not
originate from LLVM IR. Introduce a new layer for the memory manager to
handle the interface between them. For the MCJIT, this layer will be almost
entirely simply a call-through w/ translation between the IR objects and
symbol names.

llvm-svn: 128851
2011-04-04 23:04:39 +00:00
Joerg Sonnenberger 418f186a4b Make OpcodeMask an unsigned long long literal to deal with overflow.
llvm-svn: 128847
2011-04-04 21:38:17 +00:00
Jakob Stoklund Olesen 2e85396509 Allow coalescing with reserved physregs in certain cases:
When a virtual register has a single value that is defined as a copy of a
reserved register, permit that copy to be joined. These virtual register are
usually copies of the stack pointer:

  %vreg75<def> = COPY %ESP; GR32:%vreg75
  MOV32mr %vreg75, 1, %noreg, 0, %noreg, %vreg74<kill>
  MOV32mi %vreg75, 1, %noreg, 8, %noreg, 0
  MOV32mi %vreg75<kill>, 1, %noreg, 4, %noreg, 0
  CALLpcrel32 ...

Coalescing these virtual registers early decreases register pressure.
Previously, they were coalesced by RALinScan::attemptTrivialCoalescing after
register allocation was completed.

The lower register pressure causes the mcinst-lowering-cmp0.ll test case to fail
because it depends on linear scan spilling a particular register.

I am deleting 2008-08-05-SpillerBug.ll because it is counting the number of
instructions emitted, and its revision history shows the 'correct' count being
edited many times.

llvm-svn: 128845
2011-04-04 21:00:03 +00:00
Jakob Stoklund Olesen 8de5ca72e3 Extract physreg joining policy to a separate method.
llvm-svn: 128844
2011-04-04 20:59:59 +00:00
Johnny Chen 8372006296 Fix incorrect alignment for NEON VST2b32_UPD.
rdar://problem/9225433

llvm-svn: 128841
2011-04-04 20:35:31 +00:00
Devang Patel 0abc463f5b Update BreakpointPrinter to emit original function names only.
llvm-svn: 128839
2011-04-04 19:51:17 +00:00
Jakob Stoklund Olesen 13ce236c4c Insert code in the right location when lowering PowerPC atomics.
This causes defs to dominate uses, no instructions after terminators, and other
goodness.

llvm-svn: 128836
2011-04-04 17:57:29 +00:00
Jakob Stoklund Olesen 8296e30627 Disable the PowerPC/Atomics-64 test.
The code inserted by PPCTargetLowering::EmitInstrWithCustomInserter for ppc64 is
wrong, and I don't know how to fix it. It seems to be using the correct register
classes for pointers, but it inserts all 32-bit instructions.

llvm-svn: 128835
2011-04-04 17:57:26 +00:00
Eric Christopher 66c1c59bdb Remove unused function.
llvm-svn: 128834
2011-04-04 17:36:11 +00:00
Bruno Cardoso Lopes bda3632bcd - Implement asm parsing support for LDRSBT, LDRHT, LDRSHT and STRHT
also fix the encoding of the later.
- Add a new encoding bit to describe the index mode used in AM3.
- Teach printAddrMode3Operand to check by the addressing mode which
  index mode to print.
- Testcases.

llvm-svn: 128832
2011-04-04 17:18:19 +00:00
Chris Lattner 2c6cefc9c3 silence an unused function warning.
llvm-svn: 128831
2011-04-04 17:17:57 +00:00
Akira Hatanaka 5ec2ead9b0 Move transformation of JmpLink and related nodes done during instruction selection to Legalize phase.
llvm-svn: 128830
2011-04-04 17:11:07 +00:00
Jakob Stoklund Olesen 86e1a65ce5 PowerPC atomic pseudos clobber CR0, they don't read it.
llvm-svn: 128829
2011-04-04 17:07:09 +00:00
Jakob Stoklund Olesen 7067bff976 Use X0 instead of R0 for the zero register on ppc64.
The 32-bit R0 cannot be used where a 64-bit register is expected.

llvm-svn: 128828
2011-04-04 17:07:06 +00:00
Jakob Stoklund Olesen 218661346a Fix PowerPC tests to be register allocator independent.
llvm-svn: 128827
2011-04-04 17:07:03 +00:00
Joerg Sonnenberger fc4789da4a Add support for the VIA PadLock instructions.
llvm-svn: 128826
2011-04-04 16:58:13 +00:00
Joerg Sonnenberger c94780c539 Use array_lengthof
llvm-svn: 128823
2011-04-04 16:25:38 +00:00
Joerg Sonnenberger cc53d9919f Expand Op0Mask by one bit in preparation for the PadLock prefixes.
Define most shift masks incrementally to reduce the redundant
hard-coding. Introduce new shift for the VEX flags to replace the
magic constant 32 in various places.

llvm-svn: 128822
2011-04-04 15:58:30 +00:00
Jakob Stoklund Olesen 8933907b51 Stop caching basic block index ranges now that SlotIndexes can keep up.
llvm-svn: 128821
2011-04-04 15:32:15 +00:00
Jakob Stoklund Olesen 956ae3da41 Delete leftover data members.
llvm-svn: 128820
2011-04-04 15:32:11 +00:00
Joerg Sonnenberger fb3bce155e Change loops to derive the number of tables automatically
llvm-svn: 128818
2011-04-04 14:42:22 +00:00
Duncan Sands 1cd7898dc1 Dragonegg release notes.
llvm-svn: 128812
2011-04-04 11:09:08 +00:00
Jay Foad 11522097be Remove some support for ReturnInsts with multiple operands, and for
returning a scalar value in a function whose return type is a single-
element structure or array.

llvm-svn: 128810
2011-04-04 07:44:02 +00:00