1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

18226 Commits

Author SHA1 Message Date
Nate Begeman
358dee806e Rename canUseAsImmediateForOpcode to getImmediateForOpcode to better
indicate that it is not a boolean function.
Properly emit the pseudo instruction for conditional branch, so that we
  can fix up conditional branches whose displacements are too large.
Reserve the right amount of opcode space for said pseudo instructions.

llvm-svn: 21094
2005-04-05 04:22:58 +00:00
Chris Lattner
c5b8fbe7f9 do not crash when using -debug
llvm-svn: 21092
2005-04-05 01:12:03 +00:00
Nate Begeman
ede4abc899 Implement SDIV by power of 2 as srawi/addze rather than load imm, divw
llvm-svn: 21091
2005-04-05 00:15:08 +00:00
Nate Begeman
00002553ba Pattern match fp mul-add, mul-sub, neg-mul-add, and neg-mul-sub
llvm-svn: 21090
2005-04-04 23:40:36 +00:00
Nate Begeman
682fd51f9c Add support for multiply-add, multiply-sub, and their negated versions
llvm-svn: 21089
2005-04-04 23:01:51 +00:00
Chris Lattner
57ea4daa2e do not dereference an extra layer of pointers to determine if an external
call can modify a memory location.  This fixes
test/Regression/Analysis/Andersens/modreftest.ll

llvm-svn: 21088
2005-04-04 22:23:21 +00:00
Chris Lattner
3eed93ab73 new testcase
llvm-svn: 21087
2005-04-04 22:22:30 +00:00
Nate Begeman
d9af5c4fc5 Make sure that arg regs used by the call instruction are marked as such, so
that regalloc doesn't cleverly reuse early arg regs loading later arg regs.
This fixes almost all outstanding failures in the pattern isel.

llvm-svn: 21086
2005-04-04 22:17:48 +00:00
Nate Begeman
ce13bceb2a Remove unnecessary register copy now that regalloc is fixed
llvm-svn: 21085
2005-04-04 21:48:13 +00:00
Chris Lattner
f81edb57b6 Make sure to notice that explicit physregs are used in the function
llvm-svn: 21084
2005-04-04 21:35:34 +00:00
Nate Begeman
bde3612ce3 i1 loads should also be from the low byte of the argument word.
llvm-svn: 21077
2005-04-04 09:09:00 +00:00
Nate Begeman
77427b1e77 Fix i64 return, fix CopyFromReg
llvm-svn: 21076
2005-04-04 06:52:38 +00:00
Duraid Madina
920aea2fa7 fix SREM/UREM, which gave incorrect results for x%y if x was zero. This is
an ugly hack, but it seems to work. I should fix this properly and add a test
as well.

fixes multisource/obsequi (maybe others)

llvm-svn: 21075
2005-04-04 05:05:52 +00:00
Duraid Madina
d896a18d33 add implicit use op
llvm-svn: 21074
2005-04-04 04:50:57 +00:00
Nate Begeman
a8be5b976f Handle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when
you have something like i16 = truncate i64.  This fixes Regression/C/casts

llvm-svn: 21073
2005-04-04 00:57:08 +00:00
Chris Lattner
a8bccb73cd Fix sign_extend and zero_extend of promoted value types to expanded value
types.  This occurs when casting short to long on PPC for example.

llvm-svn: 21072
2005-04-03 23:41:52 +00:00
Nate Begeman
b2e5a962ff Full varargs support. All of UnitTests now passes
llvm-svn: 21070
2005-04-03 23:11:17 +00:00
Nate Begeman
1a5aaf6009 Pass the correct value for the chain to the store
llvm-svn: 21066
2005-04-03 22:22:56 +00:00
Nate Begeman
82d17d0e70 Fix SHL_PARTS
Start implementation of integer varargs

llvm-svn: 21065
2005-04-03 22:13:27 +00:00
Andrew Lenharth
320fff1cbe is this simpler? I think it is simpler.
llvm-svn: 21064
2005-04-03 20:35:21 +00:00
Andrew Lenharth
4be5502eb4 fix 101 regressions
llvm-svn: 21063
2005-04-03 18:24:50 +00:00
Duraid Madina
6b3090447d a wise man once said:
"!!!!!!!! IF YOU CHANGE SPACES TO TABS, YOU WILL BE KILLED!!!!!!"

llvm-svn: 21062
2005-04-03 14:57:35 +00:00
Duraid Madina
bfbfb0e4c7 .bss is no problem here.
llvm-svn: 21061
2005-04-03 14:52:01 +00:00
Nate Begeman
127bd62534 Keeping up with the Joneses.
Implement not, nor, nand, and eqv

llvm-svn: 21060
2005-04-03 11:20:20 +00:00
Andrew Lenharth
c16ede8779 Select optimization
llvm-svn: 21051
2005-04-02 22:32:39 +00:00
Andrew Lenharth
bd19c1d25f Try several things. 1) drop /i from FP ops 2) factor out FP to Int moves and provide 21264 support for those 3) match not 4) match ornot andnot xornot
llvm-svn: 21046
2005-04-02 21:06:51 +00:00
Chris Lattner
0938200804 fix some VC compilation problems, thanks to Jeff C for pointing this out!
llvm-svn: 21044
2005-04-02 20:17:09 +00:00
Chris Lattner
e6d28e8aac EquivClassGraphs is now in DataStructure.h
llvm-svn: 21042
2005-04-02 20:08:17 +00:00
Chris Lattner
dadd36cb34 merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
llvm-svn: 21041
2005-04-02 20:08:06 +00:00
Chris Lattner
54ab60f08d use a callee_iterator typedef.
llvm-svn: 21038
2005-04-02 20:02:41 +00:00
Chris Lattner
8b753bbfd9 add and use a callee_iterator typedef
llvm-svn: 21037
2005-04-02 20:02:32 +00:00
Chris Lattner
23ef46ddca Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.

This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.

llvm-svn: 21031
2005-04-02 19:17:18 +00:00
Chris Lattner
b58ad4e3eb Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.

llvm-svn: 21030
2005-04-02 19:15:15 +00:00
Andrew Lenharth
08e5b4f996 FNEG/FABS/UNDEF
llvm-svn: 21029
2005-04-02 19:11:07 +00:00
Andrew Lenharth
04fd317736 FNEG/FABS
llvm-svn: 21028
2005-04-02 19:04:58 +00:00
Chris Lattner
0fa73a71ba this has now been fixed
llvm-svn: 21026
2005-04-02 16:17:57 +00:00
Duraid Madina
63f75bdf49 ia64 asmprinter fixes:
- turn off assembler's autoalignment
  - set FunctionAddrPrefix/Suffix so that .data8 entries pointing to
    functions have their value wrapped in @fptr(), so that a function
    descriptor will be materialized for that function.

llvm-svn: 21025
2005-04-02 12:30:47 +00:00
Duraid Madina
3a10f491f0 add support for prefix/suffix strings to go around GlobalValue(s)
(which may or be function pointers) in the asmprinter. For the moment,
this changes nothing, except the IA64 backend which can use this to write:

  data8.ua  @fptr(blah__blah__mangled_function_name)

  (by setting FunctionAddrPrefix/Suffix to "@fptr(" / ")")

llvm-svn: 21024
2005-04-02 12:21:51 +00:00
Duraid Madina
5367cc3b49 support IDEF, fnegabs (thanks sampo)
llvm-svn: 21023
2005-04-02 10:33:53 +00:00
Duraid Madina
81675e4031 add fnegabs op
llvm-svn: 21022
2005-04-02 10:06:27 +00:00
Nate Begeman
402c04ff16 Set shift amount to Extend
Implement ISD::FABS and ISD::FNEG nodes
Implement SHL_PARTS, SRL_PARTS, and SRA_PARTS
Generate PowerPC 'fneg', 'fabs', and 'fnabs' instructions

llvm-svn: 21018
2005-04-02 05:59:34 +00:00
Chris Lattner
c39609dc9f don't forget to use the right code generator :)
llvm-svn: 21017
2005-04-02 05:40:03 +00:00
Chris Lattner
cf107cbc20 new testcase
llvm-svn: 21016
2005-04-02 05:35:00 +00:00
Chris Lattner
8f30d63c1a add support for FABS and FNEG
llvm-svn: 21015
2005-04-02 05:30:17 +00:00
Chris Lattner
1a15f58a92 transform fabs/fabsf calls into FABS nodes.
llvm-svn: 21014
2005-04-02 05:26:53 +00:00
Chris Lattner
206a694a7b Expand fabs into fneg
llvm-svn: 21013
2005-04-02 05:26:37 +00:00
Duraid Madina
333132da85 add support FNEG and FABS
llvm-svn: 21012
2005-04-02 05:18:38 +00:00
Chris Lattner
fcf6ee0a8b Turn -0.0 - X -> fneg
llvm-svn: 21011
2005-04-02 05:04:50 +00:00
Chris Lattner
a5d4718875 This target doesn't support fabs/fneg yet.
llvm-svn: 21010
2005-04-02 05:03:24 +00:00
Chris Lattner
8644181cd6 Several changes mixed up here. First when legalizing a DAG with pcmarker,
dont' regen the whole dag if unneccesary.  Second, fix and ugly bug with
the _PARTS nodes that caused legalize to produce multiples of them.
Finally, implement initial support for FABS and FNEG.  Currently FNEG is
the only one to be trusted though.

llvm-svn: 21009
2005-04-02 05:00:07 +00:00