Commit Graph

18035 Commits

Author SHA1 Message Date
Chris Lattner
2ccc5f1081 use a callee_iterator typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:02:41 +00:00
Chris Lattner
da7c380eb4 add and use a callee_iterator typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21037 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:02:32 +00:00
Chris Lattner
021decc82d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:17:18 +00:00
Chris Lattner
df968b8b37 Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:15:15 +00:00
Andrew Lenharth
7332f3e05d FNEG/FABS/UNDEF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21029 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:11:07 +00:00
Andrew Lenharth
30b46d41bc FNEG/FABS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21028 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:04:58 +00:00
Chris Lattner
4cb11a1de2 this has now been fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21026 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 16:17:57 +00:00
Duraid Madina
32c46f33b7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21025 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 12:30:47 +00:00
Duraid Madina
855a519741 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(" / ")")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21024 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 12:21:51 +00:00
Duraid Madina
75c9fcbdcc support IDEF, fnegabs (thanks sampo)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 10:33:53 +00:00
Duraid Madina
5c156b7473 add fnegabs op
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21022 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 10:06:27 +00:00
Nate Begeman
27eeb00a1a 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21018 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:59:34 +00:00
Chris Lattner
e21710757d don't forget to use the right code generator :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:40:03 +00:00
Chris Lattner
597f22f6cd new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21016 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:35:00 +00:00
Chris Lattner
b7edaa1d08 add support for FABS and FNEG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:30:17 +00:00
Chris Lattner
c0f18152d9 transform fabs/fabsf calls into FABS nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21014 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:26:53 +00:00
Chris Lattner
4af6e0d783 Expand fabs into fneg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21013 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:26:37 +00:00
Duraid Madina
a7ee8b8f04 add support FNEG and FABS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21012 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:18:38 +00:00
Chris Lattner
b9fccc4193 Turn -0.0 - X -> fneg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21011 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:04:50 +00:00
Chris Lattner
43fdea070c This target doesn't support fabs/fneg yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21010 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:03:24 +00:00
Chris Lattner
2c8086f4b9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21009 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 05:00:07 +00:00
Chris Lattner
ff9fd0a99c print fneg/fabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21008 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 04:58:41 +00:00
Chris Lattner
7366fd3972 Add two happy new nodes for FABS and FNEG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21007 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 04:58:28 +00:00
Chris Lattner
b1f26fb921 add an fabs instr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21006 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 04:31:56 +00:00
Chris Lattner
b38a7495da Add support for 64-bit shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21005 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 04:01:14 +00:00
Chris Lattner
5b359c6c4f fix some bugs in the implementation of SHL_PARTS and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21004 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 04:00:59 +00:00
Chris Lattner
6b8f2d649c fix a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21003 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:59:45 +00:00
Chris Lattner
4759982a2d Turn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21002 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:38:53 +00:00
Chris Lattner
41be951a47 Print some new nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21001 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:30:42 +00:00
Chris Lattner
14c5b53c03 add some new nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21000 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:30:33 +00:00
Chris Lattner
f4b457987f Fix a bug when inserting a libcall into a function with no other calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20999 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:22:40 +00:00
Chris Lattner
d4b57286dc new generic testcsae
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20996 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 02:41:55 +00:00
Nate Begeman
27523a1c92 Fix i64 returns
Generate PowerPC 'subfic' instruction when appropriate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20995 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 00:42:16 +00:00
Nate Begeman
ea19cd51aa Fix a warning about an unhandled switch case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20994 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 00:41:14 +00:00
John Criswell
d60c0ef023 For Sparc, this xfails. I don't think sparc has the C99 complex data
type support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20993 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 23:16:23 +00:00
Chris Lattner
7ce7eff54c Add support for ISD::UNDEF to the X86 be
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20990 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 22:46:45 +00:00
Nate Begeman
fc1b1dad88 Add ISD::UNDEF node
Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
  arguments, but not shadowing their value.  This allows us to do the right
  thing with both fixed and vararg floating point arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20988 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 22:34:39 +00:00
Chris Lattner
e6fea166c3 Fix another PATypeHolder error, contributed by Bill Wendling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20983 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 15:41:30 +00:00
Duraid Madina
69c8e20aa1 repair mindless SELECT waste.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20982 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 10:35:00 +00:00
Nate Begeman
6cb2e1b124 Fix Olden/bh, CR0 was being set in the wrong order
LowerCallTo and ISD::CALL are going to need to be modified, regs are being
set in the wrong order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20981 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 08:57:43 +00:00
Nate Begeman
31318e4b6c Also apply Chris's fix to FP select and SETCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 07:21:30 +00:00
Chris Lattner
bea061df63 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20978 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 07:19:06 +00:00
Chris Lattner
3071019026 Move the selection of the arms of the select operation up to the conditional
part to make sure we get the side effects and to avoid confusing the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20977 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 07:10:02 +00:00
Chris Lattner
380ae49599 print the machine CFG in the -print-machineinstrs dump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20976 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 06:48:38 +00:00
Nate Begeman
a7e11a4bb5 Fix stores to global addresses
Fix calls with no arguments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20975 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 05:57:17 +00:00
Nate Begeman
04730361b5 Support indexed loads and stores. This drops Shootout/matrix time from
18.8 to 14.8 seconds.  The Pattern ISel is now often faster than the
Simple ISel, esp. on memory intensive code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20973 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 04:45:11 +00:00
Nate Begeman
6b55997df5 Implement FP_TO_SINT and FP_TO_UINT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20972 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 02:59:27 +00:00
Nate Begeman
6d369ccae0 Add support for adding 0.0 and -0.0 to the constant pool, since we lie and
say that we support them, for the purposes of generating fsel instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20970 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 01:08:07 +00:00
Nate Begeman
dffcfccc13 Factor out common code, support FP comparison in folded SetCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20969 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 00:32:34 +00:00
Nate Begeman
3e89716ad7 fsel generation for f32 and f64 select
generate compare immediate for integer compare with constant
fold setcc into branch
fold setcc into select

Code generation quality for Shootout is now on par with the Simple ISel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20968 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-31 23:55:40 +00:00