Commit Graph

9825 Commits

Author SHA1 Message Date
Anton Korobeynikov
e0f4af3b49 StoreInst does not produce any result thus it's useless to create new
variable for it. This greatly reduces amount of unused variables in
llvm2cpp-generated code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58905 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 12:58:07 +00:00
Evan Cheng
ae166410b9 Moved InvalidateInstructionCache to ARMJITInfo::emitFunctionStub which knows size of stub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58899 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 08:16:49 +00:00
Evan Cheng
ce4a70bd76 Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58897 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 08:02:53 +00:00
Evan Cheng
3cc8223a3c Tell ARMJITInfo if codegen relocation is PIC. It changes how function stubs are generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58896 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 07:38:22 +00:00
Evan Cheng
103325179a Fix relocation for calls to external symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58893 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 07:22:33 +00:00
Scott Michel
771138ca91 CellSPU: Fix prologue/epilogue emission when function contains calls but
theframe size is 0; the prologue and epilogue should be emitted in this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 05:16:20 +00:00
Evan Cheng
05c356e65a Skip over two-address use operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58883 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 01:44:13 +00:00
Evan Cheng
e96a490d7a Handle ARM machine constantpool entry with non-lazy ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58882 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 01:31:27 +00:00
Evan Cheng
f1bbb9577a Use ARMFunctionInfo to track number of constpool entries and jumptables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58877 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 00:51:41 +00:00
Evan Cheng
413a89f318 More code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58872 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 22:57:53 +00:00
Dale Johannesen
53e4e4478c Make FP tests requiring two compares work on PPC (PR 642).
This is Chris' patch from the PR, modified to realize that
SETUGT/SETULT occur legitimately with integers, plus
two fixes in LegalizeDAG to pass a valid result type into
LegalizeSetCC.  The argument of TLI.getSetCCResultType is
ignored on PPC, but I think I'm following usage elsewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 22:54:33 +00:00
Evan Cheng
437c1738ef Get PIC jump table working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58869 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 22:30:53 +00:00
Dan Gohman
e5f4de42b5 Flush the raw_ostream after emitting the assembly for a function.
This is a temporary fix for the -print-emitted-asm option, where
errs() is used as the stream, in the case where other code is
using stderr without using errs()' buffer. Hopefully soon we'll
fix errs() to be non-buffered instead. Patch by Preston Gurd.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58859 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 19:49:17 +00:00
Richard Osborne
f943b1586f Fix compile warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 11:21:09 +00:00
Scott Michel
d9890dee7c CellSPU: Ensure that C strings are always put in the .rodata section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58839 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 11:06:44 +00:00
Richard Osborne
b25baef26f Add XCore backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 10:59:00 +00:00
Evan Cheng
4df60f5491 Jump table JIT support. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58836 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 09:06:08 +00:00
Scott Michel
d03eeafd9f Teach CellSPU about ELF sections and new section emitter classes.
NB: This is likely to need more work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58832 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 04:36:25 +00:00
Evan Cheng
8b59db3f2c Encode misc arithmetic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 01:41:35 +00:00
Evan Cheng
97f48c39fd Encode extend instructions; more clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58818 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 22:15:19 +00:00
Evan Cheng
12c3a533c5 - Improve naming consistency: Branch -> BrFrm, BranchMisc -> BrMiscFrm.
- Consolidate instruction formats.
- Other clean up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58808 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 17:48:05 +00:00
Evan Cheng
d87293ce78 Remove opcode from instruction TS flags; add MOVCC support; fix addrmode3 encoding bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 08:47:38 +00:00
Mon P Wang
f007a8b931 Widening cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 05:31:54 +00:00
Evan Cheng
eb4f52eb62 Handle smul<x><y>, smulw<y>, smla<x><y>, smlaw<y>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 03:35:07 +00:00
Evan Cheng
9092213a5e Fix so_imm encoding bug; add support for MOVi2pieces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58790 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 02:25:39 +00:00
Evan Cheng
fbc9d412ef Fix encoding of multiple instructions with 3 src operands; also handle smmul, smmla, and smmls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58789 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 01:21:28 +00:00
Evan Cheng
83b5cf0272 Encode pic load / store instructions; fix some encoding bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 23:22:34 +00:00
Evan Cheng
edda31c412 Restructure ARM code emitter to use instruction formats instead of addressing modes to determine how to encode instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 18:35:52 +00:00
Dan Gohman
cbb7ab259d Reintroduce a comment that was removed with the AddToISelQueue
changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 17:16:24 +00:00
Richard Osborne
617303ac71 Test commit, add Makefile for XCore target, more to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 09:53:58 +00:00
Evan Cheng
b35ed9247a Add more vector move low and zero-extend patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 06:04:51 +00:00
Evan Cheng
9dd93b36b8 Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 06:03:38 +00:00
Dan Gohman
8be6bbe5bf Eliminate the ISel priority queue, which used the topological order for a
priority function. Instead, just iterate over the AllNodes list, which is
already in topological order. This eliminates a fair amount of bookkeeping,
and speeds up the isel phase by about 15% on many testcases.

The impact on most targets is that AddToISelQueue calls can be simply removed.

In the x86 target, there are two additional notable changes.

The rule-bending AND+SHIFT optimization in MatchAddress that creates new
pre-isel nodes during isel is now a little more verbose, but more robust.
Instead of either creating an invalid DAG or creating an invalid topological
sort, as it has historically done, it can now just insert the new nodes into
the node list at a position where they will be consistent with the topological
ordering.

Also, the address-matching code has logic that checked to see if a node was
"already selected". However, when a node is selected, it has all its uses
taken away via ReplaceAllUsesWith or equivalent, so it won't recieve any
further visits from MatchAddress. This code is now removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58748 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 04:14:16 +00:00
Dan Gohman
fa210d8dd1 Use getTargetConstant instead of getConstant for nodes that should not be visited
by isel and potentially forced into registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58747 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 02:06:09 +00:00
Evan Cheng
c96a8e7df1 Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
indirect gv reference. Please don't call it lazy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58746 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 01:50:32 +00:00
Evan Cheng
3eb22e835f Actually ARM / Mac OS X does have UINTTOFP_I64_F{64|32} libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 22:19:55 +00:00
Evan Cheng
c7c77297e2 Custom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 19:57:48 +00:00
Evan Cheng
142c15e052 Debug output tweak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 17:58:53 +00:00
Evan Cheng
e7fe672445 LDM_RET restores pc, do not set 's' bit which would restore CPSR from SPSR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58707 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 17:57:07 +00:00
Evan Cheng
b0b53491ef For some targets, it's not possible to place GVs in the same memory buffer as the MachineCodeEmitter allocated memory. Code and data has different read / write / execution privilege requirements.
This is a short term workaround. The current solution is for the JIT memory manager to manage code and data memory separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 09:30:48 +00:00
Evan Cheng
e953b89b0d Stylistic change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58683 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 06:10:06 +00:00
Evan Cheng
25e04788bf Handle ARM machine constantpool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58671 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 00:50:32 +00:00
Dan Gohman
f6503a031e The ANDMask node folds to a constant, and isn't the node that needs to
have its node id set. The new and and shift nodes are the nodes that need
the IDs. This fixes PR2982.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58655 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 23:43:55 +00:00
Evan Cheng
49987360ad Remove a dead switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 21:26:52 +00:00
Evan Cheng
afaf12036d Minor code restructuring. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 21:02:39 +00:00
Jim Grosbach
0a4b9dc9b1 Add binary encoding support for multiply instructions. Some blanks left to fill in, but the basics are there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 18:38:31 +00:00
Dan Gohman
8f092252d3 Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 18:22:42 +00:00
Bill Wendling
7ab1fc1490 Whitespace fixes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 21:26:08 +00:00
Evan Cheng
2583b2a713 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58533 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:56:03 +00:00
Evan Cheng
938b9d8ef7 Use better data structure for ConstPoolId2AddrMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58532 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:55:13 +00:00