Nuno Lopes [Tue, 2 Sep 2008 12:06:08 +0000 (12:06 +0000)]
plug memleak: destroy internal buffer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55632
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 2 Sep 2008 11:30:10 +0000 (11:30 +0000)]
plug a little memleak in verifyFunction()
# first commit to llvm, so whatch out :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55631
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 2 Sep 2008 09:51:00 +0000 (09:51 +0000)]
Revert r55557, it is causing linking failures on 32bit linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55628
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Sep 2008 08:14:01 +0000 (08:14 +0000)]
MMI may be null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55626
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Sep 2008 07:49:03 +0000 (07:49 +0000)]
Add Mac OS X compatible JIT callback routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55625
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Sep 2008 06:52:38 +0000 (06:52 +0000)]
Revamp ARM JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55624
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Sep 2008 06:51:36 +0000 (06:51 +0000)]
Change getBinaryCodeForInstr prototype. First operand MachineInstr& should be const. Make corresponding changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55623
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Mon, 1 Sep 2008 15:10:19 +0000 (15:10 +0000)]
Provide two overloads of AnalyzeNewNode.
The first can update the SDNode in an SDValue
while the second is called with SDNode* and
returns a possibly updated SDNode*.
This patch has no intended functional impact,
but helps eliminating ugly temporary SDValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55608
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 1 Sep 2008 13:11:13 +0000 (13:11 +0000)]
Even though no caller actually uses the new value
(what matters is that it is added to the worklist),
it seems more logical to return it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55606
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 1 Sep 2008 12:00:55 +0000 (12:00 +0000)]
Turn this legalize types test on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55605
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 1 Sep 2008 11:40:11 +0000 (11:40 +0000)]
Add a small pass that sets the readnone/readonly
attributes on functions, based on the result of
alias analysis. It's not hardwired to use
GlobalsModRef even though this is the only (AFAIK)
alias analysis that results in this pass actually
doing something. Enable as follows:
opt ... -globalsmodref-aa -markmodref ...
Advantages of this pass: (1) records the result
of globalsmodref in the bitcode, meaning it is
available for use by later passes (currently
the pass manager isn't smart enough to magically
make an advanced alias analysis available to all
later passes), which may expose more optimization
opportunities; (2) hopefully speeds up compilation
when code is optimized twice, for example when a
file is compiled to bitcode, then later LTO is done
on it: marking functions readonly/readnone when
producing the initial bitcode should speed up alias
analysis during LTO; (3) good for discovering that
globalsmodref doesn't work very well :)
Not currently turned on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55604
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 08:25:56 +0000 (08:25 +0000)]
Control flow instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55601
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 07:48:18 +0000 (07:48 +0000)]
ldm / stm instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55599
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 07:34:13 +0000 (07:34 +0000)]
AXI2 and AXI3 instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55598
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 07:19:00 +0000 (07:19 +0000)]
Reorganize instruction formats again; AXI1 encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55597
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 07:00:14 +0000 (07:00 +0000)]
addrmode3 instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 01:51:14 +0000 (01:51 +0000)]
Reorganize some instruction format definitions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55594
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Sep 2008 01:27:33 +0000 (01:27 +0000)]
Rest of addrmode2 instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55593
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 31 Aug 2008 19:02:21 +0000 (19:02 +0000)]
Addr2 word / byte load encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55591
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 31 Aug 2008 18:32:16 +0000 (18:32 +0000)]
Addr1 instructions opcodes are encoded in bits 21-24; encode S bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55590
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sun, 31 Aug 2008 15:37:04 +0000 (15:37 +0000)]
fix a bunch of 80-col violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55588
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 02:59:23 +0000 (02:59 +0000)]
Revert the "XFAIL" for the rotate_ops.ll testcase. Instead, mark ISD::ROTR
instructions in CellSPU as "Expand" so that they won't be generated. I added a
"FIXME" so that this hack can be addressed and reverted once ISD::ROTR is
supported in the .td files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55582
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 02:53:19 +0000 (02:53 +0000)]
Expand for ROTR with MVT::i64.
Dale, Could you please review this?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55581
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 02:32:12 +0000 (02:32 +0000)]
CellSPU doesn't appear to support fully the "ISD::ROTR" operation. The DAG
combiner can now generate ROTR if the backend says that it can handle it. Cell
SPU says this, but gets an error from code gen saying that it can't select
ROTR. I'm xfailing this test until this can be fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55579
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 02:30:23 +0000 (02:30 +0000)]
Cosmetic changes to Machine LICM. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55578
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 01:13:31 +0000 (01:13 +0000)]
Another situation where ROTR is cheaper than ROTL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55577
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 01:04:56 +0000 (01:04 +0000)]
For this pattern, ROTR is the cheaper option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55576
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 31 Aug 2008 00:37:27 +0000 (00:37 +0000)]
- Fix comment so that it describes how the code really works:
// fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) ->
// (rotl x, y)
// fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) ->
// (rotr x, (sub 32, y))
Example: (x == 0xDEADBEEF and y == 4)
(x << 4) | (x >> 28)
=> 0xEADBEEF0 | 0x0000000D
=> 0xEADBEEFD
(rotl x, 4)
=> 0xEADBEEFD
(rotr x, 28)
=> 0xEADBEEFD
- Fix comment and code for second version. It wasn't using the rot* propertly.
// fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) ->
// (rotr x, y)
// fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) ->
// (rotl x, (sub 32, y))
(x << 28) | (x >> 4)
=> 0xD0000000 | 0x0DEADBEE
=> 0xDDEADBEE
(rotl x, 4)
=> 0xEADBEEFD
(rotr x, 28)
=> (0xEADBEEFD)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55575
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sat, 30 Aug 2008 22:16:05 +0000 (22:16 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55574
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sat, 30 Aug 2008 19:29:20 +0000 (19:29 +0000)]
fix some 80-col violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55571
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sat, 30 Aug 2008 16:34:54 +0000 (16:34 +0000)]
PR2731: C and Ocaml bindings for setTailCall and isTailCall.
Based on patch by Giorgos Korfiatis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55570
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sat, 30 Aug 2008 15:41:51 +0000 (15:41 +0000)]
Fix ConstantExpr::getInsertElement.
Breakage was exposed in the Ocaml bindings tests after Chris
uncommented an assertion in r55084.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55566
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sat, 30 Aug 2008 10:09:02 +0000 (10:09 +0000)]
fix some 80-col violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55565
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 30 Aug 2008 09:09:33 +0000 (09:09 +0000)]
Re-apply 55467 with fix. If copy is being replaced by remat'ed def, transfer the implicit defs onto the remat'ed instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55564
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 30 Aug 2008 09:07:18 +0000 (09:07 +0000)]
Fold isRematerializable checks into isSafeToReMat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55563
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 30 Aug 2008 08:54:22 +0000 (08:54 +0000)]
For now, can't mark XOR64rr isAsCheapAsAMove. It's technically correct. But various passes cannot handle remating these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55562
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 30 Aug 2008 02:03:58 +0000 (02:03 +0000)]
Transform (x << (y&31)) -> (x << y). This takes advantage of the fact x86 shift instructions 2nd operand (shift count) is limited to 0 to 31 (or 63 in the x86-64 case).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55558
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 30 Aug 2008 01:16:19 +0000 (01:16 +0000)]
Enable -fvisibility-inlines-hidden by default for compilers which
support it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55557
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sat, 30 Aug 2008 00:54:31 +0000 (00:54 +0000)]
Testcases for ppc atomics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55556
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 30 Aug 2008 00:38:46 +0000 (00:38 +0000)]
Fix an issue where a use might be selected before a def, and then we didn't respect the pre-chosen vreg
assignment when selecting the def. This is the naive solution to the problem: insert a copy to the pre-chosen
vreg. Other solutions might be preferable, such as:
1) Passing the dest reg into FastEmit_. However, this would require the higher level code to know about reg classes, which they don't currently.
2) Selecting blocks in reverse postorder. This has some compile time cost for computing the order, and we'd need to measure its impact.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55555
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sat, 30 Aug 2008 00:08:53 +0000 (00:08 +0000)]
Add ppc partial-word ATOMIC_CMP_SWAP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55554
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 23:22:12 +0000 (23:22 +0000)]
Swap fp comparison operands and change predicate to allow load folding (safely this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55553
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 23:21:31 +0000 (23:21 +0000)]
Use static_cast instead of C style cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55552
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 23:20:46 +0000 (23:20 +0000)]
Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55551
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 22:59:13 +0000 (22:59 +0000)]
xfail this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55550
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 22:21:44 +0000 (22:21 +0000)]
Back out 55498. It broken Apple style bootstrapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55549
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 22:13:21 +0000 (22:13 +0000)]
Backing out 55521. Not safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55548
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 29 Aug 2008 18:29:46 +0000 (18:29 +0000)]
Add partial word version of ATOMIC_SWAP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55546
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 29 Aug 2008 17:45:56 +0000 (17:45 +0000)]
Add initial support for fast isel of instructions that have inputs pinned to physical registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55545
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Aug 2008 17:20:18 +0000 (17:20 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55542
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Aug 2008 17:19:30 +0000 (17:19 +0000)]
Asmprint nameless instructions as:
%4 = add ...
instead of:
add ... ; 4
This makes opt -print-cfg output actually usable and makes .ll files
generally easier to read. This fixes PR2480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55541
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Aug 2008 17:18:26 +0000 (17:18 +0000)]
allow this to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55540
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Aug 2008 17:12:13 +0000 (17:12 +0000)]
Add support for parsing .ll files that have numbers in front of
nameless values, such as:
%3 = add i32 4, 2
This fixes the first half of PR2480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55539
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 07:42:03 +0000 (07:42 +0000)]
TableGen'ing instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55533
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 07:40:52 +0000 (07:40 +0000)]
addrmode1 (data processing) instruction encoding: bits 5-6 are 0, bits 7-10 encode the opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55531
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 07:36:24 +0000 (07:36 +0000)]
MVN is addrmode1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55530
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Aug 2008 07:30:15 +0000 (07:30 +0000)]
Add GlobalValue::{removeFromParent,eraseFromParent}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55529
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 Aug 2008 06:41:12 +0000 (06:41 +0000)]
More refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55528
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Aug 2008 00:48:44 +0000 (00:48 +0000)]
Add DenseMap::lookup:
/// lookup - Return the entry for the specified key, or a default
/// constructed value if no such entry exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55523
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 Aug 2008 23:48:31 +0000 (23:48 +0000)]
Swap fp comparison operands and change predicate to allow load folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55521
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 Aug 2008 23:39:26 +0000 (23:39 +0000)]
Refactor ARM instruction format definitions into a separate file. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55518
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 23:21:34 +0000 (23:21 +0000)]
Add a target callback for FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55512
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 28 Aug 2008 23:19:51 +0000 (23:19 +0000)]
remove tabs, fix > 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55511
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Aug 2008 23:16:37 +0000 (23:16 +0000)]
Add another description to my entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55510
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 28 Aug 2008 23:15:28 +0000 (23:15 +0000)]
just a brain dump for a small tool
that brings us to 80-col violations
or tabs.
Usage:
visit-violations <file>
At the moment it outputs editor invocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55509
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Aug 2008 22:56:53 +0000 (22:56 +0000)]
rename destroy -> releaseMemory to properly hook into passmgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55508
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Thu, 28 Aug 2008 22:34:49 +0000 (22:34 +0000)]
Add support for JIT exceptions on Darwin. Since we're dealing with libgcc,
whose darwin code was written after the ability to dynamically register frames,
we need to do special hacks to make things work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55507
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 28 Aug 2008 22:32:39 +0000 (22:32 +0000)]
fix the output dumbness I have introduced some time ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55506
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 28 Aug 2008 21:40:38 +0000 (21:40 +0000)]
erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55504
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 21:19:07 +0000 (21:19 +0000)]
Implement null and undef values for FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55500
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 28 Aug 2008 21:04:05 +0000 (21:04 +0000)]
In lowering SELECT_CC, removed cases where we can't flip the true and false when the compare value has a NaN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55499
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 21:01:56 +0000 (21:01 +0000)]
Optimize DAGCombiner's worklist processing. Previously it started
its work by putting all nodes in the worklist, requiring a big
dynamic allocation. Now, DAGCombiner just iterates over the AllNodes
list and maintains a worklist for nodes that are newly created or
need to be revisited. This allows the worklist to stay small in most
cases, so it can be a SmallVector.
This has the side effect of making DAGCombine not miss a folding
opportunity in alloca-align-rounding.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55498
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 20:38:18 +0000 (20:38 +0000)]
Move CaseBlock, JumpTable, and BitTestBlock to be members of
SelectionDAGLowering instead of being in an anonymous namespace.
This fixes warnings about SelectionDAGLowering having fields
using anonymous namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55497
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 20:28:56 +0000 (20:28 +0000)]
Fix a FastISel bug where the instructions from lowering the arguments
were being emitted after the first instructions of the entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55496
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Aug 2008 18:32:53 +0000 (18:32 +0000)]
Use resize instead of reserve. Reserve doesn't change size().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Aug 2008 18:29:58 +0000 (18:29 +0000)]
Reduce the size of the Parts vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55483
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 28 Aug 2008 18:26:01 +0000 (18:26 +0000)]
Hook up support for fast-isel of trunc instructions, using the newly working support for EXTRACT_SUBREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55482
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 28 Aug 2008 18:06:12 +0000 (18:06 +0000)]
Add support for fast-isel of opcodes that require use of extract_subreg. Because of how extract_subreg is treated, it requires special case handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55480
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 28 Aug 2008 17:53:09 +0000 (17:53 +0000)]
Implement partial-word binary atomics on ppc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55478
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 28 Aug 2008 17:47:37 +0000 (17:47 +0000)]
FastEmitInst_extractsubreg doesn't need to be passed the register class. It can get it from MachineRegisterInfo instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55476
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 17:22:54 +0000 (17:22 +0000)]
Revert r55467; it causes regressions in UnitTests/Vector/divides,
Benchmarks/sim/sim, and others on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55475
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Aug 2008 14:24:45 +0000 (14:24 +0000)]
Correctly resize the Parts array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55471
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 Aug 2008 07:53:51 +0000 (07:53 +0000)]
If a copy isn't coalesced, but its src is defined by trivial computation. Re-materialize the src to replace the copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55467
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 Aug 2008 07:52:25 +0000 (07:52 +0000)]
FsFLD0S{S|D} and V_SETALLONES are as cheap as moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Aug 2008 04:02:44 +0000 (04:02 +0000)]
Make the verifier reject instructions which have null pointers
for operands: rdar://
6179606. no testcase, because I can't write
a .ll file that is this broken ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55460
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Aug 2008 03:33:03 +0000 (03:33 +0000)]
Clear the intervals list in "destroy", patch by
Prakash Prabhu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55458
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 28 Aug 2008 02:44:49 +0000 (02:44 +0000)]
Split the ATOMIC NodeType's to include the size, e.g.
ATOMIC_LOAD_ADD_{8,16,32,64} instead of ATOMIC_LOAD_ADD.
Increased the Hardcoded Constant OpActionsCapacity to match.
Large but boring; no functional change.
This is to support partial-word atomics on ppc; i8 is
not a valid type there, so by the time we get to lowering, the
ATOMIC_LOAD nodes looks the same whether the type was i8 or i32.
The information can be added to the AtomicSDNode, but that is the
largest SDNode; I don't fully understand the SDNode allocation,
but it is sensitive to the largest node size, so increasing
that must be bad. This is the alternative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55457
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 28 Aug 2008 01:51:09 +0000 (01:51 +0000)]
This test crashes on non-x86 host; make SSE explicit.
Feel free to fix a better way!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55456
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 00:20:07 +0000 (00:20 +0000)]
Fix a missing #include. Patch by Andrew John Hughes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55451
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 23:52:12 +0000 (23:52 +0000)]
Reorganize the lifetimes of the major objects SelectionDAGISel
works with.
SelectionDAG, FunctionLoweringInfo, and SelectionDAGLowering
objects now get created once per SelectionDAGISel instance, and
can be reused across blocks and across functions. Previously,
they were created and destroyed each time they were needed.
This reorganization simplifies the handling of PHI nodes, and
also SwitchCases, JumpTables, and BitTestBlocks. This
simplification has the side effect of fixing a bug in FastISel
where successor PHI nodes weren't being updated correctly.
This is also a step towards making the transition from FastISel
into and out of SelectionDAG faster, and also making
plain SelectionDAG faster on code with lots of little blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55450
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Aug 2008 22:30:02 +0000 (22:30 +0000)]
Add a helper method that will be used to support EXTRACT_SUBREG for selecting trunc's in fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55439
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Aug 2008 21:32:04 +0000 (21:32 +0000)]
Make "movdq2q" and "movq2dq" dependent upon having SSE2 because they use the
SSE2 registers as well as the MMX registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55436
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Aug 2008 21:10:13 +0000 (21:10 +0000)]
Put file scoped constants in an anonymous namespace. Use the "using namespace
llvm" for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55435
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Aug 2008 20:58:54 +0000 (20:58 +0000)]
Move the check whether it's worth remating to caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55434
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 20:55:23 +0000 (20:55 +0000)]
Do not apply the transformation if the target does not support DestTy natively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55433
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 20:51:49 +0000 (20:51 +0000)]
Backout 55429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55432
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 20:41:38 +0000 (20:41 +0000)]
Fix FastISel's bitcast code for the case where getRegForValue fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55431
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Aug 2008 20:33:50 +0000 (20:33 +0000)]
Refactor isSafeToReMat out of 2addr pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55430
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 20:00:27 +0000 (20:00 +0000)]
Add facility to create a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55429
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Aug 2008 18:58:30 +0000 (18:58 +0000)]
Use TargetLowering to get the types in fast isel, which handles pointer types correctly for our purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55428
91177308-0d34-0410-b5e6-
96231b3b80d8