oota-llvm.git
14 years agoSplit A8/A9 itins - they already were too big.
Anton Korobeynikov [Wed, 7 Apr 2010 18:22:11 +0000 (18:22 +0000)]
Split A8/A9 itins - they already were too big.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100672 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd some crude itin approximation for VFP load / stores on A9
Anton Korobeynikov [Wed, 7 Apr 2010 18:22:03 +0000 (18:22 +0000)]
Add some crude itin approximation for VFP load / stores on A9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100671 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd some crude approximation for neon load/store instructions
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:58 +0000 (18:21 +0000)]
Add some crude approximation for neon load/store instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100670 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd some A8-based approximation for instructions with unknown cycle times
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:52 +0000 (18:21 +0000)]
Add some A8-based approximation for instructions with unknown cycle times

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100669 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove NEON-VFP domain fixer upper, so post-RA scheduler would benefit from it.
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:46 +0000 (18:21 +0000)]
Move NEON-VFP domain fixer upper, so post-RA scheduler would benefit from it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100668 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSince tblgen bug was fixed (thanks Jakob!) we don't need InstrStage2 hack anymore.
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:41 +0000 (18:21 +0000)]
Since tblgen bug was fixed (thanks Jakob!) we don't need InstrStage2 hack anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100667 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix A8 FP NEON MAC itins
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:33 +0000 (18:21 +0000)]
Fix A8 FP NEON MAC itins

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100666 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoA9 NEON FP itins
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:27 +0000 (18:21 +0000)]
A9 NEON FP itins

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100665 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSome permute goodness for A9
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:22 +0000 (18:21 +0000)]
Some permute goodness for A9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100664 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore shift itins for A9
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:16 +0000 (18:21 +0000)]
More shift itins for A9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100663 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore fixes for itins
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:10 +0000 (18:21 +0000)]
More fixes for itins

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100662 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix invalid itins for 32-bit varians of VMLAL and friends
Anton Korobeynikov [Wed, 7 Apr 2010 18:21:04 +0000 (18:21 +0000)]
Fix invalid itins for 32-bit varians of VMLAL and friends

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100661 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd MAC stuff for A9
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:58 +0000 (18:20 +0000)]
Add MAC stuff for A9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100660 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix invalid NEON MAC itins on A8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:53 +0000 (18:20 +0000)]
Fix invalid NEON MAC itins on A8

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100659 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix itins for VPAL
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:47 +0000 (18:20 +0000)]
Fix itins for VPAL

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100658 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix itins for VABA
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:42 +0000 (18:20 +0000)]
Fix itins for VABA

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100657 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrect VMVN itinerary: operand is read in the second cycle, not in the first.
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:36 +0000 (18:20 +0000)]
Correct VMVN itinerary: operand is read in the second cycle, not in the first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100656 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore A9 itineraries
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:29 +0000 (18:20 +0000)]
More A9 itineraries

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100655 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrect itinerary class for VPADD
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:24 +0000 (18:20 +0000)]
Correct itinerary class for VPADD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100654 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVP{MAX, MIN} are of IIC_VSUBi4D itin class as well.
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:18 +0000 (18:20 +0000)]
VP{MAX, MIN} are of IIC_VSUBi4D itin class as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100653 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVHADD differs from VHSUB at least on A9 - the former reads both operands in the secon...
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:13 +0000 (18:20 +0000)]
VHADD differs from VHSUB at least on A9 - the former reads both operands in the second cycle, while the latter reads second operand in first cycle. Introduce new itin classes to catch this behavior. Whether this is true for A8 as well is WIP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100652 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSome easy NEON scheduling goodness for A9
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:07 +0000 (18:20 +0000)]
Some easy NEON scheduling goodness for A9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100651 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDefine new itin classes for ARM <-> VFP reg moves to distinguish from NEON ops. Defin...
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:02 +0000 (18:20 +0000)]
Define new itin classes for ARM <-> VFP reg moves to distinguish from NEON ops. Define proper scheduling itinerary for them on A9. A8 TRM does not specify latency for them at all :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100650 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFCONST{S,D} behaves the same way as FP unary instructions. This is true for both...
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:56 +0000 (18:19 +0000)]
FCONST{S,D} behaves the same way as FP unary instructions. This is true for both A8 and A9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100649 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProper cycle times for locks, since wbck latency can be larger than fwd latency.
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:51 +0000 (18:19 +0000)]
Proper cycle times for locks, since wbck latency can be larger than fwd latency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100648 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd new itin classes for FP16 <-> FP32 conversions and make uise of them for A9.
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:46 +0000 (18:19 +0000)]
Add new itin classes for FP16 <-> FP32 conversions and make uise of them for A9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100647 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake use of new reserved/required scheduling stuff: introduce VFP and NEON locks...
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:40 +0000 (18:19 +0000)]
Make use of new reserved/required scheduling stuff: introduce VFP and NEON locks to model domain cross stalls precisly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100646 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitial support for different kinds of FU reservation.
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:32 +0000 (18:19 +0000)]
Initial support for different kinds of FU reservation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100645 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFactor out scoreboard into separate class. This way we might have several different...
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:24 +0000 (18:19 +0000)]
Factor out scoreboard into separate class. This way we might have several different score boards.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100644 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSome bits of A9 scheduling: VFP
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:18 +0000 (18:19 +0000)]
Some bits of A9 scheduling: VFP

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100643 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSeparate const from non-const stuff during mergeing
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:13 +0000 (18:19 +0000)]
Separate const from non-const stuff during mergeing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100642 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSome initial version of global merger
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:07 +0000 (18:19 +0000)]
Some initial version of global merger

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100641 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd hook to insert late LLVM=>LLVM passes just before isel
Anton Korobeynikov [Wed, 7 Apr 2010 18:18:42 +0000 (18:18 +0000)]
Add hook to insert late LLVM=>LLVM passes just before isel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100640 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix 80 col violation, patch by Alastair Lynn
Chris Lattner [Wed, 7 Apr 2010 18:13:33 +0000 (18:13 +0000)]
fix 80 col violation, patch by Alastair Lynn

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100639 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a comment line that got dropped
Chris Lattner [Wed, 7 Apr 2010 18:10:38 +0000 (18:10 +0000)]
add a comment line that got dropped

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100638 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agothis has a pr!
Chris Lattner [Wed, 7 Apr 2010 18:04:56 +0000 (18:04 +0000)]
this has a pr!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100637 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a latent bug my inline asm stuff exposed:
Chris Lattner [Wed, 7 Apr 2010 18:03:19 +0000 (18:03 +0000)]
fix a latent bug my inline asm stuff exposed:
MachineOperand::isIdenticalTo wasn't handling metadata operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100636 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused method.
Benjamin Kramer [Wed, 7 Apr 2010 11:23:46 +0000 (11:23 +0000)]
Remove unused method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100620 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWorkaround the breakage in r100616 by guarding all timers with
Torok Edwin [Wed, 7 Apr 2010 10:44:46 +0000 (10:44 +0000)]
Workaround the breakage in r100616 by guarding all timers with
TimePassesIsEnabled. This should allow make check to pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100618 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse the "NamedGroupTimer" class to categorize DWARF emission better.
Bill Wendling [Wed, 7 Apr 2010 09:28:04 +0000 (09:28 +0000)]
Use the "NamedGroupTimer" class to categorize DWARF emission better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100616 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse raw_ostream.
Benjamin Kramer [Wed, 7 Apr 2010 09:26:51 +0000 (09:26 +0000)]
Use raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100615 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove XFAIL for vg_leak as the leaks are fixed by 100601.
Sanjiv Gupta [Wed, 7 Apr 2010 07:06:48 +0000 (07:06 +0000)]
Remove XFAIL for vg_leak as the leaks are fixed by 100601.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100612 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate langref for memcpy, memmove, and memset
Mon P Wang [Wed, 7 Apr 2010 06:35:53 +0000 (06:35 +0000)]
Update langref for memcpy, memmove, and memset

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100611 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comments for missed opportunities.
Evan Cheng [Wed, 7 Apr 2010 06:00:33 +0000 (06:00 +0000)]
Add comments for missed opportunities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100610 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typo.
Evan Cheng [Wed, 7 Apr 2010 05:59:12 +0000 (05:59 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100609 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHave the inst emitter add the !srcloc mdnode to the machine instr.
Chris Lattner [Wed, 7 Apr 2010 05:38:05 +0000 (05:38 +0000)]
Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present.  Document this nonsense in langref.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100607 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove another magic number.
Chris Lattner [Wed, 7 Apr 2010 05:27:36 +0000 (05:27 +0000)]
remove another magic number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100606 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThree changes:
Chris Lattner [Wed, 7 Apr 2010 05:20:54 +0000 (05:20 +0000)]
Three changes:
1. Introduce some enums and accessors in the InlineAsm class
   that eliminate a ton of magic numbers when handling inline
   asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
   a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
   metadata, propagating it to the instruction emitter, which
   drops it.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100605 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a crash on invalid metadata, e.g.: call i32 @foo(), XXXX
Chris Lattner [Wed, 7 Apr 2010 04:08:57 +0000 (04:08 +0000)]
fix a crash on invalid metadata, e.g.:  call i32 @foo(), XXXX

We would return the error without inserting the new instruction
into the program, so it wouldn't get deallocated, and an abort
would trigger when the module was deleted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100602 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix memory leaks for external symbol name strings.
Sanjiv Gupta [Wed, 7 Apr 2010 03:36:01 +0000 (03:36 +0000)]
Fix memory leaks for external symbol name strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100601 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClean up some signedness oddities in this code noticed by clang.
John McCall [Wed, 7 Apr 2010 01:49:15 +0000 (01:49 +0000)]
Clean up some signedness oddities in this code noticed by clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100599 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove printing of target-indepedent DEBUG_VALUE comments
Dale Johannesen [Wed, 7 Apr 2010 01:15:14 +0000 (01:15 +0000)]
Move printing of target-indepedent DEBUG_VALUE comments
into AsmPrinter.  Target-dependent form is still generated
by FastISel and still handled in X86 code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100596 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPost regalloc LICM. Work in progress.
Evan Cheng [Wed, 7 Apr 2010 00:41:17 +0000 (00:41 +0000)]
Post regalloc LICM. Work in progress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100592 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDo not emit specification DIE with DW_AT_specification attribute for member functions...
Devang Patel [Tue, 6 Apr 2010 23:53:48 +0000 (23:53 +0000)]
Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar 7833483.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100586 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLet that which does not matter truly slide.
Jakob Stoklund Olesen [Tue, 6 Apr 2010 23:44:44 +0000 (23:44 +0000)]
Let that which does not matter truly slide.

This test only cares about alignment, so don't test for other cruft.
An upcoming llvm-gcc patch needs this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100584 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a number of clang -Wsign-compare warnings that didn't have an obvious
John McCall [Tue, 6 Apr 2010 23:35:53 +0000 (23:35 +0000)]
Fix a number of clang -Wsign-compare warnings that didn't have an obvious
solution.  The only reason these don't fire with gcc-4.2 is that gcc turns off
part of -Wsign-compare in C++ on accident.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100581 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 100573, it's causing some testsuite problems.
Dale Johannesen [Tue, 6 Apr 2010 22:45:26 +0000 (22:45 +0000)]
Revert 100573, it's causing some testsuite problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100578 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove printing of DEBUG_VALUE comments to target-independent place.
Dale Johannesen [Tue, 6 Apr 2010 22:21:07 +0000 (22:21 +0000)]
Move printing of DEBUG_VALUE comments to target-independent place.
There is probably a more elegant way to do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100573 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExpand SELECT and SELECT_CC for NEON vector types.
Bob Wilson [Tue, 6 Apr 2010 22:02:24 +0000 (22:02 +0000)]
Expand SELECT and SELECT_CC for NEON vector types.
Radar 7770501.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100568 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow for the possibility that a debug-value points
Dale Johannesen [Tue, 6 Apr 2010 21:59:56 +0000 (21:59 +0000)]
Allow for the possibility that a debug-value points
to a SDNode that didn't have code generated for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100566 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReverting 100530 & 100531 due to regressions in the GDB test suite.
Stuart Hastings [Tue, 6 Apr 2010 21:38:29 +0000 (21:38 +0000)]
Reverting 100530 & 100531 due to regressions in the GDB test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100563 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR6696 and PR6663
Jim Grosbach [Tue, 6 Apr 2010 20:26:37 +0000 (20:26 +0000)]
Fix PR6696 and PR6663

When a frame pointer is not otherwise required, and dynamic stack alignment
is necessary solely due to the spilling of a register with larger alignment
requirements than the default stack alignment, the frame pointer can be both
used as a general purpose register and a frame pointer. That goes poorly, for
obvious reasons. This patch brings back a bit of old logic for identifying
the use of such registers and conservatively reserves the frame pointer
during register allocation in such cases.

For now, implement for X86 only since it's 32-bit linux which is hitting this,
and we want a targeted fix for 2.7. As a follow-on, this will be expanded
to handle other targets, as theoretically the problem could arise elsewhere
as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100559 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake this hack more specific to the Apple gcc 4.2 non-LLVM compiler.
Bill Wendling [Tue, 6 Apr 2010 20:07:21 +0000 (20:07 +0000)]
Make this hack more specific to the Apple gcc 4.2 non-LLVM compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100556 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't try to collapse DomainValues onto an incompatible SSE domain.
Jakob Stoklund Olesen [Tue, 6 Apr 2010 19:48:56 +0000 (19:48 +0000)]
Don't try to collapse DomainValues onto an incompatible SSE domain.
This fixes the Bullet regression on i386/nocona.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100553 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: get rid of repeated dereferencing of use_iterator by caching its result
Gabor Greif [Tue, 6 Apr 2010 19:32:30 +0000 (19:32 +0000)]
performance: get rid of repeated dereferencing of use_iterator by caching its result

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100550 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomake more two predicates constant
Gabor Greif [Tue, 6 Apr 2010 19:24:18 +0000 (19:24 +0000)]
make more two predicates constant

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100549 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: get rid of repeated dereferencing of use_iterator by caching its result
Gabor Greif [Tue, 6 Apr 2010 19:14:05 +0000 (19:14 +0000)]
performance: get rid of repeated dereferencing of use_iterator by caching its result

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100547 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoconst-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal
Gabor Greif [Tue, 6 Apr 2010 18:58:22 +0000 (18:58 +0000)]
const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100546 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse CallSite to access calls vs. invokes uniformly
Gabor Greif [Tue, 6 Apr 2010 18:45:08 +0000 (18:45 +0000)]
use CallSite to access calls vs. invokes uniformly
and remove assumptions about operand order

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100544 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agothis accessor doesn't need to copy the string.
Chris Lattner [Tue, 6 Apr 2010 18:37:22 +0000 (18:37 +0000)]
this accessor doesn't need to copy the string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100542 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoenhance SMDiagnostic to also maintain a pointer to the SourceMgr.
Chris Lattner [Tue, 6 Apr 2010 18:06:18 +0000 (18:06 +0000)]
enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
Add a simplified constructor for clients that don't have locations
like "file not found" errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100538 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCode clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.
Evan Cheng [Tue, 6 Apr 2010 17:19:55 +0000 (17:19 +0000)]
Code clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100532 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevise debug info machinery to digest nested functions and classes.
Stuart Hastings [Tue, 6 Apr 2010 17:19:32 +0000 (17:19 +0000)]
Revise debug info machinery to digest nested functions and classes.

A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function.  GCC presents the innermost
function to llvm-convert first.  Heretofore, the debug info mistakenly
placed the inner function at module scope.  This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested.  Radar 7426545.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100530 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdding SAFECode to the list of projects that work with LLVM 2.7.
John Criswell [Tue, 6 Apr 2010 14:52:14 +0000 (14:52 +0000)]
Adding SAFECode to the list of projects that work with LLVM 2.7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100525 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove assert to treat memmove and memset like memcpy
Mon P Wang [Tue, 6 Apr 2010 08:27:51 +0000 (08:27 +0000)]
Remove assert to treat memmove and memset like memcpy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100521 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse a ManagedCleanup to prevent leaking the PassRegistrar map. In breaks the
Owen Anderson [Tue, 6 Apr 2010 04:20:48 +0000 (04:20 +0000)]
Use a ManagedCleanup to prevent leaking the PassRegistrar map.  In breaks the
use case where someone wants to resurrect LLVM after calling llvm_shutdown,
but I'm not aware of any clients that are affected by this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100519 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid overflowing a signed integer which triggers undefined behaviour.
Jakob Stoklund Olesen [Tue, 6 Apr 2010 03:12:43 +0000 (03:12 +0000)]
Avoid overflowing a signed integer which triggers undefined behaviour.
Overflowing an unsigned integer is fine and behaves as you would expect.
Also fix a pasto, allowing SignExtend64 to take a 64-bit argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100517 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a const qualifier.
Dan Gohman [Tue, 6 Apr 2010 01:31:12 +0000 (01:31 +0000)]
Add a const qualifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100515 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopropagate cookie management out one layer of function calls.
Chris Lattner [Tue, 6 Apr 2010 00:58:50 +0000 (00:58 +0000)]
propagate cookie management out one layer of function calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100510 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreport errors through LLVMContext's inline asm handler if available.
Chris Lattner [Tue, 6 Apr 2010 00:55:39 +0000 (00:55 +0000)]
report errors through LLVMContext's inline asm handler if available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100509 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGive MachineModuleInfo an actual Module*.
Chris Lattner [Tue, 6 Apr 2010 00:51:52 +0000 (00:51 +0000)]
Give MachineModuleInfo an actual Module*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100508 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agogive LLVMContext an inline asm diagnostic hook member.
Chris Lattner [Tue, 6 Apr 2010 00:44:45 +0000 (00:44 +0000)]
give LLVMContext an inline asm diagnostic hook member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100506 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unnecessary include.
Devang Patel [Tue, 6 Apr 2010 00:38:32 +0000 (00:38 +0000)]
Remove unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100505 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agogive the SourceMgr object a cookie.
Chris Lattner [Tue, 6 Apr 2010 00:33:43 +0000 (00:33 +0000)]
give the SourceMgr object a cookie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100504 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGive llvm::SourceMgr the ability to have a client-specified
Chris Lattner [Tue, 6 Apr 2010 00:26:48 +0000 (00:26 +0000)]
Give llvm::SourceMgr the ability to have a client-specified
diagnostic handler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100503 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove MaybeOwningPtr. We're going to use reference-counting instead.
Douglas Gregor [Mon, 5 Apr 2010 23:53:46 +0000 (23:53 +0000)]
Remove MaybeOwningPtr. We're going to use reference-counting instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100499 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProperly enable load clustering.
Jakob Stoklund Olesen [Mon, 5 Apr 2010 23:48:02 +0000 (23:48 +0000)]
Properly enable load clustering.

Operand 2 on a load instruction does not have to be a RegisterSDNode for this to
work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100497 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix an obvious copy-n-paste bug. It's not known to cause any miscompilation.
Evan Cheng [Mon, 5 Apr 2010 23:33:29 +0000 (23:33 +0000)]
Fix an obvious copy-n-paste bug. It's not known to cause any miscompilation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100494 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGive AsmParser an option to control whether it finalizes
Chris Lattner [Mon, 5 Apr 2010 23:15:42 +0000 (23:15 +0000)]
Give AsmParser an option to control whether it finalizes
the stream.  New demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100492 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd .o file writing for inline asm in llc. Here's a silly
Chris Lattner [Mon, 5 Apr 2010 23:11:24 +0000 (23:11 +0000)]
add .o file writing for inline asm in llc.  Here's a silly
demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl    %eax
^
LLVM ERROR: Error parsing inline asm

Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:

$ cat asm.c
int foo(int X) {
 __asm__ ("incl    %0" : "+r" (X));
 return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl    %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$

don't stop at inc!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100491 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a comment.
Chris Lattner [Mon, 5 Apr 2010 23:07:42 +0000 (23:07 +0000)]
add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100490 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy #includes.
Chris Lattner [Mon, 5 Apr 2010 23:07:18 +0000 (23:07 +0000)]
tidy #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100489 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOutput floating point representations in DWARF format. This is done by outputing
Bill Wendling [Mon, 5 Apr 2010 22:59:21 +0000 (22:59 +0000)]
Output floating point representations in DWARF format. This is done by outputing
the FP encoding directly as a hex representation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100487 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoupdate unit test for api change.
Chris Lattner [Mon, 5 Apr 2010 22:49:48 +0000 (22:49 +0000)]
update unit test for api change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100486 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agostringref-ize the MemoryBuffer::get apis. This requires
Chris Lattner [Mon, 5 Apr 2010 22:42:30 +0000 (22:42 +0000)]
stringref-ize the MemoryBuffer::get apis.  This requires
a co-committed clang patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd nounwind.
Evan Cheng [Mon, 5 Apr 2010 22:30:05 +0000 (22:30 +0000)]
Add nounwind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100482 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix ADD32rr_alt instruction encoding bug. Patch by Marius Wachtler.
Evan Cheng [Mon, 5 Apr 2010 22:21:09 +0000 (22:21 +0000)]
Fix ADD32rr_alt instruction encoding bug. Patch by Marius Wachtler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100480 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a really nasty bug that Evan was tracking in SCCP. When resolving
Chris Lattner [Mon, 5 Apr 2010 22:14:48 +0000 (22:14 +0000)]
fix a really nasty bug that Evan was tracking in SCCP.  When resolving
undefs in branches/switches, we have two cases: a branch on a literal
undef or a branch on a symbolic value which is undef.  If we have a
literal undef, the code was correct: forcing it to a constant is the
right thing to do.

If we have a branch on a symbolic value that is undef, we should force
the symbolic value to a constant, which then makes the successor block
live.  Forcing the condition of the branch to being a constant isn't
safe if later paths become live and the value becomes overdefined.  This
is the case that 'forcedconstant' is designed to handle, so just use it.

This fixes rdar://7765019 but there is no good testcase for this, the
one I have is too insane to be useful in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100478 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosome code cleanups, use SwitchInst::findCaseValue, reduce indentation
Chris Lattner [Mon, 5 Apr 2010 21:18:32 +0000 (21:18 +0000)]
some code cleanups, use SwitchInst::findCaseValue, reduce indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100468 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCode clean up.
Evan Cheng [Mon, 5 Apr 2010 21:16:25 +0000 (21:16 +0000)]
Code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100467 91177308-0d34-0410-b5e6-96231b3b80d8