Commit Graph

13057 Commits

Author SHA1 Message Date
Evan Cheng 70b25efa57 X86ISD::REP_STOS and X86ISD::REP_MOVS now produces a flag.
llvm-svn: 26604
2006-03-07 23:34:23 +00:00
Evan Cheng adc7093fc1 Use rep/stosl; and Count 0x3; rep/stosb for memset with 4 byte aligned dest.
and variable value.
Similarly for memcpy.

llvm-svn: 26603
2006-03-07 23:29:39 +00:00
Chris Lattner 207291fd1a Two things:
1. Don't emit debug info, or other llvm.metadata to the .cbe.c file.
2. Mark static ctors/dtors as such, so that bugpoint works on C++ code
   compiled with the new CFE.

llvm-svn: 26602
2006-03-07 22:58:23 +00:00
Jim Laskey 313570fb17 Use "llvm.metadata" section for debug globals. Filter out these globals in the
asm printer.

llvm-svn: 26599
2006-03-07 22:00:35 +00:00
Jim Laskey 69effa2325 Switch to using a numeric id for anchors.
llvm-svn: 26598
2006-03-07 20:53:47 +00:00
Chris Lattner 7b87fd53f9 Fix ConstantMerge/2006-03-07-DontMergeDiffSections.ll, a problem Jim
hypotheticalized about, where we would incorrectly merge two globals in
different sections.

llvm-svn: 26597
2006-03-07 17:56:59 +00:00
Chris Lattner 907e13c742 add another missing store.
llvm-svn: 26595
2006-03-07 16:26:48 +00:00
Chris Lattner 8c73d80b08 add a couple more load/store instrs, add a newline to the end of file.
llvm-svn: 26594
2006-03-07 16:19:46 +00:00
Jim Laskey 3bad199894 Bitfield support.
llvm-svn: 26593
2006-03-07 15:51:33 +00:00
Nate Begeman 3e3219cc0a This kinda sorta implements "things that have to lead a dispatch group".
llvm-svn: 26591
2006-03-07 08:30:27 +00:00
Chris Lattner 675567f77c add some new instructions to the classifier. With this, we correctly insert
a nop into Freebench/neural, which speeds it up from 136->129s (~5.4%).

llvm-svn: 26590
2006-03-07 07:14:55 +00:00
Chris Lattner 05ad128dca add some comments that describe what we model
llvm-svn: 26588
2006-03-07 06:44:19 +00:00
Chris Lattner 2cab13573c Implement a very very simple hazard recognizer for LSU rejects and ctr set/read
flushes

llvm-svn: 26587
2006-03-07 06:32:48 +00:00
Chris Lattner 0c801bd1cf Fix some formatting, when looking for hazards, prefer target nodes over
things like copyfromreg.

llvm-svn: 26586
2006-03-07 05:40:43 +00:00
Chris Lattner 883cefc656 add a note
llvm-svn: 26585
2006-03-07 04:42:59 +00:00
Chris Lattner bccb0e07f0 add a note
llvm-svn: 26583
2006-03-07 02:46:26 +00:00
Evan Cheng a4a4ceb478 - Emit subsections_via_symbols for Darwin.
- Conditionalize Dwarf debugging output (Darwin only for now).

llvm-svn: 26582
2006-03-07 02:23:26 +00:00
Evan Cheng 30d7b70b73 Enable Dwarf debugging info.
llvm-svn: 26581
2006-03-07 02:02:57 +00:00
Chris Lattner 53ef5a032c Teach the alignment handling code to look through constant expr casts and GEPs
llvm-svn: 26580
2006-03-07 01:28:57 +00:00
Chris Lattner 82f2ef20b6 Teach instcombine to increase the alignment of memset/memcpy/memmove when
the pointer is known to come from either a global variable, alloca or
malloc.  This allows us to compile this:

  P = malloc(28);
  memset(P, 0, 28);

into explicit stores on PPC instead of a memset call.

llvm-svn: 26577
2006-03-06 20:18:44 +00:00
Chris Lattner 01aa752a36 update file comment
llvm-svn: 26573
2006-03-06 17:58:04 +00:00
Evan Cheng a00c61932d Remove some code that doesn't make sense
llvm-svn: 26572
2006-03-06 07:31:44 +00:00
Evan Cheng c5c0658aa6 Remove SUnit::Priority1: it is re-calculated on demand as number of live
range to be generated.

llvm-svn: 26570
2006-03-06 06:08:54 +00:00
Chris Lattner 47639dbb93 Hoist the HazardRecognizer out of the ScheduleDAGList.cpp file to where
targets can implement them.  Make the top-down scheduler non-g5-specific.

Remove the old testing hazard recognizer.

llvm-svn: 26569
2006-03-06 00:22:00 +00:00
Chris Lattner 00b52ea8f9 Comment fixes
llvm-svn: 26567
2006-03-05 23:59:20 +00:00
Chris Lattner 80268aaeed Don't depend on the C99 copysign function, implement it ourselves.
llvm-svn: 26566
2006-03-05 23:57:58 +00:00
Chris Lattner 2d945ba4c7 When a hazard recognizer needs noops to be inserted, do so. This represents
noops as null pointers in the instruction sequence.

llvm-svn: 26564
2006-03-05 23:51:47 +00:00
Chris Lattner ea79d9fd73 implement TII::insertNoop
llvm-svn: 26562
2006-03-05 23:49:55 +00:00
Chris Lattner fa5e1c9c26 Implement G5HazardRecognizer as a trivial thing that wants 5 cycles between
copyfromreg nodes.  Clearly useful!

llvm-svn: 26559
2006-03-05 23:13:56 +00:00
Chris Lattner e50c092b7c Add basic hazard recognizer support. noop insertion isn't complete yet though.
llvm-svn: 26558
2006-03-05 22:45:01 +00:00
Jeff Cohen 55e2aac24b Fix VC++ compilation error.
llvm-svn: 26554
2006-03-05 21:43:37 +00:00
Chris Lattner 98ecb8ec61 Split the list scheduler into top-down and bottom-up pieces. The priority
function of the top-down scheduler are completely bogus currently, and
having (future) PPC specific in this file is also wrong, but this is a
small incremental step.

llvm-svn: 26552
2006-03-05 21:10:33 +00:00
Chris Lattner 7a36d97518 Move the available queue to being inside the ListSchedule method, since it
bounds its lifetime.

llvm-svn: 26550
2006-03-05 20:21:55 +00:00
Chris Lattner 5032c32d30 add a note
llvm-svn: 26549
2006-03-05 20:00:08 +00:00
Chris Lattner bdaf4f38b5 Reinstate this now that the offending opposite xform has been removed.
llvm-svn: 26548
2006-03-05 19:53:55 +00:00
Chris Lattner c726a5c31f Do not fold (add (shl x, c1), (shl c2, c1)) -> (shl (add x, c2), c1),
we want to canonicalize the other way.

llvm-svn: 26547
2006-03-05 19:52:57 +00:00
Chris Lattner c610e62e46 print arbitrary constant pool entries
llvm-svn: 26545
2006-03-05 09:38:03 +00:00
Evan Cheng d428e22c07 Back out fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2) for now.
It's causing an infinite loop compiling ldecod on x86 / Darwin.

llvm-svn: 26544
2006-03-05 07:30:16 +00:00
Chris Lattner 3bc4050217 Add some simple copysign folds
llvm-svn: 26543
2006-03-05 05:30:57 +00:00
Chris Lattner 5c1ba2ac08 Codegen copysign[f] into a FCOPYSIGN node
llvm-svn: 26542
2006-03-05 05:09:38 +00:00
Chris Lattner 9c7f50376a Copysign needs to be expanded everywhere. Note that Alpha and IA64 should
implement copysign as a native op if they have it.

llvm-svn: 26541
2006-03-05 05:08:37 +00:00
Chris Lattner c2dd7aae71 add a note for something evan noticed
llvm-svn: 26539
2006-03-05 01:15:18 +00:00
Chris Lattner 6bc98653c2 Make vector narrowing more effective, implementing
Transforms/InstCombine/vec_narrow.ll.  This add support for narrowing
extract_element(insertelement) also.

llvm-svn: 26538
2006-03-05 00:22:33 +00:00
Chris Lattner 8d8b4cf63d Implemented.
llvm-svn: 26536
2006-03-04 23:33:44 +00:00
Chris Lattner f29f5204cc fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)

This allows us to compile CodeGen/PowerPC/addi-reassoc.ll into:

_test1:
        slwi r2, r4, 4
        add r2, r2, r3
        lwz r3, 36(r2)
        blr
_test2:
        mulli r2, r4, 5
        add r2, r2, r3
        lbz r2, 11(r2)
        extsb r3, r2
        blr

instead of:

_test1:
        addi r2, r4, 2
        slwi r2, r2, 4
        add r2, r3, r2
        lwz r3, 4(r2)
        blr
_test2:
        addi r2, r4, 2
        mulli r2, r2, 5
        add r2, r3, r2
        lbz r2, 1(r2)
        extsb r3, r2
        blr

llvm-svn: 26535
2006-03-04 23:33:26 +00:00
Chris Lattner 3e19c23765 Fix a crash compiling Obsequi
llvm-svn: 26529
2006-03-04 21:48:01 +00:00
Chris Lattner 4c065091d8 Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).
Testcase here: Transforms/Reassociate/mulfactor.ll

llvm-svn: 26524
2006-03-04 09:31:13 +00:00
Chris Lattner c9a318d8fa Add a note
llvm-svn: 26523
2006-03-04 08:44:51 +00:00
Chris Lattner adf5ec6f96 Regenerate
llvm-svn: 26522
2006-03-04 07:53:41 +00:00
Chris Lattner a33bcff313 Don't use invalidated iterators!
llvm-svn: 26521
2006-03-04 07:53:16 +00:00