Commit Graph

3996 Commits

Author SHA1 Message Date
Chris Lattner
aaf1582549 Mark llvm.stacksave as only reading memory, this fixes
Regression/Transforms/InstCombine/stacksaverestore.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 00:04:28 +00:00
Nate Begeman
442b32b5c5 Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator
set construction, rather than intersecting various std::sets.  This reduces
the memory usage for the testcase in PR681 from 496 to 26MB of ram on my
darwin system, and reduces the runtime from 32.8 to 0.8 seconds on a
2.5GHz G5.  This also enables future code sharing between Dom and PostDom
now that they share near-identical implementations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 02:20:46 +00:00
Evan Cheng
0937103368 Added a parameter to control whether Constant::getStringValue() would chop
off the result string at the first null terminator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 23:52:03 +00:00
Chris Lattner
682365dc80 remove ShouldEmitDebugFunctions, a hack to support llvm-db via the jit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26702 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 22:49:05 +00:00
Chris Lattner
969ccf82d0 Fix another broken intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 18:01:03 +00:00
Chris Lattner
5d832dc330 Fix incorrect definitions of these intrinsics, which broke a bunch of
stuff last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 17:48:34 +00:00
Chris Lattner
a34b6f8713 Move simple-selector-specific types to the simple selector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:51:18 +00:00
Chris Lattner
37cb415eec Simplify the interface to the schedulers, to not pass the selected heuristic
in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26691 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:48:52 +00:00
Chris Lattner
2f5806c2b3 Move some simple-sched-specific instance vars to the simple scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:42:02 +00:00
Chris Lattner
e76074ab89 move some simple scheduler methods into the simple scheduler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:35:21 +00:00
Chris Lattner
8c7ef0599c Make EmitNode take a SDNode instead of a NodeInfo*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:28:36 +00:00
Chris Lattner
7593639df6 Store VRBase in a map, not in NodeInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:24:45 +00:00
Chris Lattner
de76851d42 make some methods protected instead of private
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26681 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 06:30:11 +00:00
Chris Lattner
d144a24d3d Fix an incorrect intrinsic description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 04:17:06 +00:00
Chris Lattner
68b67ff3db use the enum list autogen'd from Intrinsics.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:03:31 +00:00
Chris Lattner
59bcce5ae5 remove dbg_declare, it's not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:02:42 +00:00
Jim Laskey
62e15a3c03 Forgot this on last check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26645 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:30:53 +00:00
Chris Lattner
9ca6cdaee9 Add a helper method for running static ctors/dtors in the module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:42:46 +00:00
Chris Lattner
6665b97ae9 add a new helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:38:51 +00:00
Jim Laskey
21b6c9d647 Get rid of the multiple copies of getStringValue. Now a Constant:: method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:11:07 +00:00
Chris Lattner
b0d21ef20c Change the interface for getting a target HazardRecognizer to be more clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:25:59 +00:00
Jim Laskey
e8c3e3b51c Switch to using a numeric id for anchors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 20:53:47 +00:00
Chris Lattner
37e30cf736 Hoist the HazardRecognizer out of the ScheduleDAGList.cpp file to where
targets can implement them.  Make the top-down scheduler non-g5-specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26568 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 00:20:29 +00:00
Chris Lattner
202bc85a95 add an emitnoop method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26563 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:50:42 +00:00
Chris Lattner
1566d18fe2 custom lowered nodes are legal too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26561 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:49:19 +00:00
Chris Lattner
65e9f3969b add a hook to insert a noop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26560 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:48:51 +00:00
Jim Laskey
c0fe53383e Breathe some life into a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26553 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 21:20:20 +00:00
Chris Lattner
20614b9562 Add a new scheduling type. This is, of course, a hack. Proper factoring
will come later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26551 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 21:08:06 +00:00
Chris Lattner
38bf3bffe3 Add a copysign node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26540 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:06:40 +00:00
Jim Laskey
f01e547700 Adding basic structure support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26505 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 15:06:57 +00:00
Evan Cheng
3e1ce5a44d Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26504 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 07:01:07 +00:00
Evan Cheng
33143dce15 Number of NodeTypes now exceeds 128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:58:59 +00:00
Evan Cheng
bfa284f697 SDOperand::isOperand should not be a forwarding. It must check *this against N's operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26502 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:42:32 +00:00
Evan Cheng
80d8eaae05 Added isOperand(N): true if this is an operand of N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26501 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:24:54 +00:00
Chris Lattner
b253400ca9 initial checkin of the intrinsic description file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26496 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:33:15 +00:00
Chris Lattner
378fdf29b1 update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26491 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:55:49 +00:00
Chris Lattner
c1323faa74 Split this out of Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26488 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:54:11 +00:00
Chris Lattner
41edaa0529 remove the read/write port/io intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:19:58 +00:00
Chris Lattner
03dd465215 Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:00:25 +00:00
Chris Lattner
a1b2a9b7e2 Fix a compilation error with GCC 4.1. Thanks to Vladimir Merzliakov for
pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26467 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 00:21:41 +00:00
Jim Laskey
6a3eb01084 Support for enumerations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 23:52:37 +00:00
Jim Laskey
40486cc6a0 Remove extra comma from enum list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26457 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 20:49:44 +00:00
Jim Laskey
abd19e8b5b Remove comma from enum list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 20:48:20 +00:00
Jim Laskey
9c4447aa2b Switch back to using actual dwarf tags. Simplifies code without loss to other
debug forms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 20:39:36 +00:00
Jim Laskey
92ae740396 Use context and not compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 18:20:30 +00:00
Jim Laskey
f8913f19ae Basic array support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26451 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 17:53:02 +00:00
Chris Lattner
00ffed0468 Add interfaces for targets to provide target-specific dag combiner optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 04:52:55 +00:00
Evan Cheng
bf57e1f456 Missing a cast previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 00:58:54 +00:00
Evan Cheng
70695ab626 - Added v2f32, not used by any target currently. Only for testing purpose.
- Minor bug fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26433 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 00:55:26 +00:00
Evan Cheng
1ab7d859cf - Added VConstant as an abstract version of ConstantVec.
- All abstrct vector nodes must have # of elements and element type as their
first two operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 00:51:13 +00:00
Jim Laskey
45ccae5b7d Add const, volatile, restrict support.
Add array of debug descriptor support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26428 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 20:15:07 +00:00
Jim Laskey
9a777a3a8e Qualify dwarf namespace inside llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26409 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 22:37:23 +00:00
Jim Laskey
bd76184e67 Supporting multiple compile units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26402 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 17:27:12 +00:00
Jim Laskey
0d086af82b Re-orging file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26401 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 12:43:29 +00:00
Evan Cheng
404cb4f9fa Added an offset field to ConstantPoolSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26371 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 09:54:52 +00:00
Chris Lattner
b44b509411 Add a PrintAsmMemoryOperand method for printing addresses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26363 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 20:21:12 +00:00
Chris Lattner
3c2da661b6 add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26357 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 18:53:51 +00:00
Jim Laskey
6990600f93 Add pointer and reference types. Added short-term code to ignore NULL types
(to allow llvm-gcc4 to build.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26355 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 16:46:40 +00:00
Jeff Cohen
7e88103cde Get VC++ building again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26351 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 02:52:40 +00:00
Chris Lattner
4c12e719c9 Add some hooks for selecting memory addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26347 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 02:12:52 +00:00
Chris Lattner
5ee3e14127 Add C_Memory operand type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26344 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 01:10:14 +00:00
Chris Lattner
7ef24f9773 add a new flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26340 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 23:36:23 +00:00
Jim Laskey
434b40b42f Added basic support for typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26339 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 22:37:30 +00:00
Jim Laskey
f4afdd9f41 DwarfWriter reading basic type information from llvm-gcc4 code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26331 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 16:58:18 +00:00
Evan Cheng
4c1aa86657 - Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 20:19:42 +00:00
Jim Laskey
0420f2aaf9 Coordinate activities with llvm-gcc4 and dwarf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 19:02:11 +00:00
Chris Lattner
410354fe0c Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 16:23:43 +00:00
Chris Lattner
1efa40f6a4 split register class handling from explicit physreg handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:56:39 +00:00
Chris Lattner
16d597a20d expose the set of values types holdable in a regclass to clients
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:51:58 +00:00
Chris Lattner
aba3b13fb3 Pass in a value type to getRegForInlineAsmConstraint, allowing targets to
select different sets of registers depending on the type requested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:10:29 +00:00
Evan Cheng
aea20f50e5 Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 22:34:53 +00:00
Evan Cheng
c9fdea915a Move PICEnabled declaration here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:06:03 +00:00
Chris Lattner
80274268b9 add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 21:57:00 +00:00
Nate Begeman
70804d3e14 Fix a nit sabre noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 18:06:19 +00:00
Nate Begeman
551bf3f800 kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC
and SUBE nodes that actually expose what's going on and allow for
significant simplifications in the targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26255 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 05:43:56 +00:00
Nate Begeman
368e18d56a Rework the SelectionDAG-based implementations of SimplifyDemandedBits
and ComputeMaskedBits to match the new improved versions in instcombine.
Tested against all of multisource/benchmarks on ppc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 21:11:51 +00:00
Evan Cheng
a03a5dc7ce Rename maxStoresPerMemSet to maxStoresPerMemset, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26174 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:38:30 +00:00
Chris Lattner
c70cc35ddf Fix typo that caused build failures for things trying to use m_Or.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26153 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 23:06:39 +00:00
Jim Laskey
f198eb9c62 Sync up the tag numbers with gcc4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26146 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 16:56:43 +00:00
Jim Laskey
d96185aa62 Rename to better reflect usage (current and planned.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26145 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 12:50:39 +00:00
Chris Lattner
6a5b6d7633 Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26141 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 08:54:46 +00:00
Jim Laskey
ce72b1755f Reorg for integration with gcc4. Old style debug info will not be passed though
to SelIDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26115 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 01:01:30 +00:00
Chris Lattner
ebccc040e5 Remove a level of indirection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 21:32:11 +00:00
Evan Cheng
fae9f1cb34 Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
problem where it inline the map insertion call too aggressively. Before this
change it was producing a frame size of 24k for Select_store(), now it's down
to 10k (by calling this method rather than calling the map insertion operator).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26094 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:11:03 +00:00
Evan Cheng
6ae46c4c87 More changes to reduce frame size.
Move all getTargetNode() out of SelectionDAG.h into SelectionDAG.cpp. This
prevents them from being inlined.
Change getTargetNode() so they return SDNode * instead of SDOperand to prevent
copying. It should also help compilation speed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26083 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:15:23 +00:00
Chris Lattner
04a0f60b23 instead of keeping track of Constant/alignment pairs, actually compute the
offset of each entry from the start of the constant pool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26077 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 04:44:32 +00:00
Chris Lattner
69a9563969 Use a MachineConstantPoolEntry struct instead of a pair to hold
constant pool entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 04:21:49 +00:00
Chris Lattner
e7a1e2152c Assert invariants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26073 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:25:42 +00:00
Chris Lattner
c1f523dedd Require an alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26072 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:24:25 +00:00
Chris Lattner
ef3640aded Add a comment: value is log2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26068 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:10:15 +00:00
Chris Lattner
d6c65ea924 Add support for assembler directives that wrap inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26065 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-08 23:41:56 +00:00
Chris Lattner
5819342732 Add some happy helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26046 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-08 02:05:45 +00:00
Chris Lattner
eac707f702 getConstraintType should be virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 20:13:44 +00:00
Chris Lattner
ab0e04c2f2 add a new Type::getIntegralTypeMask() method, which is useful for clients that
want to do bitwise inspection of integer types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26032 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 06:17:10 +00:00
Jeff Cohen
aa02c1df1d Fix some truncation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26029 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 03:34:35 +00:00
Chris Lattner
03a9939c61 fix an error compiling with -pedantic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26028 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 01:12:49 +00:00
Chris Lattner
f483e58212 Change the prototype of PrintAsmOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26020 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 22:16:41 +00:00
Jim Laskey
f60c2414ab Goodbye nasty macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26019 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 21:54:05 +00:00
Jim Laskey
c2f0c8def7 Edit requests from Sabre.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26018 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 19:12:02 +00:00
Jim Laskey
86cbdba522 Changing model for the construction of debug information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26016 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 15:33:21 +00:00
Evan Cheng
4ee6211258 * Added SDNode::isOnlyUse().
* Fix hasNUsesOfValue(), it should be const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 06:29:23 +00:00
Chris Lattner
28adf292d9 add a new method, getPreferredAlignmentLog.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 01:24:06 +00:00
Chris Lattner
ed412ac2cb Refactor a bunch of code into a non-inlined method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 09:51:33 +00:00
Evan Cheng
cccf1232a6 Get rid of some memory leaks identified by Valgrind
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25960 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 06:49:00 +00:00
Chris Lattner
8f9f0d3a34 add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25959 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 05:49:01 +00:00
Chris Lattner
c991cf58aa Add some methods for inline asm support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25950 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 02:12:09 +00:00
Nate Begeman
de99629e2a Add a framework for eliminating instructions that produces undemanded bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-03 22:24:05 +00:00
Chris Lattner
af9fa2bd0c Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,
a far more logical place.  Other methods should also be moved if anyone
is interested. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25912 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 20:11:55 +00:00
Chris Lattner
679836360a add a new isStoreToStackSlot method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 19:55:29 +00:00
Chris Lattner
ab77f73aee add an instance var and argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25891 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 00:23:12 +00:00
Chris Lattner
47cf4eda9f add a new PrintAsmOperand method, move some stuff around for ease of reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25885 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-01 22:39:30 +00:00
Chris Lattner
e202a253b1 Beef up the interface to inline asm constraint parsing, making it more
general, useful, and easier to use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25864 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-01 01:27:37 +00:00
Evan Cheng
b8973bd8f5 Allow the specification of explicit alignments for constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25855 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-31 22:23:14 +00:00
Evan Cheng
19f3416d1c One more getTargetNode() variant shouldn't hurt...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25816 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 07:47:47 +00:00
Chris Lattner
cb0b555663 Clear the OpAction field before setting it. This allows a target to set
an instruction operation action to Expand, then set it to Legal later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 06:09:03 +00:00
Jeff Cohen
85046901b8 Add AddSymbol() method to DynamicLibrary to work around Windows limitation
of being unable to search for symbols in an EXE.  It will also allow other
existing hacks to be improved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25805 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 04:33:51 +00:00
Chris Lattner
553d8007ad Move MaskedValueIsZero from the DAGCombiner to the TargetLowering interface,
making isMaskedValueZeroForTargetNode simpler, and useable from other parts
of the compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 04:08:18 +00:00
Chris Lattner
030dae5bce Pass the address of the main MaskedValueIsZero function to allow recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 03:48:36 +00:00
Jim Laskey
024c0b34c4 Remove extra qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 09:52:11 +00:00
Chris Lattner
e3bd778e4d Clean up the interface to ValueTypeActions, allowing Legalize to use a copy
of it more cleanly.  Double the size of OpActions, allowing it to hold actions
for any VT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 08:40:37 +00:00
Chris Lattner
f38a05d67b revert an accidental commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 07:59:37 +00:00
Chris Lattner
c1857c23f5 remove some methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 07:57:11 +00:00
Chris Lattner
ac0d723825 Make ConstantFP legalize into TargetConstantFP like other leaf nodes do. Allow
targets to register custom legalizers for ConstantFP in case there isn't a
fixed list of constants that can be generated.  On some architectures (ia64?)
all fp immediates are legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25769 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 06:24:40 +00:00
Chris Lattner
2128a2f76c remove the getBR2Way_CC method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25768 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 06:01:13 +00:00
Chris Lattner
9b88361bef add another variant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 10:08:58 +00:00
Chris Lattner
b9aff659e8 Add some methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 09:32:01 +00:00
Chris Lattner
7e871b28a2 remove this method I just added, now is not the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:43:33 +00:00
Chris Lattner
4f16e70faa add a new callback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:37:03 +00:00
Nate Begeman
0aed7840ec Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:14:31 +00:00
Chris Lattner
253a87d667 The 'target-independent' ISD::CALL isn't. Nuke it, making way for Nate's
future work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 00:18:27 +00:00
Nate Begeman
ee625573b5 Remove TLI.LowerReturnTo, and just let targets custom lower ISD::RET for
the same functionality.  This addresses another piece of bug 680.  Next,
on to fixing Alpha VAARG, which I broke last time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 21:09:22 +00:00
Jim Laskey
da427fa5da Using bit size of integers instead of ambiguous "long" et all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 20:31:25 +00:00
Jim Laskey
3ea0e0e005 Sorry - really folowing convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25691 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 18:32:41 +00:00
Jim Laskey
d8f77bae03 Improve visibility/correctness of operand indices in "llvm.db" objects.
Handle 64 in DIEs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 15:20:54 +00:00
Reid Spencer
e2a5fb0e08 Fix auto-upgrade of intrinsics to work properly with both assembly and
bytecode reading. This code is crufty, the result of much hacking to get things
working correctly. Cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 11:49:27 +00:00
Chris Lattner
e736ed1947 add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25675 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 02:09:16 +00:00
Chris Lattner
4ed88eb822 Add a common INLINEASM opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 23:27:02 +00:00
Jim Laskey
511731786e Dropped DwarfWriter::
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 22:25:04 +00:00
Chris Lattner
7572eb81ee Add new INLINEASM node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 22:23:45 +00:00
Jim Laskey
6e87c0e029 Use global information to fill out Dwarf compile units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 21:22:49 +00:00
Jeff Cohen
9471c8a93b Improve compatibility with VC2005, patch by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:41:32 +00:00
Chris Lattner
8211e82e40 add some methods for case-insensitive string compares
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:36:29 +00:00
Jim Laskey
3e0be526bf Use find instead of lower_bounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:30:51 +00:00
Chris Lattner
bc9ae377d9 Add a method for inline asm support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:27:33 +00:00
Jim Laskey
b3e789ac25 Set up MachineDebugInfo to scan for debug information form "llvm.db"g globals.
Global Variable information is now pulled from "llvm.dbg.globals"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25655 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:21:46 +00:00
Jim Laskey
e4a359e43b Add support to find existing entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:09:35 +00:00
Andrew Lenharth
4b934766bd Remember plugins should someone like bugpoint want to know them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25649 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 18:36:50 +00:00
Jim Laskey
a550f63833 Split out Dwarf constants for use outside DwarfWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25646 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 14:45:22 +00:00
Chris Lattner
507fdbc0e8 add methods for constraint parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 02:21:42 +00:00
Chris Lattner
6dbca0b6bc Allow use of isa<InlineAsm>(X) without #including InlineAsm.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25632 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 01:54:21 +00:00
Evan Cheng
44b974c111 Duh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25628 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 00:28:35 +00:00
Chris Lattner
867335c339 add another method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 22:10:35 +00:00
Chris Lattner
3ebf994b9a add some useful accessors :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25612 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 19:58:26 +00:00
Chris Lattner
863517aea0 Change inline asms to be uniqued like constants, not embedded in a Module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 18:57:27 +00:00
Evan Cheng
46c01cfe9f No need to keep track of top and bottom nodes in a group since the vector is
already in order. Thanks Jim for pointing it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 18:54:24 +00:00
Nate Begeman
acc398c195 First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 18:21:52 +00:00
Evan Cheng
d854b62afa Add a enum to specify target scheduling preference: SchedulingForLatency or
SchedulingForRegPressure. Added corresponding methods to set / get the value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 09:09:02 +00:00
Evan Cheng
0993f1d833 Some minor scheduler changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 09:07:50 +00:00
Chris Lattner
1e326009fa add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25581 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 05:47:05 +00:00
Jeff Cohen
c73fe2ac0c Be consistent in using class/struct to keep Visual Studio happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25575 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 04:41:48 +00:00
Chris Lattner
cc041ba03a Initial checkin of the InlineAsm class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25570 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 04:13:11 +00:00
Jim Laskey
52060a0e71 Crude Dwarf global variable debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25569 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 00:49:18 +00:00
Chris Lattner
49ebb90bd0 Add global scope asm support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25555 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 23:02:28 +00:00
Andrew Lenharth
7cf11b4ab2 another couple selects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25551 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 21:51:14 +00:00
Andrew Lenharth
8c6f1ee5aa another selectto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25548 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 20:59:12 +00:00
Evan Cheng
f0f9c90204 Skeleton of the list schedule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25544 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 08:26:10 +00:00
Reid Spencer
df3be82dcb Update for including additional function tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 08:15:53 +00:00
Evan Cheng
4ef1086749 Factor out more instruction scheduler code to the base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25532 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 07:01:07 +00:00
Chris Lattner
1ac2d51806 Speedup and simplify pass registration by the observation that there is
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same.  As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value.  This should reduce codesize, heap size, and startup time. Yaay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 01:01:04 +00:00
Chris Lattner
1dc3fd1110 This only needs <iosfwd> not <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 23:43:45 +00:00
Chris Lattner
e01a9852a0 This header should not pull in <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25511 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 22:54:51 +00:00
Jeff Cohen
ca5ca41a63 Visual Studio neurotic about inconsistent class/struct usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 20:36:43 +00:00
Evan Cheng
a9c2091cd3 Do some code refactoring on Jim's scheduler in preparation of the new list
scheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25493 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-21 02:32:06 +00:00
Jim Laskey
63ae85f194 Simplify search for abbreviations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25491 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-21 01:13:18 +00:00
Jim Laskey
736832107b Correct some simple errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25490 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-21 00:59:54 +00:00
Jim Laskey
4002017e68 Right size integer values before emitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25489 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 21:02:36 +00:00
Jim Laskey
d18e28964b Reworked how Dwarf debug info entries and abbreviations are handled. Added
pubnames and debuy str sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25487 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 20:34:06 +00:00
Reid Spencer
3484a99ba1 Make sure that libm is used during config tests so that ceil, floor, and
friends are actually detected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25454 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 08:31:08 +00:00
Reid Spencer
f4bb9b1fa7 For PR696:
Add checks for ceil, ceilf, floor, and floorf


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 08:22:40 +00:00
Reid Spencer
0fc0ab7148 1. Documentation upgrade.
2. Have UpgradeInstrinicCall return an Instruction* instead of a CallInst*
   and return the needed CastInst* if the result of the upgraded call needs
   to be casted back to a signed type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 06:59:26 +00:00
Reid Spencer
4283ac7857 Add a new interface function to AutoUpgrade for simultaneously upgrading
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 01:18:29 +00:00
Jim Laskey
e719a7c40b Added minimum Dwarf aranges. Cleaned up some section headers. Line number
support now works in gdb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25417 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-18 16:54:26 +00:00
Jim Laskey
08878dac8f Pastos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25412 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 21:39:39 +00:00
Jim Laskey
19ef4efa70 Add frame work for additional dwarf sections. Comments will improve as code
is added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25410 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 20:41:40 +00:00
Robert Bocchino
4eb2e3a6f4 Support for the insertelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 20:06:42 +00:00
Robert Bocchino
f999344fa7 Instruction and constant expression definitions for the insertelement
operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25402 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 20:05:59 +00:00
Evan Cheng
7715fba9b1 Suppress "no newline at end of file" warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 19:21:01 +00:00
Jim Laskey
0cbd242e33 Misc. errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 19:12:24 +00:00
Jim Laskey
063e765345 Adding basic support for Dwarf line number debug information.
I promise to keep future commits smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25396 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 17:31:53 +00:00
Jim Laskey
e3150024b4 Reduce memory consumption and force (somewhat) access to entries via ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25393 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 16:29:58 +00:00
Evan Cheng
4e4937836e Yet another getTargetNode() variant. I promise one of these days I'll fix
tblgen so this is unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:32:38 +00:00
Jim Laskey
67218e9f27 Redundant inline keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25377 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 23:44:03 +00:00
Jim Laskey
54c3319022 UniqueVector template provides a means of enumerating objects uniquely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 23:29:43 +00:00
Reid Spencer
0b118206bf For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:12:35 +00:00
Reid Spencer
e86bf519e1 For PR411:
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:06:01 +00:00
Chris Lattner
85db136695 Remove a never-working pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25348 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 01:05:24 +00:00
Chris Lattner
801af7376e Initialize DFSnum's to -1, in case a node is not reachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25344 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 21:48:36 +00:00
Chris Lattner
d2da286e99 add an assert, patch by Daniel Berlin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25343 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 21:46:23 +00:00
Chris Lattner
25abb1dc09 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:55:09 +00:00
Chris Lattner
4c2881ecb9 Teach inline function how to update the callgraph when it makes changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:05:06 +00:00
Chris Lattner
56151dad2e Add CallGraph::getOrInsertFunction, to allow clients to update the callgraph
when they change the program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:01:50 +00:00
Chris Lattner
1694ec615f add a dump method to CallGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 19:17:02 +00:00
Jeff Cohen
b69c190c26 Fix generous source of VC++ truncation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 02:17:20 +00:00
Nate Begeman
6fb3bd6a65 Add bswap intrinsics as documented in the Language Reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:25:24 +00:00
Chris Lattner
2790383f73 Add a new InvalidateStructLayoutInfo method and some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 00:06:42 +00:00
Chris Lattner
b419b0e682 Simplify the implementations of classof using the new IntrinsicInst classof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 20:00:51 +00:00
Chris Lattner
874357fa75 Add some functionality to the IntrinsicInst class and some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:49:02 +00:00
Chris Lattner
a4c29d2037 Allow the code cloning interfaces to capture some important info about the
code being cloned if the client wants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 18:39:17 +00:00
Chris Lattner
d90ef9ef2b Provide an interface for Targets to specify their stack pointer register
for llvm.stacksave/restore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 17:47:52 +00:00
Chris Lattner
5a67afc118 add stacksave/stackrestore nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:39:42 +00:00
Chris Lattner
2113db8b3f add new llvm.stacksave/llvm.stackrestore intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25265 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:15:02 +00:00
Nate Begeman
35ef913ec2 Add bswap, rotl, and rotr nodes
Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl

Targets should add rotl/rotr patterns if they have them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 21:21:00 +00:00
Chris Lattner
0cf4bc7995 Simple is good, CVS log is for history, not the silly credits block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25204 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:38:15 +00:00
Chris Lattner
2e761e29f8 Switch loopinfo to using ETForest instead of DominatorSet to compute itself.Patch by Daniel Berlin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:08:57 +00:00
Robert Bocchino
49b78a5696 Added an instruction and constant expression for the extractelement
operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25176 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:04:13 +00:00
Reid Spencer
eb7116bb08 For PR411:
First step in refactoring the SymbolTable is to split it into two classes,
one for a symbol table of types and one for a symbol table of Values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25175 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 09:51:48 +00:00
Reid Spencer
78df7f141c Make ValueSymbolTable (temporarily) a friend of Value so it can mod the
Name of Value instances.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25174 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 09:45:57 +00:00
Reid Spencer
f4484f3e16 For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 03:14:40 +00:00
Evan Cheng
909addffc3 New getNode() variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25156 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:29:18 +00:00
Reid Spencer
13a0b6b58f Add some documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 22:41:22 +00:00
Chris Lattner
e8605a475f Fix the build on platforms where <cassert> doesn't define NULL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25147 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 09:10:46 +00:00
Chris Lattner
ccacd3ccc2 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 08:22:18 +00:00
Chris Lattner
e00ab70c18 Fix out of date comments, patch by Marco Matthies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25143 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 02:32:52 +00:00
Jim Laskey
df0f659517 Grammer correction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:53:28 +00:00
Jim Laskey
abf6d1784b Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:25:28 +00:00
Jim Laskey
b2efb853f0 Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 22:28:25 +00:00
Jeff Cohen
62281a132f Be consistent in using class vs struct to make VC++ happy. And as it contains
methods, virtual method even, class wins.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25098 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 17:21:23 +00:00
Jim Laskey
5bf6f25b4a Add unique id to debug location for debug label use (work in progress.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 15:04:11 +00:00
Jim Laskey
129e079e06 Add flag for debug presence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25094 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 14:29:26 +00:00
Jim Laskey
a7cea6f599 Tie dwarf generation to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25093 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:52:30 +00:00
Jim Laskey
780a61cf04 1. Make MachineDebugInfo a pass.
2. Add label uniquing code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25092 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:46:37 +00:00
Jim Laskey
2c4ec70233 Move MachineDebugInfo to module level location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25091 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:44:43 +00:00
Chris Lattner
7f7b730d79 Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:47:13 +00:00
Chris Lattner
51d6e76ff4 add a comment that I should have written a long time ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:29:33 +00:00
Chris Lattner
0df687b1be add a dump method to help debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25079 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 05:39:51 +00:00
Nate Begeman
a08787faa8 add support for generating v4i32 code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25043 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:09:56 +00:00
Duraid Madina
7d0fe1b42a be more polite in public headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:47:33 +00:00
Duraid Madina
bd6269c321 undo yuletide naughtyness(tm)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25035 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:29:38 +00:00
Duraid Madina
4c4e12fb1f more standards compliance (damn, I can't wait for unordered_set (tee hee)
and unordered_map to make it into the standard)

Hurry up, JTC1 SC22 WG21 Library Working Group!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25020 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 13:34:00 +00:00
Duraid Madina
bb35a113db I laugh at your dual-core G5s! Fear my precompiled headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25019 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 10:34:38 +00:00
Duraid Madina
2abbe867ab i love xmas!!!! *;D*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25016 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 08:36:53 +00:00
Chris Lattner
80f55abf00 improve comment: mention vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24971 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:46:10 +00:00
Chris Lattner
1ac1c4b9d2 add a new node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24969 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:15:59 +00:00
Chris Lattner
002d83418a remove a dead node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24966 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:16:35 +00:00
Duraid Madina
3cb51f9754 i need to do this to take over the earth
when I take over the earth, sabre will be happy because i'll stop asking
him silly questions!!!!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24949 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 07:02:51 +00:00
Chris Lattner
03839956e2 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24944 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:07:52 +00:00
Reid Spencer
65f6ad804e Fix documentation for the AlarmSetup function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:57:15 +00:00
Reid Spencer
b13cf98e6b Implement a generic polled Alarm function. This merely removes the system
dependent portion of the lib/Support/SlowOperationTimer code into the
lib/System implementation where it can be ported to different platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24937 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:23:46 +00:00
Jeff Cohen
9337de8651 Oh oh... Unix is case sensitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24928 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:46:59 +00:00
Jeff Cohen
f31a60cd71 Make it compile with VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:44:51 +00:00
Reid Spencer
6a2bd74606 Add an eol at the end to shut gcc up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:40:06 +00:00
Evan Cheng
c85b33f264 Added TargetLowering::isMaskedValueZeroForTargetNode() declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 23:15:41 +00:00
Jim Laskey
9369a5dbc7 Oops llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24913 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:46:32 +00:00
Jim Laskey
7f149034e5 Start of Dwarf framework code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24912 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:44:40 +00:00
Evan Cheng
7226158d7e Added a hook to print out names of target specific DAG nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24877 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 06:22:03 +00:00
Chris Lattner
bc149b2c98 Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24831 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:00:53 +00:00
Evan Cheng
05a4c35494 Yet another variant of getTargetNode().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:44:51 +00:00
Jeff Cohen
c5f24a2c2a Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 00:19:22 +00:00
Jeff Cohen
e15ccf464c Fix VC++ level 4 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24750 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 00:18:06 +00:00
Jim Laskey
f5395cee6a Added source file/line correspondence for dwarf (PowerPC only at this point.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 22:45:29 +00:00
Reid Spencer
328ead9fce Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 20:00:37 +00:00
Chris Lattner
ed13893ff7 Add a couple more fields, move ctor init list to .cpp file, add support
for emitting the ctor/dtor list for common targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24694 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 06:32:10 +00:00
Evan Cheng
7038daf342 Added new getNode and getTargetNode variants for X86 stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24653 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-10 00:37:58 +00:00
Evan Cheng
ab24ed2a32 Added patterns for ADD8rm, etc. These fold load operands. e.g. addb 4(%esp), %al
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24648 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 22:48:48 +00:00
Evan Cheng
0fc7198890 Added support for ComplexPattern. These are patterns that require C++ pattern
matching code that is not currently auto-generated by tblgen, e.g. X86
addressing mode. Selection routines for complex patterns can return multiple operands, e.g. X86 addressing mode returns 4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24634 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-08 02:00:36 +00:00
Chris Lattner
8b6cea1b95 Remove a now-dead map, patch by Saem Ghani, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24629 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-07 05:41:44 +00:00
Sumant Kowshik
f8395ba498 Added comment for removing assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:16:08 +00:00
Sumant Kowshik
14d1d22f37 Handling of zero length last fields in struct used for growing it arbitrarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24620 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:01:20 +00:00
Chris Lattner
767a033a5c Implement external storage for post-order iteration, implementing PR267
Patch by Saem Ghani, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24617 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 07:05:27 +00:00
Nate Begeman
8cfa57b1b4 Teach the SelectionDAG ISel how to turn ConstantPacked values into
constant nodes with vector types.  Also teach the asm printer how to print
ConstantPacked constant pool entries.  This allows us to generate altivec
code such as the following, which adds a vector constantto a packed float.

LCPI1_0:  <4 x float> < float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 >
        .space  4
        .space  4
        .space  4
        .long   1065353216      ; float 1
        .text
        .align  4
        .globl  _foo
_foo:
        lis r2, ha16(LCPI1_0)
        la r2, lo16(LCPI1_0)(r2)
        li r4, 0
        lvx v0, r4, r2
        lvx v1, r4, r3
        vaddfp v0, v1, v0
        stvx v0, r4, r3
        blr

For the llvm code:

void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, < float 0.0, float 0.0, float 0.0, float 1.0 >
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24616 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 06:18:55 +00:00
Chris Lattner
30614675f4 Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.

Patch provided by Evan Jones, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24604 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 05:30:21 +00:00
Nate Begeman
6510b22cec Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24563 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 04:51:06 +00:00
Evan Cheng
66a48bbc35 Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL  : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
                 "shl{b} {%cl, $dst|$dst, %CL}",
                 [(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;

This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 00:18:45 +00:00
Chris Lattner
eb19e40efb Make SelectNodeTo return N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 22:45:14 +00:00
Chris Lattner
8bdbb63243 Add a simple clear() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 19:31:23 +00:00
Nate Begeman
f43a3ca26d First chunk of actually generating vector code for packed types. These
changes allow us to generate the following code:

_foo:
        li r2, 0
        lvx v0, r2, r3
        vaddfp v0, v0, v0
        stvx v0, r2, r3
        blr

for this llvm:

void %foo(<4 x float>* %a) {
entry:
        %tmp1 = load <4 x float>* %a
        %tmp2 = add <4 x float> %tmp1, %tmp1
        store <4 x float> %tmp2, <4 x float>* %a
        ret void
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 08:22:07 +00:00
Chris Lattner
7bcd6a36e2 minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24528 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 05:26:03 +00:00
Reid Spencer
6ff7240a5c Fix a problem with llvm-ranlib that (on some platforms) caused the archive
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.

Patch provided by Evan Jones


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24527 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 05:21:10 +00:00
Evan Cheng
14229bb636 Fixed a bug introduced by my last commit: TargetGlobalValues should key on
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24524 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 02:49:21 +00:00
Evan Cheng
61ca74bc3a Added an index field to GlobalAddressSDNode so it can represent X+12, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 02:04:11 +00:00
Chris Lattner
47725d059b Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24512 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 06:15:39 +00:00
Nate Begeman
6a648614e8 Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 05:45:29 +00:00
Chris Lattner
d87ef134d7 Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 01:07:12 +00:00
Andrew Lenharth
bb227c1b79 Added documented rsprofiler interface. Also remove new profiler passes, the
old ones have been updated to implement the interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 18:00:38 +00:00
Andrew Lenharth
701f5ac73c Random sampling (aka Arnold and Ryder) profiling. This is still preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).
The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are).  These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.

2) a pass that handles inserting the random sampling framework.  This also has options to control how random samples are choosen.  Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).

The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).

Some things are a bit ugly still, but that should be fixed up soon enough.

Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 00:58:09 +00:00
Andrew Lenharth
7c0c567058 Reg2Mem is something a pass may depend on, so allow that
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 22:14:23 +00:00
Nate Begeman
ab48be3772 Check in code to scalarize arbitrarily wide packed types for some simple
vector operations (load, add, sub, mul).

This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

on ppc as:
_foo:
        lfs f0, 12(r3)
        lfs f1, 8(r3)
        lfs f2, 4(r3)
        lfs f3, 0(r3)
        fadds f0, f0, f0
        fadds f1, f1, f1
        fadds f2, f2, f2
        fadds f3, f3, f3
        stfs f0, 12(r3)
        stfs f1, 8(r3)
        stfs f2, 4(r3)
        stfs f3, 0(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 18:16:00 +00:00
Chris Lattner
291ca1c563 Add a new flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 23:06:08 +00:00
Chris Lattner
02d09206ee Add some more directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 19:51:51 +00:00
Chris Lattner
97e32e3239 add two more config directives, add method for printing constant pool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24463 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:24:11 +00:00
Chris Lattner
d5ab7e1c54 Make the AsmPrinter keep track of the notion of a function number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24460 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:12:47 +00:00
Chris Lattner
6fe3acce74 Capitalize methods for better consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24455 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:51:06 +00:00
Chris Lattner
e2b1f1188f Add section switching to to common AsmPrinter code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24444 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:05:42 +00:00
Chris Lattner
adb0a068c6 Add a new option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24439 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:41:08 +00:00
Chris Lattner
006e3e3649 add a new node type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 22:55:57 +00:00
Chris Lattner
8f3366ad27 Add two new construction methods, patch by Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24417 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 01:42:10 +00:00
Nate Begeman
5fbb5d2459 Teach LLVM how to scalarize packed types. Currently, this only works on
packed types with an element count of 1, although more generic support is
coming.  This allows LLVM to turn the following code:

void %foo(<1 x float> * %a) {
entry:
  %tmp1 = load <1 x float> * %a;
  %tmp2 = add <1 x float> %tmp1, %tmp1
  store <1 x float> %tmp2, <1 x float> *%a
  ret void
}

Into:

_foo:
        lfs f0, 0(r3)
        fadds f0, f0, f0
        stfs f0, 0(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 00:36:38 +00:00
Chris Lattner
a35bef9db2 Fix the dominates method to return true if the two nodes are the same. Add
a new properlyDominates method to do what the old one did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:33 +00:00
Nate Begeman
395cba8d41 Teach the type lowering code about turning packed types into vector types.
Next step: generating vector dag nodes, and legalizing them into scalar
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 21:44:42 +00:00
Chris Lattner
b13b3801fc add a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24375 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 07:21:15 +00:00